Compare commits
631 Commits
feature/up
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91a79f78cc | ||
|
|
8d5e5812ec | ||
|
|
622323117a | ||
|
|
2fdbe74a4a | ||
|
|
13af32ed2d | ||
|
|
dd00cee809 | ||
|
|
34cafac121 | ||
|
|
4bf4c12159 | ||
|
|
754c563515 | ||
|
|
ea1a829957 | ||
|
|
ccb956a834 | ||
|
|
ba83aa5247 | ||
|
|
324e84eafc | ||
|
|
e290f2aca9 | ||
|
|
b13001ac90 | ||
|
|
1e24a2cc81 | ||
|
|
631dbdfa53 | ||
|
|
fbf295f2a8 | ||
|
|
00c84fd622 | ||
|
|
a8cee21ae8 | ||
|
|
48d7c3e692 | ||
|
|
c7291b567f | ||
|
|
ecb0e528c2 | ||
|
|
2de65b22ec | ||
|
|
a01d07ce41 | ||
|
|
348bf2a299 | ||
|
|
37c81d78ce | ||
|
|
33052d2e11 | ||
|
|
4603ebd7cf | ||
|
|
00f0a8a828 | ||
|
|
367e4e012e | ||
|
|
3bf4e8b0e5 | ||
|
|
39a5a75333 | ||
|
|
20f4dcd798 | ||
|
|
8398156122 | ||
|
|
8136ba1d34 | ||
|
|
2c18b939e7 | ||
|
|
01d2b95417 | ||
|
|
8cfb82e03d | ||
|
|
2d8d34bab8 | ||
|
|
6e772cb6b7 | ||
|
|
32ce8e350f | ||
|
|
73ab1a368a | ||
|
|
d9aa25c4af | ||
|
|
d18cfb6968 | ||
|
|
924e448270 | ||
|
|
4dc402fd16 | ||
|
|
8b802028e9 | ||
|
|
f6a20c873a | ||
|
|
4e4422466c | ||
|
|
3bf032d2e0 | ||
|
|
3d378b28c9 | ||
|
|
1f7ca563bf | ||
|
|
f6a0ff580c | ||
|
|
b9e858a6d5 | ||
|
|
f88eeec7ee | ||
|
|
9c6c55fe75 | ||
|
|
e6f2932ef1 | ||
|
|
8c1f9539c7 | ||
|
|
21379d133d | ||
|
|
6e58c8fc2f | ||
|
|
10db1eec7d | ||
|
|
d267ad19f5 | ||
|
|
99d2885f9c | ||
|
|
0545bfe642 | ||
|
|
7e408d2c2e | ||
|
|
512b9bae61 | ||
|
|
0f10bf9375 | ||
|
|
63468fa91e | ||
|
|
d9f6e13bdf | ||
|
|
e512636ad6 | ||
|
|
f2769e689f | ||
|
|
9898a03417 | ||
|
|
7174f1fe22 | ||
|
|
4480eb83d7 | ||
|
|
5ee673175c | ||
|
|
86885f999c | ||
|
|
2e4e0a6b99 | ||
|
|
338b50c694 | ||
|
|
20b57db193 | ||
|
|
7b61cff46d | ||
|
|
25728f9486 | ||
|
|
8e215f13af | ||
|
|
a71607aae3 | ||
|
|
2ae9bf95a4 | ||
|
|
08cf71cb02 | ||
|
|
8f3fa82f64 | ||
|
|
e40bee38af | ||
|
|
2799108c7d | ||
|
|
e1be487b6b | ||
|
|
383d6e2439 | ||
|
|
3452b73eb0 | ||
|
|
9dc45d3024 | ||
|
|
dc0a8a1e3d | ||
|
|
cf2102e182 | ||
|
|
6db6760a0a | ||
|
|
cdd0142759 | ||
|
|
4fbf77e661 | ||
|
|
8d31623138 | ||
|
|
acd14a2179 | ||
|
|
f09124f611 | ||
|
|
ead2e4eaf7 | ||
|
|
63ccc50de3 | ||
|
|
a753c24d9d | ||
|
|
d4bf2e0796 | ||
|
|
2472cd5d1b | ||
|
|
7bfe92eb9c | ||
|
|
990d413673 | ||
|
|
b4f677f81b | ||
|
|
59dfc3f05e | ||
|
|
3d409fc1d4 | ||
|
|
ab437b460f | ||
|
|
ff46687106 | ||
|
|
d7f099dc05 | ||
|
|
415156256a | ||
|
|
c799f53687 | ||
|
|
15ff5e65b1 | ||
|
|
a3769f0bad | ||
|
|
8a668620de | ||
|
|
935634c9e2 | ||
|
|
d13e227eb9 | ||
|
|
b977dbd183 | ||
|
|
15399a2969 | ||
|
|
bc3cc77a0a | ||
|
|
dcd6d9bf7b | ||
|
|
ddcb00676a | ||
|
|
73f9207839 | ||
|
|
bccbca87fa | ||
|
|
a24fec5558 | ||
|
|
c26ba7dcab | ||
|
|
cadcd2d53c | ||
|
|
7eca939c06 | ||
|
|
975567cdd4 | ||
|
|
2df2d491ae | ||
|
|
9b4852f393 | ||
|
|
f3d0abb65e | ||
|
|
9a5ae3bf51 | ||
|
|
d11783ebfc | ||
|
|
f5eebe6743 | ||
|
|
b8c7bdb1ba | ||
|
|
87bbe47e7e | ||
|
|
1ff6475fdb | ||
|
|
2f044a8d94 | ||
|
|
a1a54665d9 | ||
|
|
6e73c2d50c | ||
|
|
53f690c554 | ||
|
|
eebd333e11 | ||
|
|
3b65f1bdf2 | ||
|
|
a9444c05bf | ||
|
|
9a957138b5 | ||
|
|
a94e3bd012 | ||
|
|
b80cfab4fb | ||
|
|
da6233c10d | ||
|
|
43e925ae23 | ||
|
|
cd7c65ef4a | ||
|
|
fd7f466578 | ||
|
|
3a84ccd30f | ||
|
|
7fdd451cd1 | ||
|
|
59d5b12e80 | ||
|
|
d81513a95f | ||
|
|
23d577336f | ||
|
|
b9646c1140 | ||
|
|
7d103dfcea | ||
|
|
df1bad5380 | ||
|
|
6a41e543ee | ||
|
|
06e94e9648 | ||
|
|
096da843d1 | ||
|
|
ba6da187f3 | ||
|
|
11cc55dd71 | ||
|
|
e82dbce63c | ||
|
|
4677ab9637 | ||
|
|
b77e6e8077 | ||
|
|
3416060d4b | ||
|
|
ce7ed928c4 | ||
|
|
b7c7eff1b5 | ||
|
|
64b5471ea4 | ||
|
|
ef2d880039 | ||
|
|
a577d329ec | ||
|
|
80fc72e8b0 | ||
|
|
0a3fbfe39a | ||
|
|
4f430055f3 | ||
|
|
67832954e4 | ||
|
|
333de659ed | ||
|
|
0374410315 | ||
|
|
296a25d26f | ||
|
|
0e141ae95c | ||
|
|
fc1c89c710 | ||
|
|
422ceb9a25 | ||
|
|
14a494cc24 | ||
|
|
0da6a4aee7 | ||
|
|
00618f8081 | ||
|
|
d525f9bee3 | ||
|
|
ab7d2bb3b8 | ||
|
|
e2f35a0314 | ||
|
|
e4c409ab19 | ||
|
|
48c28e046d | ||
|
|
0f45fb5788 | ||
|
|
8d4303b166 | ||
|
|
857a55f133 | ||
|
|
b513834076 | ||
|
|
2131034ad9 | ||
|
|
4a53b0ff74 | ||
|
|
f7ff77b11d | ||
|
|
e06fe64311 | ||
|
|
e416d47df4 | ||
|
|
51a0d00b93 | ||
|
|
ae16506d87 | ||
|
|
75c128534e | ||
|
|
e0b7ff743c | ||
|
|
84314df7cb | ||
|
|
1545a92c27 | ||
|
|
b62c548193 | ||
|
|
d92098571e | ||
|
|
1eb340aaea | ||
|
|
6211ea3c77 | ||
|
|
3d91f1f3f4 | ||
| 365aac8cfa | |||
|
|
abd1a6a051 | ||
| b80a11093a | |||
|
|
d129c7ba62 | ||
|
|
46606f529d | ||
|
|
034234a134 | ||
|
|
c197edaee6 | ||
|
|
32991d0273 | ||
|
|
c4826bf1f3 | ||
|
|
1afbe28cc9 | ||
|
|
d28aba759f | ||
|
|
80c0fb2f23 | ||
|
|
99c2b0ab3b | ||
|
|
9f46d1ea9c | ||
|
|
d4c36cab72 | ||
|
|
5ec26d101c | ||
|
|
c5732b0899 | ||
|
|
fb442b39fa | ||
|
|
afb0430f30 | ||
|
|
7bb6d0ab89 | ||
|
|
9d85b77ef0 | ||
|
|
2b55752eb3 | ||
|
|
c45df3444c | ||
|
|
cc30cda7cc | ||
|
|
de0ee2e438 | ||
|
|
1000b0cafa | ||
|
|
9a10f4a9e7 | ||
|
|
6cb52df017 | ||
|
|
e1f8897150 | ||
|
|
aa8a6d18ae | ||
|
|
d70b54480d | ||
|
|
d2eb7b9795 | ||
|
|
e7aca45a9f | ||
|
|
7752d3ada5 | ||
|
|
4cfd3da983 | ||
|
|
1ea1ae3199 | ||
|
|
2b29b121e0 | ||
|
|
5c9868c435 | ||
|
|
6c0a111c09 | ||
|
|
4cbf8ca553 | ||
|
|
5aefd3e4e1 | ||
|
|
8bb5287605 | ||
|
|
0c2478cc70 | ||
|
|
06cda8303d | ||
|
|
3c45b639cb | ||
|
|
aa77115da8 | ||
|
|
5c42895bb2 | ||
|
|
67668ccc27 | ||
|
|
cdf01bb966 | ||
|
|
178665610c | ||
|
|
13a7b65f6d | ||
|
|
26ba52bcd2 | ||
|
|
9e4d14f686 | ||
|
|
5ecabfee07 | ||
|
|
caa9fe276e | ||
|
|
80f1a65a71 | ||
|
|
2adf0cc1e8 | ||
|
|
1ca6766402 | ||
|
|
08b6e1d6d9 | ||
|
|
efd06290d8 | ||
|
|
2f4bc7bb05 | ||
|
|
147e4bb079 | ||
|
|
749084539e | ||
|
|
87add0fa93 | ||
|
|
98039b533f | ||
|
|
1d2d68ed54 | ||
|
|
18c9457948 | ||
|
|
bb3683d8fb | ||
|
|
6dd8a4a24c | ||
|
|
a2acf1dd90 | ||
|
|
b34959ba1d | ||
|
|
2b40623f83 | ||
|
|
faa73b7697 | ||
|
|
d40b2326f7 | ||
|
|
57c6c18d8b | ||
|
|
f4b2aaf84e | ||
|
|
f253b75a45 | ||
|
|
b15886e089 | ||
|
|
e78778e82c | ||
|
|
d957774436 | ||
|
|
1722cbf067 | ||
|
|
c394b38c76 | ||
|
|
baafe8b4e5 | ||
|
|
78247fafab | ||
|
|
f7055fbc10 | ||
|
|
54a46e8a3e | ||
|
|
3ffcec4a71 | ||
|
|
3af6532904 | ||
|
|
f879005e76 | ||
|
|
af3f28752a | ||
|
|
240a643111 | ||
|
|
bf951db63c | ||
|
|
54b54a2367 | ||
|
|
5a9855a9f6 | ||
|
|
3e3553b2ce | ||
|
|
e90788e232 | ||
|
|
c7ed43cf8d | ||
|
|
a8ca882e07 | ||
|
|
0e48faf7a3 | ||
|
|
51e12e9683 | ||
|
|
0ec4548a6b | ||
|
|
c72d51ad1e | ||
|
|
1747f8f8be | ||
|
|
6fbd17291a | ||
|
|
e1ec4b8878 | ||
|
|
1d08ae6af6 | ||
|
|
c596b3a828 | ||
|
|
846c689088 | ||
|
|
84dc8358a7 | ||
|
|
86092b18a2 | ||
|
|
c968117ed1 | ||
|
|
ef884f4be7 | ||
|
|
5bf97fcf1a | ||
|
|
c0967ce23e | ||
|
|
de0e4c5aae | ||
|
|
01094b8d9e | ||
|
|
7af197ad80 | ||
|
|
136a49801e | ||
|
|
d603742172 | ||
|
|
cdf8ac1ffc | ||
|
|
8d5c2c7ea1 | ||
|
|
d075ad4c24 | ||
|
|
4e1c18fff2 | ||
|
|
a2e9683ba3 | ||
|
|
f7444171e3 | ||
|
|
fdea13bf84 | ||
|
|
a06df405fc | ||
|
|
70515d28d4 | ||
|
|
37c25d3baf | ||
|
|
75802ffa8e | ||
|
|
5a35d4f4d8 | ||
|
|
9958f33b60 | ||
|
|
c1e9b308a1 | ||
|
|
6ef4fe82da | ||
|
|
8f287ceeec | ||
|
|
12b4a77f1f | ||
|
|
38dd74b188 | ||
|
|
e3db1e11cc | ||
|
|
0d9d2fccfb | ||
|
|
c84463e3c2 | ||
|
|
619cfad47c | ||
|
|
17408d5d4e | ||
|
|
04daaeaf7f | ||
|
|
92456f1da6 | ||
|
|
38909a69a6 | ||
|
|
26a1629dee | ||
|
|
cc5c1854e2 | ||
|
|
fccad08fb0 | ||
|
|
0d156994b4 | ||
|
|
dd1eb94beb | ||
|
|
b53f169a4f | ||
|
|
ce9bcefb88 | ||
|
|
ab60c56e88 | ||
|
|
32e4815cbe | ||
|
|
a8ee358150 | ||
|
|
302350fe2c | ||
|
|
2f323046d3 | ||
|
|
3dad8bfb5c | ||
|
|
f8624c8997 | ||
|
|
9d8e214ae3 | ||
|
|
15bbbec1db | ||
|
|
00a3dfb958 | ||
|
|
12c9e79bf2 | ||
|
|
39cd33efd4 | ||
|
|
ce5c98b78d | ||
|
|
053c440415 | ||
|
|
d477865e9a | ||
|
|
a7e0859b8d | ||
|
|
ed593d3ae1 | ||
|
|
d973d2bee5 | ||
|
|
90c3d3bef3 | ||
|
|
d583b9ce08 | ||
|
|
46792b3dc6 | ||
|
|
1739a4686e | ||
|
|
28257af738 | ||
|
|
50fb3d2557 | ||
|
|
3f0d4641b1 | ||
|
|
b2fcdd1762 | ||
|
|
99706b868b | ||
|
|
dfe3311323 | ||
|
|
6a04ed7431 | ||
|
|
32ab5c7451 | ||
|
|
b6403208f1 | ||
|
|
fcaa1eacaf | ||
|
|
97c4fbddde | ||
|
|
ed9e7ee558 | ||
|
|
618c304a87 | ||
|
|
cc311c2a1a | ||
|
|
fda7f55231 | ||
|
|
fe5724ef82 | ||
|
|
1a0ba48b51 | ||
|
|
713d55b4eb | ||
|
|
59d6d6907a | ||
|
|
020178f780 | ||
|
|
a2242fe018 | ||
|
|
ef6d1007e6 | ||
|
|
9971facf90 | ||
|
|
3a0070612a | ||
|
|
8f415d4fe6 | ||
|
|
f438e6c063 | ||
|
|
1e086cf00a | ||
|
|
d166e3329a | ||
|
|
4db49c0896 | ||
|
|
12806268d4 | ||
|
|
39d37640cc | ||
|
|
d771df9b09 | ||
|
|
44af7bf03c | ||
|
|
07e473bad0 | ||
|
|
19d417e84b | ||
|
|
c898f62d69 | ||
|
|
d69f6eef40 | ||
|
|
affd9fe889 | ||
|
|
90ebbd86ee | ||
|
|
50a1aa3bbc | ||
|
|
270dacf1e5 | ||
|
|
4a4df3c2a4 | ||
|
|
4d7598e805 | ||
|
|
94d407ffb7 | ||
|
|
3291e52cc6 | ||
|
|
f576af8f11 | ||
|
|
eee7231737 | ||
|
|
e7455256a7 | ||
|
|
2a026947c4 | ||
|
|
12795451e6 | ||
|
|
c9802401fb | ||
|
|
5a12e3c967 | ||
|
|
a02e3714d0 | ||
|
|
84f99dc919 | ||
|
|
163f46b4cf | ||
|
|
7b1d269986 | ||
|
|
386d0793aa | ||
|
|
dc3360a97d | ||
|
|
6ab9a9b350 | ||
|
|
e3f971f62c | ||
|
|
3a718acb50 | ||
|
|
2e09f532b9 | ||
|
|
c39185e35c | ||
|
|
eee271278a | ||
|
|
e7077aae63 | ||
|
|
78a6efd02f | ||
|
|
73b3cc9e75 | ||
|
|
ef6f75c8a8 | ||
|
|
3bed978b89 | ||
|
|
dcab86b1ed | ||
|
|
7cf9ac8d4c | ||
|
|
e63cf8554e | ||
|
|
d7e4dfda41 | ||
|
|
9c92fcd854 | ||
|
|
7768c5f7f5 | ||
|
|
58e87e8787 | ||
|
|
b176bc3d00 | ||
|
|
3c13462618 | ||
|
|
68a41d4582 | ||
|
|
60e93e0ab3 | ||
|
|
9fb5c62b75 | ||
|
|
352e51170d | ||
|
|
fc64762bfe | ||
|
|
fe34c63697 | ||
|
|
02d96741e8 | ||
|
|
d8b27a31d2 | ||
|
|
4fcd3a4c60 | ||
|
|
fd1868ed46 | ||
|
|
7250e1f460 | ||
|
|
1e0a490a69 | ||
|
|
bfedb389b8 | ||
|
|
0a2fdd0b74 | ||
|
|
a2959f9b29 | ||
|
|
cd99390ba7 | ||
|
|
388e2dfc52 | ||
|
|
47e09afa73 | ||
|
|
cdef686ec4 | ||
|
|
be21cf40cb | ||
|
|
4eb817375c | ||
|
|
5a623c18d0 | ||
|
|
63ca1074fc | ||
|
|
9a70b774ab | ||
|
|
ea385c2853 | ||
|
|
f9604bc858 | ||
|
|
65a37363e6 | ||
|
|
2879a89594 | ||
|
|
6bc88394cd | ||
|
|
f17d56c603 | ||
|
|
2253db1abb | ||
|
|
c362953775 | ||
|
|
6ea2989d69 | ||
|
|
ea90db4fe6 | ||
|
|
2b1a18be6a | ||
|
|
40ad7470aa | ||
|
|
89d1d0944a | ||
|
|
73e13263fc | ||
|
|
60ddd31101 | ||
|
|
ee4a680d6d | ||
|
|
2f61367fcb | ||
|
|
c7b1c97d68 | ||
|
|
ed30f6b861 | ||
|
|
5ea8c5f09a | ||
|
|
d1cf5ecc52 | ||
|
|
a85abf0ecd | ||
|
|
caca3dd489 | ||
|
|
39853c77fe | ||
|
|
f149b66322 | ||
|
|
0ea4a7ad6f | ||
|
|
729a6bac7c | ||
|
|
be8aa3691e | ||
|
|
cfa0638b94 | ||
|
|
ff1a25b41f | ||
|
|
a0cfb65b56 | ||
|
|
77428c0515 | ||
|
|
34d6ae6658 | ||
|
|
f339360fbc | ||
|
|
f23c38cc3c | ||
|
|
fdf1559f09 | ||
|
|
556e33d56f | ||
|
|
c980d53543 | ||
|
|
c8cfc1c5fc | ||
|
|
a7904ca74e | ||
|
|
6cc3d71acf | ||
|
|
23827f4ffa | ||
|
|
67050e6a67 | ||
|
|
0943608bd8 | ||
|
|
f1aa61bf3b | ||
|
|
691a16e9ad | ||
|
|
0a3a307d39 | ||
| 6632149f42 | |||
|
|
2eaaa87b72 | ||
|
|
c005d19fa8 | ||
|
|
b5595d9855 | ||
|
|
aef7c2657d | ||
|
|
ecd897b4ac | ||
|
|
2eb0ee39fb | ||
|
|
130814d206 | ||
|
|
0576fb5bd4 | ||
|
|
298d5e9848 | ||
|
|
3ac572edeb | ||
|
|
ac33cd4524 | ||
|
|
ea39199201 | ||
|
|
b204858a90 | ||
|
|
f3427e77ba | ||
|
|
7b0fe25650 | ||
|
|
af82d9a78a | ||
|
|
3e311e5aec | ||
|
|
95349eaa5b | ||
|
|
22062c2a6e | ||
|
|
72846f4733 | ||
|
|
c056b45184 | ||
|
|
9dd0bd9897 | ||
|
|
4dd68a06e8 | ||
|
|
db9165295f | ||
|
|
8fe0e02e64 | ||
|
|
20964df102 | ||
|
|
2495fbfdef | ||
|
|
6e7a83d473 | ||
|
|
87cbdeeefc | ||
|
|
a90f1017f7 | ||
|
|
588d03ad8f | ||
|
|
b58561eb78 | ||
|
|
8e71f570c4 | ||
|
|
167d465033 | ||
|
|
9106dc7646 | ||
|
|
a94bb60ca9 | ||
|
|
2f24c704ba | ||
|
|
0ce21bac73 | ||
|
|
b620477446 | ||
|
|
0df96fe804 | ||
|
|
f50753c07c | ||
|
|
e6ff16ce8c | ||
|
|
0ae2ec4a27 | ||
|
|
1b6aeefb49 | ||
|
|
75bbeaa9d1 | ||
|
|
5033bdde20 | ||
|
|
83fb3f14d8 | ||
|
|
b192f6ee16 | ||
|
|
52eb850a7e | ||
|
|
099dbe4a80 | ||
|
|
14aff8ce2e | ||
|
|
2db1eb664b | ||
|
|
04a3533431 | ||
|
|
608f0c9d7b | ||
|
|
810c6b9f95 | ||
|
|
917784b4cb | ||
|
|
faeb24bb90 | ||
|
|
7b7983de13 | ||
|
|
a8054e2aeb | ||
|
|
bba00a1c3f | ||
|
|
009a99418f | ||
|
|
840f194195 | ||
|
|
2df69cebce | ||
|
|
5614337bdc | ||
|
|
b09d97eebd | ||
|
|
80f7a73573 | ||
|
|
c649ee2b40 | ||
|
|
fc9e5d8b5b | ||
|
|
dee231c700 | ||
|
|
0548e383ce | ||
|
|
34d97c3c65 | ||
|
|
070854b888 | ||
|
|
3b09306868 | ||
|
|
05e803c620 | ||
|
|
55ea909322 | ||
|
|
7cda2e1354 | ||
|
|
f45f38738d | ||
|
|
9ed104eb7c | ||
|
|
9407f1d23e | ||
|
|
15866b4f53 | ||
|
|
473165e4ad | ||
|
|
288af4b64c | ||
|
|
bbce4fbd08 | ||
|
|
f08da5b670 | ||
|
|
45b0426757 | ||
|
|
67f3e21779 | ||
|
|
14f6a481f5 | ||
|
|
c165a537a0 | ||
|
|
2854479b97 | ||
|
|
885cf48ce4 | ||
|
|
417aec53df |
29
.gitignore
vendored
@ -1,4 +1,25 @@
|
|||||||
/build/
|
/build/
|
||||||
/data/dlls/
|
/data/dlls/
|
||||||
/data/fastfiles/
|
/data/fastfiles/
|
||||||
*.pro.user
|
/releases/
|
||||||
|
|
||||||
|
.vscode/*
|
||||||
|
.qmake.stash
|
||||||
|
|
||||||
|
# Ignore Qt Creator user files
|
||||||
|
*.pro.user
|
||||||
|
*.pro.user.*
|
||||||
|
*.qbs.user
|
||||||
|
*.qbs.user.*
|
||||||
|
*.creator.user
|
||||||
|
*.creator.user.*
|
||||||
|
*.creator.*
|
||||||
|
*.ps1
|
||||||
|
version.txt
|
||||||
|
*.autosave
|
||||||
|
*.XMODEL_EXPORT
|
||||||
|
data/obj/*
|
||||||
|
libs/*/release/*
|
||||||
|
libs/*/debug/*
|
||||||
|
.git.stash
|
||||||
|
*Makefile*
|
||||||
|
|||||||
82
XPlor.pro
@ -1,72 +1,10 @@
|
|||||||
QT += core gui 3dcore 3drender 3dinput 3dextras
|
TEMPLATE = subdirs
|
||||||
|
|
||||||
RC_ICONS = XPlor.ico
|
SUBDIRS += libs \
|
||||||
|
app \
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
#tools \
|
||||||
|
#tests
|
||||||
CONFIG += c++17
|
|
||||||
|
#tests.depends = libs
|
||||||
SOURCES += \
|
app.depends = libs
|
||||||
aboutdialog.cpp \
|
#tools.depends = libs
|
||||||
ddsfile.cpp \
|
|
||||||
ddsviewer.cpp \
|
|
||||||
fastfile.cpp \
|
|
||||||
fastfileviewer.cpp \
|
|
||||||
imagewidget.cpp \
|
|
||||||
iwifile.cpp \
|
|
||||||
iwiviewer.cpp \
|
|
||||||
localstringviewer.cpp \
|
|
||||||
lzokay.cpp \
|
|
||||||
main.cpp \
|
|
||||||
mainwindow.cpp \
|
|
||||||
modelviewer.cpp \
|
|
||||||
iwifile.cpp \
|
|
||||||
techsetviewer.cpp \
|
|
||||||
xtreewidget.cpp \
|
|
||||||
zonefile.cpp \
|
|
||||||
zonefileviewer.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
aboutdialog.h \
|
|
||||||
asset_structs.h \
|
|
||||||
compressor.h \
|
|
||||||
d3dbsp_structs.h \
|
|
||||||
dds_structs.h \
|
|
||||||
ddsfile.h \
|
|
||||||
ddsviewer.h \
|
|
||||||
enums.h \
|
|
||||||
fastfile.h \
|
|
||||||
fastfileviewer.h \
|
|
||||||
imagewidget.h \
|
|
||||||
ipak_structs.h \
|
|
||||||
iwifile.h \
|
|
||||||
iwiviewer.h \
|
|
||||||
localstringviewer.h \
|
|
||||||
lzokay.hpp \
|
|
||||||
lzx.h \
|
|
||||||
mainwindow.h \
|
|
||||||
modelviewer.h \
|
|
||||||
techsetviewer.h \
|
|
||||||
utils.h \
|
|
||||||
xtreewidget.h \
|
|
||||||
iwifile.h \
|
|
||||||
zonefile.h \
|
|
||||||
zonefileviewer.h
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
aboutdialog.ui \
|
|
||||||
ddsviewer.ui \
|
|
||||||
fastfileviewer.ui \
|
|
||||||
imagewidget.ui \
|
|
||||||
iwiviewer.ui \
|
|
||||||
localstringviewer.ui \
|
|
||||||
mainwindow.ui \
|
|
||||||
techsetviewer.ui \
|
|
||||||
zonefileviewer.ui
|
|
||||||
|
|
||||||
RESOURCES += \
|
|
||||||
data/Data.qrc
|
|
||||||
|
|
||||||
LIBS += -L$$PWD/DevILSDK/lib/x64/Unicode/Release -lDevIL
|
|
||||||
LIBS += -L$$PWD/DevILSDK/lib/x64/Unicode/Release -lILU
|
|
||||||
LIBS += -L$$PWD/DevILSDK/lib/x64/Unicode/Release -lILUT
|
|
||||||
|
|||||||
36
ai-commit.sh
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# 1. Stage everything
|
||||||
|
git add -A
|
||||||
|
|
||||||
|
# 2. Get list of staged files
|
||||||
|
FILES=$(git diff --cached --name-only)
|
||||||
|
|
||||||
|
if [ -z "$FILES" ]; then
|
||||||
|
echo "No changes to commit."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 3. Loop file by file
|
||||||
|
for FILE in $FILES; do
|
||||||
|
# Get diff for this file
|
||||||
|
DIFF=$(git diff --cached -- "$FILE")
|
||||||
|
|
||||||
|
if [ -z "$DIFF" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ask Ollama for a commit message describing this file change
|
||||||
|
MSG=$(echo "$DIFF" | ollama run gemma3 \
|
||||||
|
"You are a commit bot. Write a SHORT, clear, concise Git commit message for changes in file: $FILE.
|
||||||
|
Only output the commit message, nothing else.
|
||||||
|
Diff:
|
||||||
|
$DIFF")
|
||||||
|
|
||||||
|
# Commit just this file with its message
|
||||||
|
git commit -m "$MSG" -- "$FILE"
|
||||||
|
|
||||||
|
echo "✅ Committed $FILE with message:"
|
||||||
|
echo "$MSG"
|
||||||
|
done
|
||||||
@ -1,201 +1,201 @@
|
|||||||
Apache License
|
Apache License
|
||||||
Version 2.0, January 2004
|
Version 2.0, January 2004
|
||||||
http://www.apache.org/licenses/
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
1. Definitions.
|
1. Definitions.
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
the copyright owner that is granting the License.
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
other entities that control, are controlled by, or are under common
|
other entities that control, are controlled by, or are under common
|
||||||
control with that entity. For the purposes of this definition,
|
control with that entity. For the purposes of this definition,
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
direction or management of such entity, whether by contract or
|
direction or management of such entity, whether by contract or
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
exercising permissions granted by this License.
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
including but not limited to software source code, documentation
|
including but not limited to software source code, documentation
|
||||||
source, and configuration files.
|
source, and configuration files.
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
"Object" form shall mean any form resulting from mechanical
|
||||||
transformation or translation of a Source form, including but
|
transformation or translation of a Source form, including but
|
||||||
not limited to compiled object code, generated documentation,
|
not limited to compiled object code, generated documentation,
|
||||||
and conversions to other media types.
|
and conversions to other media types.
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
Object form, made available under the License, as indicated by a
|
Object form, made available under the License, as indicated by a
|
||||||
copyright notice that is included in or attached to the work
|
copyright notice that is included in or attached to the work
|
||||||
(an example is provided in the Appendix below).
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
form, that is based on (or derived from) the Work and for which the
|
form, that is based on (or derived from) the Work and for which the
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
of this License, Derivative Works shall not include works that remain
|
of this License, Derivative Works shall not include works that remain
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
the Work and Derivative Works thereof.
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
"Contribution" shall mean any work of authorship, including
|
||||||
the original version of the Work and any modifications or additions
|
the original version of the Work and any modifications or additions
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
means any form of electronic, verbal, or written communication sent
|
means any form of electronic, verbal, or written communication sent
|
||||||
to the Licensor or its representatives, including but not limited to
|
to the Licensor or its representatives, including but not limited to
|
||||||
communication on electronic mailing lists, source code control systems,
|
communication on electronic mailing lists, source code control systems,
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
excluding communication that is conspicuously marked or otherwise
|
excluding communication that is conspicuously marked or otherwise
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
subsequently incorporated within the Work.
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
Work and such Derivative Works in Source or Object form.
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
(except as stated in this section) patent license to make, have made,
|
(except as stated in this section) patent license to make, have made,
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
where such license applies only to those patent claims licensable
|
where such license applies only to those patent claims licensable
|
||||||
by such Contributor that are necessarily infringed by their
|
by such Contributor that are necessarily infringed by their
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
institute patent litigation against any entity (including a
|
institute patent litigation against any entity (including a
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
or contributory patent infringement, then any patent licenses
|
or contributory patent infringement, then any patent licenses
|
||||||
granted to You under this License for that Work shall terminate
|
granted to You under this License for that Work shall terminate
|
||||||
as of the date such litigation is filed.
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
modifications, and in Source or Object form, provided that You
|
modifications, and in Source or Object form, provided that You
|
||||||
meet the following conditions:
|
meet the following conditions:
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
(a) You must give any other recipients of the Work or
|
||||||
Derivative Works a copy of this License; and
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
(b) You must cause any modified files to carry prominent notices
|
||||||
stating that You changed the files; and
|
stating that You changed the files; and
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
that You distribute, all copyright, patent, trademark, and
|
that You distribute, all copyright, patent, trademark, and
|
||||||
attribution notices from the Source form of the Work,
|
attribution notices from the Source form of the Work,
|
||||||
excluding those notices that do not pertain to any part of
|
excluding those notices that do not pertain to any part of
|
||||||
the Derivative Works; and
|
the Derivative Works; and
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
distribution, then any Derivative Works that You distribute must
|
distribution, then any Derivative Works that You distribute must
|
||||||
include a readable copy of the attribution notices contained
|
include a readable copy of the attribution notices contained
|
||||||
within such NOTICE file, excluding those notices that do not
|
within such NOTICE file, excluding those notices that do not
|
||||||
pertain to any part of the Derivative Works, in at least one
|
pertain to any part of the Derivative Works, in at least one
|
||||||
of the following places: within a NOTICE text file distributed
|
of the following places: within a NOTICE text file distributed
|
||||||
as part of the Derivative Works; within the Source form or
|
as part of the Derivative Works; within the Source form or
|
||||||
documentation, if provided along with the Derivative Works; or,
|
documentation, if provided along with the Derivative Works; or,
|
||||||
within a display generated by the Derivative Works, if and
|
within a display generated by the Derivative Works, if and
|
||||||
wherever such third-party notices normally appear. The contents
|
wherever such third-party notices normally appear. The contents
|
||||||
of the NOTICE file are for informational purposes only and
|
of the NOTICE file are for informational purposes only and
|
||||||
do not modify the License. You may add Your own attribution
|
do not modify the License. You may add Your own attribution
|
||||||
notices within Derivative Works that You distribute, alongside
|
notices within Derivative Works that You distribute, alongside
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
that such additional attribution notices cannot be construed
|
that such additional attribution notices cannot be construed
|
||||||
as modifying the License.
|
as modifying the License.
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
You may add Your own copyright statement to Your modifications and
|
||||||
may provide additional or different license terms and conditions
|
may provide additional or different license terms and conditions
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
the conditions stated in this License.
|
the conditions stated in this License.
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
this License, without any additional terms or conditions.
|
this License, without any additional terms or conditions.
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
the terms of any separate license agreement you may have executed
|
the terms of any separate license agreement you may have executed
|
||||||
with Licensor regarding such Contributions.
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
except as required for reasonable and customary use in describing the
|
except as required for reasonable and customary use in describing the
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
implied, including, without limitation, any warranties or conditions
|
implied, including, without limitation, any warranties or conditions
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
appropriateness of using or redistributing the Work and assume any
|
appropriateness of using or redistributing the Work and assume any
|
||||||
risks associated with Your exercise of permissions under this License.
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
unless required by applicable law (such as deliberate and grossly
|
unless required by applicable law (such as deliberate and grossly
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
liable to You for damages, including any direct, indirect, special,
|
liable to You for damages, including any direct, indirect, special,
|
||||||
incidental, or consequential damages of any character arising as a
|
incidental, or consequential damages of any character arising as a
|
||||||
result of this License or out of the use or inability to use the
|
result of this License or out of the use or inability to use the
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
other commercial damages or losses), even if such Contributor
|
other commercial damages or losses), even if such Contributor
|
||||||
has been advised of the possibility of such damages.
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
or other liability obligations and/or rights consistent with this
|
or other liability obligations and/or rights consistent with this
|
||||||
License. However, in accepting such obligations, You may act only
|
License. However, in accepting such obligations, You may act only
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
defend, and hold each Contributor harmless for any liability
|
defend, and hold each Contributor harmless for any liability
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
of your accepting any such warranty or additional liability.
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
To apply the Apache License to your work, attach the following
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
replaced with your own identifying information. (Don't include
|
replaced with your own identifying information. (Don't include
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
comment syntax for the file format. We also recommend that a
|
comment syntax for the file format. We also recommend that a
|
||||||
file or class name and description of purpose be included on the
|
file or class name and description of purpose be included on the
|
||||||
same "printed page" as the copyright notice for easier
|
same "printed page" as the copyright notice for easier
|
||||||
identification within third-party archives.
|
identification within third-party archives.
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
@ -1,14 +1,14 @@
|
|||||||
#include "aboutdialog.h"
|
#include "aboutdialog.h"
|
||||||
#include "ui_aboutdialog.h"
|
#include "ui_aboutdialog.h"
|
||||||
|
|
||||||
AboutDialog::AboutDialog(QWidget *parent)
|
AboutDialog::AboutDialog(QWidget *parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
, ui(new Ui::AboutDialog)
|
, ui(new Ui::AboutDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
AboutDialog::~AboutDialog()
|
AboutDialog::~AboutDialog()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
@ -1,22 +1,22 @@
|
|||||||
#ifndef ABOUTDIALOG_H
|
#ifndef ABOUTDIALOG_H
|
||||||
#define ABOUTDIALOG_H
|
#define ABOUTDIALOG_H
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class AboutDialog;
|
class AboutDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
class AboutDialog : public QDialog
|
class AboutDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit AboutDialog(QWidget *parent = nullptr);
|
explicit AboutDialog(QWidget *parent = nullptr);
|
||||||
~AboutDialog();
|
~AboutDialog();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::AboutDialog *ui;
|
Ui::AboutDialog *ui;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ABOUTDIALOG_H
|
#endif // ABOUTDIALOG_H
|
||||||
@ -1,241 +1,241 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>AboutDialog</class>
|
<class>AboutDialog</class>
|
||||||
<widget class="QDialog" name="AboutDialog">
|
<widget class="QDialog" name="AboutDialog">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>350</width>
|
<width>350</width>
|
||||||
<height>200</height>
|
<height>200</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>350</width>
|
<width>350</width>
|
||||||
<height>200</height>
|
<height>200</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>350</width>
|
<width>350</width>
|
||||||
<height>200</height>
|
<height>200</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>About XPlor</string>
|
<string>About XPlor</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>80</width>
|
<width>80</width>
|
||||||
<height>80</height>
|
<height>80</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>80</width>
|
<width>80</width>
|
||||||
<height>80</height>
|
<height>80</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="pixmap">
|
<property name="pixmap">
|
||||||
<pixmap resource="Data.qrc">:/images/data/images/XPlor.png</pixmap>
|
<pixmap resource="Data.qrc">:/images/data/images/XPlor.png</pixmap>
|
||||||
</property>
|
</property>
|
||||||
<property name="scaledContents">
|
<property name="scaledContents">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>40</height>
|
<height>40</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Roboto</family>
|
<family>Roboto</family>
|
||||||
<pointsize>16</pointsize>
|
<pointsize>16</pointsize>
|
||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>XPlor v1.5</string>
|
<string>XPlor v1.5</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Roboto</family>
|
<family>Roboto</family>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Copyright © 2024 RedLine Solutions LLC</string>
|
<string>Copyright © 2024 RedLine Solutions LLC</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Roboto</family>
|
<family>Roboto</family>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>For more, check out redline.llc</string>
|
<string>For more, check out redline.llc</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_3">
|
<spacer name="verticalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
<property name="sizeType">
|
||||||
<enum>QSizePolicy::Policy::Fixed</enum>
|
<enum>QSizePolicy::Policy::Fixed</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>10</height>
|
<height>10</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_6">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Roboto</family>
|
<family>Roboto</family>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>With Help From:</string>
|
<string>With Help From:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_9">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Roboto</family>
|
<family>Roboto</family>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>- Paging Red</string>
|
<string>- Paging Red</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_8">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Roboto</family>
|
<family>Roboto</family>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>- ISOCheated</string>
|
<string>- ISOCheated</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_7">
|
<widget class="QLabel" name="label_7">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Roboto</family>
|
<family>Roboto</family>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>- SureShotIan</string>
|
<string>- SureShotIan</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_2">
|
<spacer name="verticalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>40</height>
|
<height>40</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="Data.qrc"/>
|
<include location="Data.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
61
app/app.pro
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
QT += core widgets gui multimedia
|
||||||
|
|
||||||
|
RC_ICONS = app.ico
|
||||||
|
|
||||||
|
SUBDIRS += app
|
||||||
|
|
||||||
|
CONFIG += c++17
|
||||||
|
|
||||||
|
SOURCES += $$files($$PWD/*.cpp)
|
||||||
|
HEADERS += $$files($$PWD/*.h)
|
||||||
|
FORMS += $$files($$PWD/*.ui)
|
||||||
|
|
||||||
|
RESOURCES += ../data/data.qrc
|
||||||
|
|
||||||
|
LIBS += \
|
||||||
|
-L$$PWD/../third_party/devil_sdk/lib/ -lDevIL -lILU -lILUT \
|
||||||
|
-L$$PWD/../third_party/zlib/lib/ -lzlib \
|
||||||
|
-L$$PWD/../third_party/xbox_sdk/lib -lxcompress64 \
|
||||||
|
-L$$OUT_PWD/../libs/ -lcore \
|
||||||
|
-L$$OUT_PWD/../libs/ -lxassets\
|
||||||
|
-L$$OUT_PWD/../libs/ -lcompression \
|
||||||
|
-L$$OUT_PWD/../libs/ -lencryption \
|
||||||
|
-L$$OUT_PWD/../libs/ -lfastfile \
|
||||||
|
-L$$OUT_PWD/../libs/ -lddsfile \
|
||||||
|
-L$$OUT_PWD/../libs/ -lipakfile \
|
||||||
|
-L$$OUT_PWD/../libs/ -liwifile \
|
||||||
|
-L$$OUT_PWD/../libs/ -lzonefile
|
||||||
|
|
||||||
|
INCLUDEPATH += \
|
||||||
|
$$PWD/../third_party/devil_sdk/include/ \
|
||||||
|
$$PWD/../third_party/zlib/include \
|
||||||
|
$$PWD/../third_party/xbox_sdk/include \
|
||||||
|
$$PWD/../libs/core \
|
||||||
|
$$PWD/../libs/compression \
|
||||||
|
$$PWD/../libs/encryption \
|
||||||
|
$$PWD/../libs/fastfile \
|
||||||
|
$$PWD/../libs/ddsfile \
|
||||||
|
$$PWD/../libs/ipakfile \
|
||||||
|
$$PWD/../libs/iwifile \
|
||||||
|
$$PWD/../libs/xassets \
|
||||||
|
$$PWD/../libs/zonefile
|
||||||
|
|
||||||
|
DEPENDPATH += \
|
||||||
|
$$PWD/../third_party/devil_sdk/include/ \
|
||||||
|
$$PWD/../third_party/zlib/include \
|
||||||
|
$$PWD/../third_party/xbox_sdk/include \
|
||||||
|
$$PWD/../libs/core \
|
||||||
|
$$PWD/../libs/compression \
|
||||||
|
$$PWD/../libs/encryption \
|
||||||
|
$$PWD/../libs/fastfile \
|
||||||
|
$$PWD/../libs/ddsfile \
|
||||||
|
$$PWD/../libs/ipakfile \
|
||||||
|
$$PWD/../libs/iwifile \
|
||||||
|
$$PWD/../libs/xassets \
|
||||||
|
$$PWD/../libs/zonefile
|
||||||
|
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
QMAKE_POST_LINK =
|
||||||
|
QMAKE_POST_LINK += for /D %%G in (\"$$PWD/../third_party/*/lib\") do copy /Y \"%%~G\*.dll\" \"$$OUT_PWD/$$DESTDIR/\" >NUL $$escape_expand(\\n\\t)
|
||||||
|
}
|
||||||
41
app/d3dbsp_structs.h
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#ifndef D3DBSP_STRUCTS_H
|
||||||
|
#define D3DBSP_STRUCTS_H
|
||||||
|
|
||||||
|
#include <QByteArray>
|
||||||
|
|
||||||
|
// Define Lump Structure
|
||||||
|
struct Lump {
|
||||||
|
QByteArray content;
|
||||||
|
quint32 size = 0;
|
||||||
|
bool isEmpty = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Lump Index Entry Structure
|
||||||
|
struct LumpIndexEntry {
|
||||||
|
quint32 type;
|
||||||
|
quint32 length;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Bink structure definitions
|
||||||
|
struct BINKRECT {
|
||||||
|
int Left;
|
||||||
|
int Top;
|
||||||
|
int Width;
|
||||||
|
int Height;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct BINK {
|
||||||
|
int Width;
|
||||||
|
int Height;
|
||||||
|
uint32_t Frames;
|
||||||
|
uint32_t FrameNum;
|
||||||
|
uint32_t FrameRate;
|
||||||
|
uint32_t FrameRateDiv;
|
||||||
|
uint32_t ReadError;
|
||||||
|
uint32_t OpenFlags;
|
||||||
|
BINKRECT FrameRects;
|
||||||
|
uint32_t NumRects;
|
||||||
|
uint32_t FrameChangePercent;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // D3DBSP_STRUCTS_H
|
||||||
@ -1,182 +1,182 @@
|
|||||||
#include "ddsviewer.h"
|
#include "ddsviewer.h"
|
||||||
#include "enums.h"
|
#include "enums.h"
|
||||||
#include "ui_ddsviewer.h"
|
#include "ui_ddsviewer.h"
|
||||||
|
|
||||||
DDSViewer::DDSViewer(QWidget *parent)
|
DDSViewer::DDSViewer(QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, ui(new Ui::DDSViewer)
|
, ui(new Ui::DDSViewer)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
mDDSFile = nullptr;
|
mDDSFile = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
DDSViewer::~DDSViewer() {
|
DDSViewer::~DDSViewer() {
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DDSViewer::SetDDSFile(std::shared_ptr<DDSFile> aDDSFile) {
|
void DDSViewer::SetDDSFile(const DDSFile* aDDSFile) {
|
||||||
mDDSFile.swap(aDDSFile);
|
mDDSFile = aDDSFile;
|
||||||
|
|
||||||
ui->label_Title->setText(mDDSFile->fileStem + ".dds");
|
ui->label_Title->setText(mDDSFile->fileStem + ".dds");
|
||||||
|
|
||||||
char magicData[5];
|
char magicData[5];
|
||||||
magicData[0] = static_cast<char>(mDDSFile->header.magic & 0xFF);
|
magicData[0] = static_cast<char>(mDDSFile->header.magic & 0xFF);
|
||||||
magicData[1] = static_cast<char>((mDDSFile->header.magic >> 8) & 0xFF);
|
magicData[1] = static_cast<char>((mDDSFile->header.magic >> 8) & 0xFF);
|
||||||
magicData[2] = static_cast<char>((mDDSFile->header.magic >> 16) & 0xFF);
|
magicData[2] = static_cast<char>((mDDSFile->header.magic >> 16) & 0xFF);
|
||||||
magicData[3] = static_cast<char>((mDDSFile->header.magic >> 24) & 0xFF);
|
magicData[3] = static_cast<char>((mDDSFile->header.magic >> 24) & 0xFF);
|
||||||
magicData[4] = '\0';
|
magicData[4] = '\0';
|
||||||
|
|
||||||
// If you’re using Qt and want a QString:
|
// If you’re using Qt and want a QString:
|
||||||
QString magicStr = QString::fromLatin1(magicData);
|
QString magicStr = QString::fromLatin1(magicData);
|
||||||
ui->lineEdit_Magic->setText(magicStr);
|
ui->lineEdit_Magic->setText(magicStr);
|
||||||
ui->spinBox_Size->setValue(mDDSFile->header.size);
|
ui->spinBox_Size->setValue(mDDSFile->header.size);
|
||||||
|
|
||||||
ui->checkBox_CapsValid->setChecked((mDDSFile->header.flags & DDSD_CAPS) != 0);
|
ui->checkBox_CapsValid->setChecked((mDDSFile->header.flags & DDSD_CAPS) != 0);
|
||||||
ui->checkBox_HeightValid->setChecked((mDDSFile->header.flags & DDSD_HEIGHT) != 0);
|
ui->checkBox_HeightValid->setChecked((mDDSFile->header.flags & DDSD_HEIGHT) != 0);
|
||||||
ui->checkBox_WidthValid->setChecked((mDDSFile->header.flags & DDSD_WIDTH) != 0);
|
ui->checkBox_WidthValid->setChecked((mDDSFile->header.flags & DDSD_WIDTH) != 0);
|
||||||
ui->checkBox_PitchValid->setChecked((mDDSFile->header.flags & DDSD_PITCH) != 0);
|
ui->checkBox_PitchValid->setChecked((mDDSFile->header.flags & DDSD_PITCH) != 0);
|
||||||
ui->checkBox_PFValid->setChecked((mDDSFile->header.flags & DDSD_PIXELFORMAT) != 0);
|
ui->checkBox_PFValid->setChecked((mDDSFile->header.flags & DDSD_PIXELFORMAT) != 0);
|
||||||
ui->checkBox_MipmapCountValid->setChecked((mDDSFile->header.flags & DDSD_MIPMAPCOUNT) != 0);
|
ui->checkBox_MipmapCountValid->setChecked((mDDSFile->header.flags & DDSD_MIPMAPCOUNT) != 0);
|
||||||
ui->checkBox_LinearSizeValid->setChecked((mDDSFile->header.flags & DDSD_LINEARSIZE) != 0);
|
ui->checkBox_LinearSizeValid->setChecked((mDDSFile->header.flags & DDSD_LINEARSIZE) != 0);
|
||||||
ui->checkBox_DepthValid->setChecked((mDDSFile->header.flags & DDSD_DEPTH) != 0);
|
ui->checkBox_DepthValid->setChecked((mDDSFile->header.flags & DDSD_DEPTH) != 0);
|
||||||
|
|
||||||
ui->spinBox_PLSize->setValue(mDDSFile->header.pitchOrLinearSize);
|
ui->spinBox_PLSize->setValue(mDDSFile->header.pitchOrLinearSize);
|
||||||
ui->spinBox_Depth->setValue(mDDSFile->header.depth);
|
ui->spinBox_Depth->setValue(mDDSFile->header.depth);
|
||||||
ui->spinBox_Width->setValue(mDDSFile->header.width);
|
ui->spinBox_Width->setValue(mDDSFile->header.width);
|
||||||
ui->spinBox_Height->setValue(mDDSFile->header.height);
|
ui->spinBox_Height->setValue(mDDSFile->header.height);
|
||||||
ui->spinBox_MipmapCount->setValue(mDDSFile->header.mipMapCount);
|
ui->spinBox_MipmapCount->setValue(mDDSFile->header.mipMapCount);
|
||||||
|
|
||||||
ui->spinBox_Res1->setValue(mDDSFile->header.reserved1[0]);
|
ui->spinBox_Res1->setValue(mDDSFile->header.reserved1[0]);
|
||||||
ui->spinBox_Res2->setValue(mDDSFile->header.reserved1[1]);
|
ui->spinBox_Res2->setValue(mDDSFile->header.reserved1[1]);
|
||||||
ui->spinBox_Res3->setValue(mDDSFile->header.reserved1[2]);
|
ui->spinBox_Res3->setValue(mDDSFile->header.reserved1[2]);
|
||||||
ui->spinBox_Res4->setValue(mDDSFile->header.reserved1[3]);
|
ui->spinBox_Res4->setValue(mDDSFile->header.reserved1[3]);
|
||||||
ui->spinBox_Res5->setValue(mDDSFile->header.reserved1[4]);
|
ui->spinBox_Res5->setValue(mDDSFile->header.reserved1[4]);
|
||||||
ui->spinBox_Res6->setValue(mDDSFile->header.reserved1[5]);
|
ui->spinBox_Res6->setValue(mDDSFile->header.reserved1[5]);
|
||||||
ui->spinBox_Res7->setValue(mDDSFile->header.reserved1[6]);
|
ui->spinBox_Res7->setValue(mDDSFile->header.reserved1[6]);
|
||||||
ui->spinBox_Res8->setValue(mDDSFile->header.reserved1[7]);
|
ui->spinBox_Res8->setValue(mDDSFile->header.reserved1[7]);
|
||||||
ui->spinBox_Res9->setValue(mDDSFile->header.reserved1[8]);
|
ui->spinBox_Res9->setValue(mDDSFile->header.reserved1[8]);
|
||||||
ui->spinBox_Res10->setValue(mDDSFile->header.reserved1[9]);
|
ui->spinBox_Res10->setValue(mDDSFile->header.reserved1[9]);
|
||||||
ui->spinBox_Res11->setValue(mDDSFile->header.reserved1[10]);
|
ui->spinBox_Res11->setValue(mDDSFile->header.reserved1[10]);
|
||||||
|
|
||||||
ui->spinBox_Res12->setValue(mDDSFile->header.reserved2);
|
ui->spinBox_Res12->setValue(mDDSFile->header.reserved2);
|
||||||
|
|
||||||
ui->spinBox_PF_Size->setValue(mDDSFile->header.pixelFormat.size);
|
ui->spinBox_PF_Size->setValue(mDDSFile->header.pixelFormat.size);
|
||||||
|
|
||||||
ui->checkBox_PF_AlphaPxValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_ALPHAPIXELS) != 0);
|
ui->checkBox_PF_AlphaPxValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_ALPHAPIXELS) != 0);
|
||||||
ui->checkBox_PF_AlphaOnlyValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_ALPHA) != 0);
|
ui->checkBox_PF_AlphaOnlyValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_ALPHA) != 0);
|
||||||
ui->checkBox_PF_FormatValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_FOURCC) != 0);
|
ui->checkBox_PF_FormatValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_FOURCC) != 0);
|
||||||
ui->checkBox_PF_RGBValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_RGB) != 0);
|
ui->checkBox_PF_RGBValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_RGB) != 0);
|
||||||
ui->checkBox_PF_YUVValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_YUV) != 0);
|
ui->checkBox_PF_YUVValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_YUV) != 0);
|
||||||
ui->checkBox_PF_LuminanceValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_LUMINANCE) != 0);
|
ui->checkBox_PF_LuminanceValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_LUMINANCE) != 0);
|
||||||
|
|
||||||
QString formatStr = QString::number(mDDSFile->header.pixelFormat.format);
|
QString formatStr = QString::number(mDDSFile->header.pixelFormat.format);
|
||||||
switch (mDDSFile->header.pixelFormat.format) {
|
switch (mDDSFile->header.pixelFormat.format) {
|
||||||
case IWI_FORMAT_ARGB32:
|
case IWI_FORMAT_ARGB32:
|
||||||
formatStr = "ARGB32";
|
formatStr = "ARGB32";
|
||||||
break;
|
break;
|
||||||
case IWI_FORMAT_RGB24:
|
case IWI_FORMAT_RGB24:
|
||||||
formatStr = "RGB24";
|
formatStr = "RGB24";
|
||||||
break;
|
break;
|
||||||
case IWI_FORMAT_GA16:
|
case IWI_FORMAT_GA16:
|
||||||
formatStr = "GA16";
|
formatStr = "GA16";
|
||||||
break;
|
break;
|
||||||
case IWI_FORMAT_A8:
|
case IWI_FORMAT_A8:
|
||||||
formatStr = "A8";
|
formatStr = "A8";
|
||||||
break;
|
break;
|
||||||
case IWI_FORMAT_DXT1:
|
case IWI_FORMAT_DXT1:
|
||||||
formatStr = "DXT1";
|
formatStr = "DXT1";
|
||||||
break;
|
break;
|
||||||
case IWI_FORMAT_DXT3:
|
case IWI_FORMAT_DXT3:
|
||||||
formatStr = "DXT3";
|
formatStr = "DXT3";
|
||||||
break;
|
break;
|
||||||
case IWI_FORMAT_DXT5:
|
case IWI_FORMAT_DXT5:
|
||||||
formatStr = "DXT5";
|
formatStr = "DXT5";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ui->lineEdit_PF_Format->setText(formatStr);
|
ui->lineEdit_PF_Format->setText(formatStr);
|
||||||
ui->spinBox_PF_RGBBitCount->setValue(mDDSFile->header.pixelFormat.rgbBitCount);
|
ui->spinBox_PF_RGBBitCount->setValue(mDDSFile->header.pixelFormat.rgbBitCount);
|
||||||
ui->spinBox_RedBitCount->setValue(mDDSFile->header.pixelFormat.rBitMask);
|
ui->spinBox_RedBitCount->setValue(mDDSFile->header.pixelFormat.rBitMask);
|
||||||
ui->spinBox_GreenBitCount->setValue(mDDSFile->header.pixelFormat.gBitMask);
|
ui->spinBox_GreenBitCount->setValue(mDDSFile->header.pixelFormat.gBitMask);
|
||||||
ui->spinBox_BlueBitCount->setValue(mDDSFile->header.pixelFormat.bBitMask);
|
ui->spinBox_BlueBitCount->setValue(mDDSFile->header.pixelFormat.bBitMask);
|
||||||
ui->spinBox_AlphaBitMask->setValue(mDDSFile->header.pixelFormat.aBitMask);
|
ui->spinBox_AlphaBitMask->setValue(mDDSFile->header.pixelFormat.aBitMask);
|
||||||
|
|
||||||
ui->checkBox_Caps1_TextureValid->setChecked((mDDSFile->header.caps.caps1 & DDSCAPS_TEXTURE) != 0);
|
ui->checkBox_Caps1_TextureValid->setChecked((mDDSFile->header.caps.caps1 & DDSCAPS_TEXTURE) != 0);
|
||||||
ui->checkBox_Caps1_ComplexValid->setChecked((mDDSFile->header.caps.caps1 & DDSCAPS_COMPLEX) != 0);
|
ui->checkBox_Caps1_ComplexValid->setChecked((mDDSFile->header.caps.caps1 & DDSCAPS_COMPLEX) != 0);
|
||||||
ui->checkBox_Caps1_MipmapValid->setChecked((mDDSFile->header.caps.caps1 & DDSCAPS_MIPMAP) != 0);
|
ui->checkBox_Caps1_MipmapValid->setChecked((mDDSFile->header.caps.caps1 & DDSCAPS_MIPMAP) != 0);
|
||||||
|
|
||||||
ui->checkBox_Caps2_CubemapValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP) != 0);
|
ui->checkBox_Caps2_CubemapValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP) != 0);
|
||||||
ui->checkBox_Caps2_CMPXValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_POSITIVEX) != 0);
|
ui->checkBox_Caps2_CMPXValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_POSITIVEX) != 0);
|
||||||
ui->checkBox_Caps2_CMNXValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_NEGATIVEX) != 0);
|
ui->checkBox_Caps2_CMNXValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_NEGATIVEX) != 0);
|
||||||
ui->checkBox_Caps2_CMPYValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_POSITIVEY) != 0);
|
ui->checkBox_Caps2_CMPYValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_POSITIVEY) != 0);
|
||||||
ui->checkBox_Caps2_CMNYValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_NEGATIVEY) != 0);
|
ui->checkBox_Caps2_CMNYValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_NEGATIVEY) != 0);
|
||||||
ui->checkBox_Caps2_CMPZValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_POSITIVEZ) != 0);
|
ui->checkBox_Caps2_CMPZValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_POSITIVEZ) != 0);
|
||||||
ui->checkBox_Caps2_CMNZValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_NEGATIVEZ) != 0);
|
ui->checkBox_Caps2_CMNZValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_NEGATIVEZ) != 0);
|
||||||
ui->checkBox_Caps2_VolumeValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_VOLUME) != 0);
|
ui->checkBox_Caps2_VolumeValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_VOLUME) != 0);
|
||||||
|
|
||||||
ui->spinBox_Caps_DDSX->setValue(mDDSFile->header.caps.dDSX);
|
ui->spinBox_Caps_DDSX->setValue(mDDSFile->header.caps.dDSX);
|
||||||
ui->spinBox_Caps_Res->setValue(mDDSFile->header.caps.reserved);
|
ui->spinBox_Caps_Res->setValue(mDDSFile->header.caps.reserved);
|
||||||
|
|
||||||
ui->comboBox_Mipmap->clear();
|
ui->comboBox_Mipmap->clear();
|
||||||
for (auto mipmap : mDDSFile->mipmaps) {
|
for (auto mipmap : mDDSFile->mipmaps) {
|
||||||
ui->comboBox_Mipmap->addItem(QString("%1x%2").arg(mipmap.width).arg(mipmap.height));
|
ui->comboBox_Mipmap->addItem(QString("%1x%2").arg(mipmap.width).arg(mipmap.height));
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(ui->comboBox_Mipmap, &QComboBox::currentIndexChanged, this, &DDSViewer::MipmapIndexChanged);
|
connect(ui->comboBox_Mipmap, &QComboBox::currentIndexChanged, this, &DDSViewer::MipmapIndexChanged);
|
||||||
|
|
||||||
if (!mDDSFile->mipmaps.empty()) {
|
if (!mDDSFile->mipmaps.empty()) {
|
||||||
MipmapIndexChanged(0);
|
MipmapIndexChanged(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DDSViewer::MipmapIndexChanged(int aMipmapIndex) {
|
void DDSViewer::MipmapIndexChanged(int aMipmapIndex) {
|
||||||
if (aMipmapIndex == -1) { return; }
|
if (aMipmapIndex == -1) { return; }
|
||||||
|
|
||||||
auto mipmaps = mDDSFile->mipmaps;
|
auto mipmaps = mDDSFile->mipmaps;
|
||||||
auto mipmap = mipmaps[aMipmapIndex];
|
auto mipmap = mipmaps[aMipmapIndex];
|
||||||
|
|
||||||
ui->spinBox_MipmapSize->setValue(mipmap.size);
|
ui->spinBox_MipmapSize->setValue(mipmap.size);
|
||||||
ui->spinBox_MipmapWidth->setValue(mipmap.width);
|
ui->spinBox_MipmapWidth->setValue(mipmap.width);
|
||||||
ui->spinBox_MipmapHeight->setValue(mipmap.height);
|
ui->spinBox_MipmapHeight->setValue(mipmap.height);
|
||||||
|
|
||||||
// Validate Data
|
// Validate Data
|
||||||
if (mipmap.size <= 0) {
|
if (mipmap.size <= 0) {
|
||||||
qDebug() << "Error: Mipmap data is empty!";
|
qDebug() << "Error: Mipmap data is empty!";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mipmap.width <= 0 || mipmap.height <= 0) {
|
if (mipmap.width <= 0 || mipmap.height <= 0) {
|
||||||
qDebug() << "Error: Invalid mipmap dimensions!";
|
qDebug() << "Error: Invalid mipmap dimensions!";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure data size matches expected size
|
// Ensure data size matches expected size
|
||||||
int bytesPerPixel = 4; // RGBA8888
|
int bytesPerPixel = 4; // RGBA8888
|
||||||
quint32 expectedSize = mipmap.width * mipmap.height * bytesPerPixel;
|
quint32 expectedSize = mipmap.width * mipmap.height * bytesPerPixel;
|
||||||
if (mipmap.size < expectedSize) {
|
if (mipmap.size < expectedSize) {
|
||||||
qDebug() << "Error: Mipmap data size mismatch! Expected:" << expectedSize << ", Got:" << mipmap.size;
|
qDebug() << "Error: Mipmap data size mismatch! Expected:" << expectedSize << ", Got:" << mipmap.size;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create QImage
|
// Create QImage
|
||||||
const unsigned char* imageData = reinterpret_cast<const unsigned char*>(mipmap.data.constData());
|
const unsigned char* imageData = reinterpret_cast<const unsigned char*>(mipmap.data.constData());
|
||||||
QImage image(reinterpret_cast<const uchar*>(imageData),
|
QImage image(reinterpret_cast<const uchar*>(imageData),
|
||||||
mipmap.width, mipmap.height,
|
mipmap.width, mipmap.height,
|
||||||
mipmap.width * bytesPerPixel, // Stride
|
mipmap.width * bytesPerPixel, // Stride
|
||||||
QImage::Format_RGBA8888);
|
QImage::Format_RGBA8888);
|
||||||
|
|
||||||
if (image.isNull()) {
|
if (image.isNull()) {
|
||||||
qDebug() << "Error: QImage creation failed!";
|
qDebug() << "Error: QImage creation failed!";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert to QPixmap
|
// Convert to QPixmap
|
||||||
QPixmap pixmap = QPixmap::fromImage(image);
|
QPixmap pixmap = QPixmap::fromImage(image);
|
||||||
if (pixmap.isNull()) {
|
if (pixmap.isNull()) {
|
||||||
qDebug() << "Error: QPixmap conversion failed!";
|
qDebug() << "Error: QPixmap conversion failed!";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scale and display
|
// Scale and display
|
||||||
pixmap = pixmap.scaled(ui->label_Image->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
pixmap = pixmap.scaled(ui->label_Image->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||||
ui->label_Image->setPixmap(pixmap);
|
ui->label_Image->setPixmap(pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1,29 +1,29 @@
|
|||||||
#ifndef DDSVIEWER_H
|
#ifndef DDSVIEWER_H
|
||||||
#define DDSVIEWER_H
|
#define DDSVIEWER_H
|
||||||
|
|
||||||
#include "ddsfile.h"
|
#include "ddsfile.h"
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class DDSViewer;
|
class DDSViewer;
|
||||||
}
|
}
|
||||||
|
|
||||||
class DDSViewer : public QWidget
|
class DDSViewer : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DDSViewer(QWidget *parent = nullptr);
|
explicit DDSViewer(QWidget *parent = nullptr);
|
||||||
~DDSViewer();
|
~DDSViewer();
|
||||||
|
|
||||||
void SetDDSFile(std::shared_ptr<DDSFile> aDDSFile);
|
void SetDDSFile(const DDSFile *aDDSFile);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void MipmapIndexChanged(int aMipmapIndex);
|
void MipmapIndexChanged(int aMipmapIndex);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::DDSViewer *ui;
|
Ui::DDSViewer *ui;
|
||||||
std::shared_ptr<DDSFile> mDDSFile;
|
const DDSFile* mDDSFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DDSVIEWER_H
|
#endif // DDSVIEWER_H
|
||||||
@ -1,27 +1,26 @@
|
|||||||
#include "fastfileviewer.h"
|
#include "fastfileviewer.h"
|
||||||
#include "asset_structs.h"
|
#include "ui_fastfileviewer.h"
|
||||||
#include "ui_fastfileviewer.h"
|
|
||||||
|
FastFileViewer::FastFileViewer(QWidget *parent)
|
||||||
FastFileViewer::FastFileViewer(QWidget *parent)
|
: QWidget(parent)
|
||||||
: QWidget(parent)
|
, ui(new Ui::FFViewer)
|
||||||
, ui(new Ui::FFViewer)
|
, mFastFile(nullptr)
|
||||||
, mFastFile(nullptr)
|
{
|
||||||
{
|
ui->setupUi(this);
|
||||||
ui->setupUi(this);
|
}
|
||||||
}
|
|
||||||
|
FastFileViewer::~FastFileViewer()
|
||||||
FastFileViewer::~FastFileViewer()
|
{
|
||||||
{
|
delete ui;
|
||||||
delete ui;
|
}
|
||||||
}
|
|
||||||
|
void FastFileViewer::SetFastFile(const FastFile* aFastFile) {
|
||||||
void FastFileViewer::SetFastFile(std::shared_ptr<FastFile> aFastFile) {
|
mFastFile = aFastFile;
|
||||||
mFastFile.swap(aFastFile);
|
|
||||||
|
ui->label_Title->setText(mFastFile->GetStem());
|
||||||
ui->label_Title->setText(mFastFile->GetFileStem());
|
ui->comboBox_Company->setCurrentIndex(mFastFile->GetCompany());
|
||||||
ui->comboBox_Company->setCurrentIndex(mFastFile->GetCompany());
|
ui->comboBox_FileType->setCurrentIndex(mFastFile->GetType());
|
||||||
ui->comboBox_FileType->setCurrentIndex(mFastFile->GetFileType());
|
ui->checkBox_Signed->setChecked(mFastFile->GetSignage() == SIGNAGE_SIGNED);
|
||||||
ui->checkBox_Signed->setChecked(mFastFile->GetSignage() == SIGNAGE_SIGNED);
|
ui->lineEdit_Magic->setText(mFastFile->GetMagic());
|
||||||
ui->lineEdit_Magic->setText(mFastFile->GetMagic());
|
ui->spinBox_Version->setValue(mFastFile->GetVersion());
|
||||||
ui->spinBox_Version->setValue(mFastFile->GetVersion());
|
}
|
||||||
}
|
|
||||||
@ -1,26 +1,25 @@
|
|||||||
#ifndef FASTFILEVIEWER_H
|
#ifndef FASTFILEVIEWER_H
|
||||||
#define FASTFILEVIEWER_H
|
#define FASTFILEVIEWER_H
|
||||||
|
|
||||||
#include "asset_structs.h"
|
#include "fastfile.h"
|
||||||
#include "fastfile.h"
|
#include <QWidget>
|
||||||
#include <QWidget>
|
|
||||||
|
namespace Ui {
|
||||||
namespace Ui {
|
class FFViewer;
|
||||||
class FFViewer;
|
}
|
||||||
}
|
|
||||||
|
class FastFileViewer : public QWidget
|
||||||
class FastFileViewer : public QWidget
|
{
|
||||||
{
|
Q_OBJECT
|
||||||
Q_OBJECT
|
|
||||||
|
public:
|
||||||
public:
|
explicit FastFileViewer(QWidget *parent = nullptr);
|
||||||
explicit FastFileViewer(QWidget *parent = nullptr);
|
~FastFileViewer();
|
||||||
~FastFileViewer();
|
|
||||||
|
void SetFastFile(const FastFile *aFastFile);
|
||||||
void SetFastFile(std::shared_ptr<FastFile> aFastFile);
|
private:
|
||||||
private:
|
Ui::FFViewer *ui;
|
||||||
Ui::FFViewer *ui;
|
const FastFile* mFastFile;
|
||||||
std::shared_ptr<FastFile> mFastFile;
|
};
|
||||||
};
|
|
||||||
|
#endif // FASTFILEVIEWER_H
|
||||||
#endif // FASTFILEVIEWER_H
|
|
||||||
@ -1,197 +1,197 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>FFViewer</class>
|
<class>FFViewer</class>
|
||||||
<widget class="QWidget" name="FFViewer">
|
<widget class="QWidget" name="FFViewer">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>428</width>
|
<width>428</width>
|
||||||
<height>459</height>
|
<height>459</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_Title">
|
<widget class="QLabel" name="label_Title">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Roboto</family>
|
<family>Roboto</family>
|
||||||
<pointsize>16</pointsize>
|
<pointsize>16</pointsize>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>FastFile 0</string>
|
<string>FastFile 0</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>400</width>
|
<width>400</width>
|
||||||
<height>400</height>
|
<height>400</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Roboto</family>
|
<family>Roboto</family>
|
||||||
<pointsize>9</pointsize>
|
<pointsize>9</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Header</string>
|
<string>Header</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Company:</string>
|
<string>Company:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QComboBox" name="comboBox_Company">
|
<widget class="QComboBox" name="comboBox_Company">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>None</string>
|
<string>None</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Infinity Ward</string>
|
<string>Infinity Ward</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Treyarch</string>
|
<string>Treyarch</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Sledgehammer</string>
|
<string>Sledgehammer</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Neversoft</string>
|
<string>Neversoft</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>File Type:</string>
|
<string>File Type:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QComboBox" name="comboBox_FileType">
|
<widget class="QComboBox" name="comboBox_FileType">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>None</string>
|
<string>None</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>FastFile</string>
|
<string>FastFile</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Signed:</string>
|
<string>Signed:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QCheckBox" name="checkBox_Signed">
|
<widget class="QCheckBox" name="checkBox_Signed">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Is signed</string>
|
<string>Is signed</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Magic:</string>
|
<string>Magic:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QLineEdit" name="lineEdit_Magic"/>
|
<widget class="QLineEdit" name="lineEdit_Magic"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_5">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Version:</string>
|
<string>Version:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QSpinBox" name="spinBox_Version">
|
<widget class="QSpinBox" name="spinBox_Version">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>10000</number>
|
<number>10000</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_3">
|
<spacer name="horizontalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_5">
|
<spacer name="verticalSpacer_5">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>1</height>
|
<height>1</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
28
app/imagewidget.cpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#include "imagewidget.h"
|
||||||
|
#include "ui_imagewidget.h"
|
||||||
|
|
||||||
|
ImageWidget::ImageWidget(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
, ui(new Ui::ImageWidget)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageWidget::~ImageWidget()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImageWidget::SetImage(std::shared_ptr<QImage> aImage)
|
||||||
|
{
|
||||||
|
mImage = aImage;
|
||||||
|
|
||||||
|
//ui->lineEdit_Name->setText(aImage->name);
|
||||||
|
//ui->lineEdit_Role->setText(aImage->materialName);
|
||||||
|
//ui->comboBox_Compression->setCurrentIndex(aImage->compression);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<QImage> ImageWidget::GetImage()
|
||||||
|
{
|
||||||
|
return mImage;
|
||||||
|
}
|
||||||
@ -1,32 +1,31 @@
|
|||||||
#ifndef IMAGEWIDGET_H
|
#ifndef IMAGEWIDGET_H
|
||||||
#define IMAGEWIDGET_H
|
#define IMAGEWIDGET_H
|
||||||
|
|
||||||
#include "enums.h"
|
#include "enums.h"
|
||||||
#include "dds_structs.h"
|
#include "dds_structs.h"
|
||||||
#include "d3dbsp_structs.h"
|
#include "d3dbsp_structs.h"
|
||||||
#include "asset_structs.h"
|
#include "ipak_structs.h"
|
||||||
#include "ipak_structs.h"
|
|
||||||
|
#include <QWidget>
|
||||||
#include <QWidget>
|
|
||||||
|
namespace Ui {
|
||||||
namespace Ui {
|
class ImageWidget;
|
||||||
class ImageWidget;
|
}
|
||||||
}
|
|
||||||
|
class ImageWidget : public QWidget
|
||||||
class ImageWidget : public QWidget
|
{
|
||||||
{
|
Q_OBJECT
|
||||||
Q_OBJECT
|
|
||||||
|
public:
|
||||||
public:
|
explicit ImageWidget(QWidget *parent = nullptr);
|
||||||
explicit ImageWidget(QWidget *parent = nullptr);
|
~ImageWidget();
|
||||||
~ImageWidget();
|
|
||||||
|
void SetImage(std::shared_ptr<QImage> aImage);
|
||||||
void SetImage(std::shared_ptr<Image> aImage);
|
std::shared_ptr<QImage> GetImage();
|
||||||
std::shared_ptr<Image> GetImage();
|
|
||||||
|
private:
|
||||||
private:
|
std::shared_ptr<QImage> mImage;
|
||||||
std::shared_ptr<Image> mImage;
|
Ui::ImageWidget *ui;
|
||||||
Ui::ImageWidget *ui;
|
};
|
||||||
};
|
|
||||||
|
#endif // IMAGEWIDGET_H
|
||||||
#endif // IMAGEWIDGET_H
|
|
||||||
@ -1,144 +1,144 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>ImageWidget</class>
|
<class>ImageWidget</class>
|
||||||
<widget class="QWidget" name="ImageWidget">
|
<widget class="QWidget" name="ImageWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>589</width>
|
<width>589</width>
|
||||||
<height>422</height>
|
<height>422</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Image Role:</string>
|
<string>Image Role:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_Role"/>
|
<widget class="QLineEdit" name="lineEdit_Role"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Name:</string>
|
<string>Name:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_Name"/>
|
<widget class="QLineEdit" name="lineEdit_Name"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Compression:</string>
|
<string>Compression:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="comboBox_Compression">
|
<widget class="QComboBox" name="comboBox_Compression">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>None</string>
|
<string>None</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>DXT1</string>
|
<string>DXT1</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>DXT3</string>
|
<string>DXT3</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>DXT5</string>
|
<string>DXT5</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>40</height>
|
<height>40</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line">
|
<widget class="Line" name="line">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_Preview">
|
<widget class="QLabel" name="label_Preview">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>250</width>
|
<width>250</width>
|
||||||
<height>250</height>
|
<height>250</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>250</width>
|
<width>250</width>
|
||||||
<height>250</height>
|
<height>250</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_2">
|
<spacer name="verticalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>40</height>
|
<height>40</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
@ -1,98 +1,98 @@
|
|||||||
#include "iwiviewer.h"
|
#include "iwiviewer.h"
|
||||||
#include "enums.h"
|
#include "enums.h"
|
||||||
#include "ui_iwiviewer.h"
|
#include "ui_iwiviewer.h"
|
||||||
|
|
||||||
IWIViewer::IWIViewer(QWidget *parent)
|
IWIViewer::IWIViewer(QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, ui(new Ui::IWIViewer)
|
, ui(new Ui::IWIViewer)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
IWIViewer::~IWIViewer()
|
IWIViewer::~IWIViewer()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IWIViewer::SetIWIFile(std::shared_ptr<IWIFile> aIWIFile) {
|
void IWIViewer::SetIWIFile(const IWIFile* aIWIFile) {
|
||||||
mIWIFile.swap(aIWIFile);
|
mIWIFile = aIWIFile;
|
||||||
|
|
||||||
ui->label_Title->setText(mIWIFile->fileStem + ".iwi");
|
ui->label_Title->setText(mIWIFile->fileStem + ".iwi");
|
||||||
|
|
||||||
// If you’re using Qt and want a QString:
|
// If you’re using Qt and want a QString:
|
||||||
QString magicStr = QString::fromLatin1(mIWIFile->header.Magic, 3);
|
QString magicStr = QString::fromLatin1(mIWIFile->header.Magic, 3);
|
||||||
ui->lineEdit_Magic->setText(magicStr);
|
ui->lineEdit_Magic->setText(magicStr);
|
||||||
|
|
||||||
ui->spinBox_Version->setValue(mIWIFile->header.Version);
|
ui->spinBox_Version->setValue(mIWIFile->header.Version);
|
||||||
ui->spinBox_Depth->setValue(mIWIFile->info.Depth);
|
ui->spinBox_Depth->setValue(mIWIFile->info.Depth);
|
||||||
QString formatStr = "";
|
QString formatStr = "";
|
||||||
switch (mIWIFile->info.Format) {
|
switch (mIWIFile->info.Format) {
|
||||||
case IWI_FORMAT_ARGB32:
|
case IWI_FORMAT_ARGB32:
|
||||||
formatStr = "ARGB32";
|
formatStr = "ARGB32";
|
||||||
break;
|
break;
|
||||||
case IWI_FORMAT_RGB24:
|
case IWI_FORMAT_RGB24:
|
||||||
formatStr = "RGB24";
|
formatStr = "RGB24";
|
||||||
break;
|
break;
|
||||||
case IWI_FORMAT_GA16:
|
case IWI_FORMAT_GA16:
|
||||||
formatStr = "GA16";
|
formatStr = "GA16";
|
||||||
break;
|
break;
|
||||||
case IWI_FORMAT_A8:
|
case IWI_FORMAT_A8:
|
||||||
formatStr = "A8";
|
formatStr = "A8";
|
||||||
break;
|
break;
|
||||||
case IWI_FORMAT_DXT1:
|
case IWI_FORMAT_DXT1:
|
||||||
formatStr = "DXT1";
|
formatStr = "DXT1";
|
||||||
break;
|
break;
|
||||||
case IWI_FORMAT_DXT3:
|
case IWI_FORMAT_DXT3:
|
||||||
formatStr = "DXT3";
|
formatStr = "DXT3";
|
||||||
break;
|
break;
|
||||||
case IWI_FORMAT_DXT5:
|
case IWI_FORMAT_DXT5:
|
||||||
formatStr = "DXT5";
|
formatStr = "DXT5";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ui->lineEdit_Format->setText(formatStr);
|
ui->lineEdit_Format->setText(formatStr);
|
||||||
ui->spinBox_Height->setValue(mIWIFile->info.Height);
|
ui->spinBox_Height->setValue(mIWIFile->info.Height);
|
||||||
ui->spinBox_Width->setValue(mIWIFile->info.Width);
|
ui->spinBox_Width->setValue(mIWIFile->info.Width);
|
||||||
ui->spinBox_Usage->setValue(mIWIFile->info.Usage);
|
ui->spinBox_Usage->setValue(mIWIFile->info.Usage);
|
||||||
|
|
||||||
ui->comboBox_Mipmap->clear();
|
ui->comboBox_Mipmap->clear();
|
||||||
for (auto mipmap : mIWIFile->mipmaps) {
|
for (auto mipmap : mIWIFile->mipmaps) {
|
||||||
ui->comboBox_Mipmap->addItem(QString::number(mipmap.offset));
|
ui->comboBox_Mipmap->addItem(QString::number(mipmap.offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(ui->comboBox_Mipmap, &QComboBox::currentIndexChanged, this, &IWIViewer::MipmapIndexChanged);
|
connect(ui->comboBox_Mipmap, &QComboBox::currentIndexChanged, this, &IWIViewer::MipmapIndexChanged);
|
||||||
|
|
||||||
if (!mIWIFile->mipmaps.empty()) {
|
if (!mIWIFile->mipmaps.empty()) {
|
||||||
MipmapIndexChanged(0);
|
MipmapIndexChanged(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IWIViewer::MipmapIndexChanged(int aMipmapIndex) {
|
void IWIViewer::MipmapIndexChanged(int aMipmapIndex) {
|
||||||
auto mipmaps = mIWIFile->mipmaps;
|
auto mipmaps = mIWIFile->mipmaps;
|
||||||
|
|
||||||
if (aMipmapIndex == -1) { return; }
|
if (aMipmapIndex == -1) { return; }
|
||||||
|
|
||||||
auto mipmap = mipmaps[aMipmapIndex];
|
auto mipmap = mipmaps[aMipmapIndex];
|
||||||
ui->spinBox_MipmapSize->setValue(mipmap.size);
|
ui->spinBox_MipmapSize->setValue(mipmap.size);
|
||||||
ui->spinBox_MipmapOffset->setValue(mipmap.offset);
|
ui->spinBox_MipmapOffset->setValue(mipmap.offset);
|
||||||
|
|
||||||
const unsigned char* imageData = reinterpret_cast<const unsigned char*>(mipmap.data.constData());
|
const unsigned char* imageData = reinterpret_cast<const unsigned char*>(mipmap.data.constData());
|
||||||
QImage image(reinterpret_cast<const uchar*>(imageData),
|
QImage image(reinterpret_cast<const uchar*>(imageData),
|
||||||
mIWIFile->info.Width, mIWIFile->info.Height,
|
mIWIFile->info.Width, mIWIFile->info.Height,
|
||||||
QImage::Format_RGBA8888);
|
QImage::Format_RGBA8888);
|
||||||
|
|
||||||
if (image.isNull()) {
|
if (image.isNull()) {
|
||||||
qDebug() << "Error: QImage creation failed!";
|
qDebug() << "Error: QImage creation failed!";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert to QPixmap
|
// Convert to QPixmap
|
||||||
QPixmap pixmap = QPixmap::fromImage(image);
|
QPixmap pixmap = QPixmap::fromImage(image);
|
||||||
if (pixmap.isNull()) {
|
if (pixmap.isNull()) {
|
||||||
qDebug() << "Error: QPixmap conversion failed!";
|
qDebug() << "Error: QPixmap conversion failed!";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scale and display
|
// Scale and display
|
||||||
pixmap = pixmap.scaled(ui->label_Image->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
pixmap = pixmap.scaled(ui->label_Image->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||||
ui->label_Image->setPixmap(pixmap);
|
ui->label_Image->setPixmap(pixmap);
|
||||||
}
|
}
|
||||||
@ -1,27 +1,27 @@
|
|||||||
#ifndef IWIVIEWER_H
|
#ifndef IWIVIEWER_H
|
||||||
#define IWIVIEWER_H
|
#define IWIVIEWER_H
|
||||||
|
|
||||||
#include "iwifile.h"
|
#include "iwifile.h"
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class IWIViewer;
|
class IWIViewer;
|
||||||
}
|
}
|
||||||
|
|
||||||
class IWIViewer : public QWidget
|
class IWIViewer : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit IWIViewer(QWidget *parent = nullptr);
|
explicit IWIViewer(QWidget *parent = nullptr);
|
||||||
~IWIViewer();
|
~IWIViewer();
|
||||||
|
|
||||||
void MipmapIndexChanged(int aMipmapIndex);
|
void MipmapIndexChanged(int aMipmapIndex);
|
||||||
|
|
||||||
void SetIWIFile(std::shared_ptr<IWIFile> aIWIFile);
|
void SetIWIFile(const IWIFile *aIWIFile);
|
||||||
private:
|
private:
|
||||||
Ui::IWIViewer *ui;
|
Ui::IWIViewer *ui;
|
||||||
std::shared_ptr<IWIFile> mIWIFile;
|
const IWIFile* mIWIFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // IWIVIEWER_H
|
#endif // IWIVIEWER_H
|
||||||
58
app/localstringviewer.cpp
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#include "localstringviewer.h"
|
||||||
|
#include "ui_localstringviewer.h"
|
||||||
|
|
||||||
|
LocalStringViewer::LocalStringViewer(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
, ui(new Ui::LocalStringViewer),
|
||||||
|
mVersion(),
|
||||||
|
mConfigPath(),
|
||||||
|
mFileNotes() {
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
ui->tableWidget_Strings->setColumnCount(2);
|
||||||
|
ui->tableWidget_Strings->setRowCount(0);
|
||||||
|
ui->tableWidget_Strings->setColumnWidth(0, 200);
|
||||||
|
ui->tableWidget_Strings->horizontalHeader()->setStretchLastSection(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
LocalStringViewer::~LocalStringViewer() {
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LocalStringViewer::SetVersion(quint32 aVersion) {
|
||||||
|
mVersion = aVersion;
|
||||||
|
|
||||||
|
ui->spinBox_Version->setValue(mVersion);
|
||||||
|
}
|
||||||
|
|
||||||
|
void LocalStringViewer::SetConfigPath(const QString aConfigPath) {
|
||||||
|
mConfigPath = aConfigPath;
|
||||||
|
|
||||||
|
ui->lineEdit_Config->setText(mConfigPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
void LocalStringViewer::SetFileNotes(const QString aFileNotes) {
|
||||||
|
mFileNotes = aFileNotes;
|
||||||
|
|
||||||
|
ui->plainTextEdit_FileNotes->setPlainText(mFileNotes);
|
||||||
|
}
|
||||||
|
|
||||||
|
void LocalStringViewer::AddLocalString(XLocalizeEntry aLocalString) {
|
||||||
|
mLocalStrings.append(aLocalString);
|
||||||
|
ui->tableWidget_Strings->setRowCount(mLocalStrings.size());
|
||||||
|
ui->groupBox_LocalStrViewer->setTitle(QString("Entries (%1)").arg(mLocalStrings.size()));
|
||||||
|
QTableWidgetItem *aliasItem = new QTableWidgetItem(aLocalString.GetValue()->GetString());
|
||||||
|
QTableWidgetItem *stringItem = new QTableWidgetItem(aLocalString.GetName()->GetString());
|
||||||
|
ui->tableWidget_Strings->setItem(mLocalStrings.size() - 1, 0, aliasItem);
|
||||||
|
ui->tableWidget_Strings->setItem(mLocalStrings.size() - 1, 1, stringItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
void LocalStringViewer::SetZoneFile(const ZoneFile* aZoneFile) {
|
||||||
|
mLocalStrings.clear();
|
||||||
|
ui->tableWidget_Strings->clear();
|
||||||
|
|
||||||
|
ui->label_Title->setText(aZoneFile->GetStem().section('.', 0, 0) + ".str");
|
||||||
|
// for (const LocalString &localStr : aZoneFile->GetAssetMap().localStrings) {
|
||||||
|
// AddLocalString(localStr);
|
||||||
|
// }
|
||||||
|
}
|
||||||
@ -1,34 +1,34 @@
|
|||||||
#ifndef LOCALSTRINGVIEWER_H
|
#ifndef LOCALSTRINGVIEWER_H
|
||||||
#define LOCALSTRINGVIEWER_H
|
#define LOCALSTRINGVIEWER_H
|
||||||
|
|
||||||
#include "asset_structs.h"
|
#include "xlocalizeentry.h"
|
||||||
#include "zonefile.h"
|
#include "zonefile.h"
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class LocalStringViewer;
|
class LocalStringViewer;
|
||||||
}
|
}
|
||||||
|
|
||||||
class LocalStringViewer : public QWidget
|
class LocalStringViewer : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit LocalStringViewer(QWidget *parent = nullptr);
|
explicit LocalStringViewer(QWidget *parent = nullptr);
|
||||||
~LocalStringViewer();
|
~LocalStringViewer();
|
||||||
|
|
||||||
void SetVersion(quint32 aVersion);
|
void SetVersion(quint32 aVersion);
|
||||||
void SetConfigPath(const QString aConfigPath);
|
void SetConfigPath(const QString aConfigPath);
|
||||||
void SetFileNotes(const QString aFileNotes);
|
void SetFileNotes(const QString aFileNotes);
|
||||||
void AddLocalString(LocalString aLocalString);
|
void AddLocalString(XLocalizeEntry aLocalString);
|
||||||
void SetZoneFile(std::shared_ptr<ZoneFile> aZoneFile);
|
void SetZoneFile(const ZoneFile *aZoneFile);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::LocalStringViewer *ui;
|
Ui::LocalStringViewer *ui;
|
||||||
quint32 mVersion;
|
quint32 mVersion;
|
||||||
QString mConfigPath;
|
QString mConfigPath;
|
||||||
QString mFileNotes;
|
QString mFileNotes;
|
||||||
QVector<LocalString> mLocalStrings;
|
QVector<XLocalizeEntry> mLocalStrings;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LOCALSTRINGVIEWER_H
|
#endif // LOCALSTRINGVIEWER_H
|
||||||
@ -1,194 +1,194 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>LocalStringViewer</class>
|
<class>LocalStringViewer</class>
|
||||||
<widget class="QWidget" name="LocalStringViewer">
|
<widget class="QWidget" name="LocalStringViewer">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>841</width>
|
<width>841</width>
|
||||||
<height>457</height>
|
<height>457</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>841</width>
|
<width>841</width>
|
||||||
<height>457</height>
|
<height>457</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_Title">
|
<widget class="QLabel" name="label_Title">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Roboto</family>
|
<family>Roboto</family>
|
||||||
<pointsize>16</pointsize>
|
<pointsize>16</pointsize>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>LocalString File 0</string>
|
<string>LocalString File 0</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>325</width>
|
<width>325</width>
|
||||||
<height>398</height>
|
<height>398</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>325</width>
|
<width>325</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Roboto</family>
|
<family>Roboto</family>
|
||||||
<pointsize>9</pointsize>
|
<pointsize>9</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Header</string>
|
<string>Header</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_6">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>File Notes:</string>
|
<string>File Notes:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
|
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_5">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Version:</string>
|
<string>Version:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="lineEdit_Config">
|
<widget class="QLineEdit" name="lineEdit_Config">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>C:\cod5\cod\cod5\bin\StringEd.cfg</string>
|
<string>C:\cod5\cod\cod5\bin\StringEd.cfg</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Config:</string>
|
<string>Config:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QToolButton" name="toolButton">
|
<widget class="QToolButton" name="toolButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" colspan="2">
|
<item row="2" column="1" colspan="2">
|
||||||
<widget class="QSpinBox" name="spinBox_Version">
|
<widget class="QSpinBox" name="spinBox_Version">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>10000</number>
|
<number>10000</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="value">
|
<property name="value">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1" colspan="2">
|
<item row="3" column="1" colspan="2">
|
||||||
<widget class="QPlainTextEdit" name="plainTextEdit_FileNotes">
|
<widget class="QPlainTextEdit" name="plainTextEdit_FileNotes">
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>Files notes...</string>
|
<string>Files notes...</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="3">
|
<item row="4" column="0" colspan="3">
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>40</height>
|
<height>40</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_LocalStrViewer">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>400</width>
|
<width>400</width>
|
||||||
<height>400</height>
|
<height>400</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Roboto</family>
|
<family>Roboto</family>
|
||||||
<pointsize>9</pointsize>
|
<pointsize>9</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Entries</string>
|
<string>Entries</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTableWidget" name="tableWidget_Strings">
|
<widget class="QTableWidget" name="tableWidget_Strings">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_5">
|
<spacer name="verticalSpacer_5">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
11
app/main.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
QApplication a(argc, argv);
|
||||||
|
MainWindow w;
|
||||||
|
w.show();
|
||||||
|
return a.exec();
|
||||||
|
}
|
||||||
@ -1,81 +1,78 @@
|
|||||||
#ifndef MAINWINDOW_H
|
#ifndef MAINWINDOW_H
|
||||||
#define MAINWINDOW_H
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
#include "d3dbsp_structs.h"
|
#include "d3dbsp_structs.h"
|
||||||
#include "asset_structs.h"
|
#include "xtreewidget.h"
|
||||||
#include "ddsviewer.h"
|
|
||||||
#include "fastfileviewer.h"
|
#include <QMainWindow>
|
||||||
#include "ipak_structs.h"
|
#include <QFileDialog>
|
||||||
#include "iwiviewer.h"
|
#include <QStandardPaths>
|
||||||
#include "localstringviewer.h"
|
#include <QMessageBox>
|
||||||
#include "modelviewer.h"
|
#include <QDebug>
|
||||||
#include "imagewidget.h"
|
#include <QTableWidgetItem>
|
||||||
#include "xtreewidget.h"
|
#include <QTreeWidgetItem>
|
||||||
#include "zonefileviewer.h"
|
#include <QDockWidget>
|
||||||
#include "techsetviewer.h"
|
#include <QPlainTextEdit>
|
||||||
|
#include <QMimeData>
|
||||||
#include <QMainWindow>
|
#include <QProgressBar>
|
||||||
#include <QFileDialog>
|
|
||||||
#include <QStandardPaths>
|
QT_BEGIN_NAMESPACE
|
||||||
#include <QMessageBox>
|
namespace Ui {
|
||||||
#include <QDebug>
|
class MainWindow;
|
||||||
#include <QTableWidgetItem>
|
}
|
||||||
#include <QTreeWidgetItem>
|
QT_END_NAMESPACE
|
||||||
#include <QDockWidget>
|
|
||||||
#include <QPlainTextEdit>
|
class MainWindow : public QMainWindow
|
||||||
#include <QMimeData>
|
{
|
||||||
#include <windows.h>
|
Q_OBJECT
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
public:
|
||||||
namespace Ui {
|
MainWindow(QWidget *parent = nullptr);
|
||||||
class MainWindow;
|
~MainWindow();
|
||||||
}
|
void Reset();
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
private slots:
|
||||||
class MainWindow : public QMainWindow
|
bool OpenFastFile(const QString aFastFilePath);
|
||||||
{
|
bool OpenFastFile(const QByteArray& aFastFileData, const QString aFastFilePath);
|
||||||
Q_OBJECT
|
bool OpenFastFile();
|
||||||
|
|
||||||
public:
|
bool OpenZoneFile(const QString aZoneFilePath, bool fromFF = false);
|
||||||
MainWindow(QWidget *parent = nullptr);
|
bool OpenZoneFile();
|
||||||
~MainWindow();
|
|
||||||
void Reset();
|
int LoadFile_D3DBSP(const QString aFilePath);
|
||||||
|
int LoadFile_IPAK(const QString aFilePath);
|
||||||
private slots:
|
int LoadFile_XSUB(const QString aFilePath);
|
||||||
bool OpenFastFile(const QString aFastFilePath);
|
int LoadFile_IWI(const QString aFilePath);
|
||||||
bool OpenFastFile();
|
int LoadFile_DDS(const QString aFilePath);
|
||||||
|
int LoadFile_DDSFiles(const QStringList aFilePaths);
|
||||||
bool OpenZoneFile(const QString aZoneFilePath, bool fromFF = false);
|
|
||||||
bool OpenZoneFile();
|
void HandleLogEntry(const QString &entry);
|
||||||
|
void HandleStatusUpdate(const QString &message, int timeout);
|
||||||
int LoadFile_D3DBSP(const QString aFilePath);
|
void HandleProgressUpdate(const QString &message, int progress, int max);
|
||||||
int LoadFile_IPAK(const QString aFilePath);
|
|
||||||
int LoadFile_XSUB(const QString aFilePath);
|
protected:
|
||||||
int LoadFile_IWI(const QString aFilePath);
|
void dragEnterEvent(QDragEnterEvent *event) override;
|
||||||
int LoadFile_DDS(const QString aFilePath);
|
void dragMoveEvent(QDragMoveEvent *event) override;
|
||||||
int LoadFile_DDSFiles(const QStringList aFilePaths);
|
void dragLeaveEvent(QDragLeaveEvent *event) override;
|
||||||
|
void dropEvent(QDropEvent *event) override;
|
||||||
protected:
|
|
||||||
void dragEnterEvent(QDragEnterEvent *event) override;
|
private:
|
||||||
void dragMoveEvent(QDragMoveEvent *event) override;
|
Ui::MainWindow *ui;
|
||||||
void dragLeaveEvent(QDragLeaveEvent *event) override;
|
QMap<QString, int> mTypeMap;
|
||||||
void dropEvent(QDropEvent *event) override;
|
QStringList mTypeOrder;
|
||||||
|
quint32 mTagCount;
|
||||||
private:
|
quint32 mRecordCount;
|
||||||
Ui::MainWindow *ui;
|
QMap<QString, QString> mRawFileMap;
|
||||||
QMap<QString, int> mTypeMap;
|
//QMap<QString, Image> mImageMap;
|
||||||
QStringList mTypeOrder;
|
QMap<QString, QTreeWidgetItem*> mTreeMap;
|
||||||
quint32 mTagCount;
|
QMap<QString, QVector<QPair<QString, QString>>> mStrTableMap;
|
||||||
quint32 mRecordCount;
|
XTreeWidget *mTreeWidget;
|
||||||
QMap<QString, QString> mRawFileMap;
|
QPlainTextEdit *mLogWidget;
|
||||||
QMap<QString, Image> mImageMap;
|
QProgressBar *mProgressBar;
|
||||||
QMap<QString, QTreeWidgetItem*> mTreeMap;
|
|
||||||
QMap<QString, QVector<QPair<QString, QString>>> mStrTableMap;
|
quint32 mBSPVersion;
|
||||||
XTreeWidget *mTreeWidget;
|
quint32 mDiskLumpCount;
|
||||||
|
QVector<quint32> mDiskLumpOrder;
|
||||||
quint32 mBSPVersion;
|
QMap<quint32, Lump> mLumps;
|
||||||
quint32 mDiskLumpCount;
|
};
|
||||||
QVector<quint32> mDiskLumpOrder;
|
#endif // MAINWINDOW_H
|
||||||
QMap<quint32, Lump> mLumps;
|
|
||||||
};
|
|
||||||
#endif // MAINWINDOW_H
|
|
||||||
@ -1,368 +1,379 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>MainWindow</class>
|
<class>MainWindow</class>
|
||||||
<widget class="QMainWindow" name="MainWindow">
|
<widget class="QMainWindow" name="MainWindow">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>986</width>
|
<width>1579</width>
|
||||||
<height>692</height>
|
<height>857</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>550</width>
|
<width>550</width>
|
||||||
<height>300</height>
|
<height>300</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>XPlor</string>
|
<string>XPlor</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QMainWindow {
|
<string notr="true">QMainWindow {
|
||||||
|
|
||||||
}</string>
|
}</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>-1</number>
|
<number>-1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="tabsClosable">
|
<property name="tabsClosable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="movable">
|
<property name="movable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenuBar" name="menuBar">
|
<widget class="QMenuBar" name="menuBar">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>986</width>
|
<width>1579</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="MenuDef">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>File</string>
|
<string>File</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuRecent">
|
<widget class="QMenu" name="menuRecent">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Recent...</string>
|
<string>Recent...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
</widget>
|
||||||
<iconset theme="QIcon::ThemeIcon::DocumentOpenRecent"/>
|
<widget class="QMenu" name="menuImport">
|
||||||
</property>
|
<property name="title">
|
||||||
</widget>
|
<string>Import...</string>
|
||||||
<widget class="QMenu" name="menuImport">
|
</property>
|
||||||
<property name="title">
|
</widget>
|
||||||
<string>Import...</string>
|
<addaction name="actionNew_File_2"/>
|
||||||
</property>
|
<addaction name="actionNew_Fast_File"/>
|
||||||
<property name="icon">
|
<addaction name="actionNew_Zone_File"/>
|
||||||
<iconset theme="QIcon::ThemeIcon::FolderNew"/>
|
<addaction name="separator"/>
|
||||||
</property>
|
<addaction name="actionOpen_Fast_File"/>
|
||||||
</widget>
|
<addaction name="actionOpen_Zone_File"/>
|
||||||
<addaction name="actionNew_File_2"/>
|
<addaction name="actionOpen_Folder"/>
|
||||||
<addaction name="actionNew_Fast_File"/>
|
<addaction name="menuImport"/>
|
||||||
<addaction name="actionNew_Zone_File"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="actionSave"/>
|
||||||
<addaction name="actionOpen_Fast_File"/>
|
<addaction name="actionSave_As"/>
|
||||||
<addaction name="actionOpen_Zone_File"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionOpen_Folder"/>
|
<addaction name="menuRecent"/>
|
||||||
<addaction name="menuImport"/>
|
</widget>
|
||||||
<addaction name="separator"/>
|
<widget class="QMenu" name="menuEdit">
|
||||||
<addaction name="actionSave"/>
|
<property name="title">
|
||||||
<addaction name="actionSave_As"/>
|
<string>Edit</string>
|
||||||
<addaction name="separator"/>
|
</property>
|
||||||
<addaction name="menuRecent"/>
|
<widget class="QMenu" name="menuUndo_History">
|
||||||
</widget>
|
<property name="title">
|
||||||
<widget class="QMenu" name="menuEdit">
|
<string>Undo History...</string>
|
||||||
<property name="title">
|
</property>
|
||||||
<string>Edit</string>
|
</widget>
|
||||||
</property>
|
<widget class="QMenu" name="menuRedo_History">
|
||||||
<widget class="QMenu" name="menuUndo_History">
|
<property name="title">
|
||||||
<property name="title">
|
<string>Redo History...</string>
|
||||||
<string>Undo History...</string>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
</widget>
|
<addaction name="actionUndo"/>
|
||||||
<widget class="QMenu" name="menuRedo_History">
|
<addaction name="actionRedo"/>
|
||||||
<property name="title">
|
<addaction name="separator"/>
|
||||||
<string>Redo History...</string>
|
<addaction name="actionCut"/>
|
||||||
</property>
|
<addaction name="actionCopy"/>
|
||||||
</widget>
|
<addaction name="actionPaste"/>
|
||||||
<addaction name="actionUndo"/>
|
<addaction name="actionRename"/>
|
||||||
<addaction name="actionRedo"/>
|
<addaction name="actionDelete"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionCut"/>
|
<addaction name="actionFind_2"/>
|
||||||
<addaction name="actionCopy"/>
|
<addaction name="actionEdit_Value"/>
|
||||||
<addaction name="actionPaste"/>
|
<addaction name="actionEdit_as_Hex"/>
|
||||||
<addaction name="actionRename"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionDelete"/>
|
<addaction name="menuUndo_History"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="menuRedo_History"/>
|
||||||
<addaction name="actionFind_2"/>
|
<addaction name="actionClear_Undo_History"/>
|
||||||
<addaction name="actionEdit_Value"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionEdit_as_Hex"/>
|
<addaction name="actionPreferences"/>
|
||||||
<addaction name="separator"/>
|
</widget>
|
||||||
<addaction name="menuUndo_History"/>
|
<widget class="QMenu" name="menuHelp">
|
||||||
<addaction name="menuRedo_History"/>
|
<property name="title">
|
||||||
<addaction name="actionClear_Undo_History"/>
|
<string>Help</string>
|
||||||
</widget>
|
</property>
|
||||||
<widget class="QMenu" name="menuHelp">
|
<addaction name="actionAbout"/>
|
||||||
<property name="title">
|
<addaction name="actionCheck_for_Updates"/>
|
||||||
<string>Help</string>
|
<addaction name="actionReport_Issue"/>
|
||||||
</property>
|
</widget>
|
||||||
<addaction name="actionAbout"/>
|
<widget class="QMenu" name="menuTools">
|
||||||
<addaction name="actionCheck_for_Updates"/>
|
<property name="title">
|
||||||
</widget>
|
<string>Tools</string>
|
||||||
<addaction name="menuFile"/>
|
</property>
|
||||||
<addaction name="menuEdit"/>
|
<addaction name="actionRun_Tests"/>
|
||||||
<addaction name="menuHelp"/>
|
</widget>
|
||||||
</widget>
|
<addaction name="MenuDef"/>
|
||||||
<widget class="QToolBar" name="toolBar">
|
<addaction name="menuEdit"/>
|
||||||
<property name="windowTitle">
|
<addaction name="menuTools"/>
|
||||||
<string>toolBar</string>
|
<addaction name="menuHelp"/>
|
||||||
</property>
|
</widget>
|
||||||
<attribute name="toolBarArea">
|
<widget class="QToolBar" name="toolBar">
|
||||||
<enum>TopToolBarArea</enum>
|
<property name="windowTitle">
|
||||||
</attribute>
|
<string>toolBar</string>
|
||||||
<attribute name="toolBarBreak">
|
</property>
|
||||||
<bool>false</bool>
|
<attribute name="toolBarArea">
|
||||||
</attribute>
|
<enum>TopToolBarArea</enum>
|
||||||
</widget>
|
</attribute>
|
||||||
<widget class="QStatusBar" name="statusBar"/>
|
<attribute name="toolBarBreak">
|
||||||
<action name="actionNew_File_2">
|
<bool>false</bool>
|
||||||
<property name="icon">
|
</attribute>
|
||||||
<iconset theme="QIcon::ThemeIcon::DocumentNew"/>
|
</widget>
|
||||||
</property>
|
<widget class="QStatusBar" name="statusBar"/>
|
||||||
<property name="text">
|
<action name="actionNew_File_2">
|
||||||
<string>New</string>
|
<property name="icon">
|
||||||
</property>
|
<iconset resource="../data/data.qrc">
|
||||||
</action>
|
<normaloff>:/icons/icons/Icon_NewFile.png</normaloff>:/icons/icons/Icon_NewFile.png</iconset>
|
||||||
<action name="actionNew_Fast_File">
|
</property>
|
||||||
<property name="icon">
|
<property name="text">
|
||||||
<iconset theme="QIcon::ThemeIcon::DocumentNew"/>
|
<string>New</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
</action>
|
||||||
<string>New Fast File</string>
|
<action name="actionNew_Fast_File">
|
||||||
</property>
|
<property name="icon">
|
||||||
</action>
|
<iconset resource="../data/data.qrc">
|
||||||
<action name="actionNew_Zone_File">
|
<normaloff>:/icons/icons/Icon_NewFile.png</normaloff>:/icons/icons/Icon_NewFile.png</iconset>
|
||||||
<property name="icon">
|
</property>
|
||||||
<iconset theme="QIcon::ThemeIcon::DocumentNew"/>
|
<property name="text">
|
||||||
</property>
|
<string>New Fast File</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>New Zone File</string>
|
</action>
|
||||||
</property>
|
<action name="actionNew_Zone_File">
|
||||||
</action>
|
<property name="icon">
|
||||||
<action name="actionOpen_Fast_File">
|
<iconset resource="../data/data.qrc">
|
||||||
<property name="icon">
|
<normaloff>:/icons/icons/Icon_NewFile.png</normaloff>:/icons/icons/Icon_NewFile.png</iconset>
|
||||||
<iconset theme="QIcon::ThemeIcon::DocumentOpen"/>
|
</property>
|
||||||
</property>
|
<property name="text">
|
||||||
<property name="text">
|
<string>New Zone File</string>
|
||||||
<string>Open Fast File</string>
|
</property>
|
||||||
</property>
|
</action>
|
||||||
</action>
|
<action name="actionOpen_Fast_File">
|
||||||
<action name="actionOpen_Zone_File">
|
<property name="icon">
|
||||||
<property name="icon">
|
<iconset resource="../data/data.qrc">
|
||||||
<iconset theme="QIcon::ThemeIcon::DocumentOpen"/>
|
<normaloff>:/icons/icons/Icon_OpenFile.png</normaloff>:/icons/icons/Icon_OpenFile.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Open Zone File</string>
|
<string>Open Fast File</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionOpen_Folder">
|
<action name="actionOpen_Zone_File">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="QIcon::ThemeIcon::DocumentOpen"/>
|
<iconset resource="../data/data.qrc">
|
||||||
</property>
|
<normaloff>:/icons/icons/Icon_OpenFile.png</normaloff>:/icons/icons/Icon_OpenFile.png</iconset>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Open Folder</string>
|
<property name="text">
|
||||||
</property>
|
<string>Open Zone File</string>
|
||||||
</action>
|
</property>
|
||||||
<action name="actionSave">
|
</action>
|
||||||
<property name="icon">
|
<action name="actionOpen_Folder">
|
||||||
<iconset theme="QIcon::ThemeIcon::DocumentSave"/>
|
<property name="icon">
|
||||||
</property>
|
<iconset resource="../data/data.qrc">
|
||||||
<property name="text">
|
<normaloff>:/icons/icons/Icon_OpenFile.png</normaloff>:/icons/icons/Icon_OpenFile.png</iconset>
|
||||||
<string>Save</string>
|
</property>
|
||||||
</property>
|
<property name="text">
|
||||||
</action>
|
<string>Open Folder</string>
|
||||||
<action name="actionSave_As">
|
</property>
|
||||||
<property name="icon">
|
</action>
|
||||||
<iconset theme="QIcon::ThemeIcon::DocumentSaveAs"/>
|
<action name="actionSave">
|
||||||
</property>
|
<property name="icon">
|
||||||
<property name="text">
|
<iconset resource="../data/data.qrc">
|
||||||
<string>Save As</string>
|
<normaloff>:/icons/icons/Icon_Save.png</normaloff>:/icons/icons/Icon_Save.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
<property name="text">
|
||||||
<action name="actione">
|
<string>Save</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>e</string>
|
</action>
|
||||||
</property>
|
<action name="actionSave_As">
|
||||||
</action>
|
<property name="text">
|
||||||
<action name="actionFile">
|
<string>Save As</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>File</string>
|
</action>
|
||||||
</property>
|
<action name="actione">
|
||||||
</action>
|
<property name="text">
|
||||||
<action name="actionFolder">
|
<string>e</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Folder</string>
|
</action>
|
||||||
</property>
|
<action name="actionFile">
|
||||||
</action>
|
<property name="text">
|
||||||
<action name="actionNew_File">
|
<string>File</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>New File</string>
|
</action>
|
||||||
</property>
|
<action name="actionFolder">
|
||||||
</action>
|
<property name="text">
|
||||||
<action name="actionNew_Fast_File_2">
|
<string>Folder</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>New Fast File</string>
|
</action>
|
||||||
</property>
|
<action name="actionNew_File">
|
||||||
</action>
|
<property name="text">
|
||||||
<action name="actionNew_Zone_File_2">
|
<string>New File</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>New Zone File</string>
|
</action>
|
||||||
</property>
|
<action name="actionNew_Fast_File_2">
|
||||||
</action>
|
<property name="text">
|
||||||
<action name="actionFrom_Clipboard">
|
<string>New Fast File</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>From Clipboard</string>
|
</action>
|
||||||
</property>
|
<action name="actionNew_Zone_File_2">
|
||||||
</action>
|
<property name="text">
|
||||||
<action name="actionMaterial">
|
<string>New Zone File</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Material</string>
|
</action>
|
||||||
</property>
|
<action name="actionFrom_Clipboard">
|
||||||
</action>
|
<property name="text">
|
||||||
<action name="actionSound">
|
<string>From Clipboard</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Sound</string>
|
</action>
|
||||||
</property>
|
<action name="actionMaterial">
|
||||||
</action>
|
<property name="text">
|
||||||
<action name="actionUndo">
|
<string>Material</string>
|
||||||
<property name="icon">
|
</property>
|
||||||
<iconset theme="QIcon::ThemeIcon::EditUndo"/>
|
</action>
|
||||||
</property>
|
<action name="actionSound">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Undo</string>
|
<string>Sound</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionRedo">
|
<action name="actionUndo">
|
||||||
<property name="icon">
|
<property name="text">
|
||||||
<iconset theme="QIcon::ThemeIcon::EditRedo"/>
|
<string>Undo</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
</action>
|
||||||
<string>Redo</string>
|
<action name="actionRedo">
|
||||||
</property>
|
<property name="text">
|
||||||
</action>
|
<string>Redo</string>
|
||||||
<action name="actionCut">
|
</property>
|
||||||
<property name="icon">
|
</action>
|
||||||
<iconset theme="QIcon::ThemeIcon::EditCut"/>
|
<action name="actionCut">
|
||||||
</property>
|
<property name="icon">
|
||||||
<property name="text">
|
<iconset resource="../data/data.qrc">
|
||||||
<string>Cut</string>
|
<normaloff>:/icons/icons/Icon_Cut.png</normaloff>:/icons/icons/Icon_Cut.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
<property name="text">
|
||||||
<action name="actionCopy">
|
<string>Cut</string>
|
||||||
<property name="icon">
|
</property>
|
||||||
<iconset theme="QIcon::ThemeIcon::EditCopy"/>
|
</action>
|
||||||
</property>
|
<action name="actionCopy">
|
||||||
<property name="text">
|
<property name="icon">
|
||||||
<string>Copy</string>
|
<iconset resource="../data/data.qrc">
|
||||||
</property>
|
<normaloff>:/icons/icons/Icon_Copy.png</normaloff>:/icons/icons/Icon_Copy.png</iconset>
|
||||||
</action>
|
</property>
|
||||||
<action name="actionPaste">
|
<property name="text">
|
||||||
<property name="icon">
|
<string>Copy</string>
|
||||||
<iconset theme="QIcon::ThemeIcon::EditPaste"/>
|
</property>
|
||||||
</property>
|
</action>
|
||||||
<property name="text">
|
<action name="actionPaste">
|
||||||
<string>Paste</string>
|
<property name="icon">
|
||||||
</property>
|
<iconset resource="../data/data.qrc">
|
||||||
</action>
|
<normaloff>:/icons/icons/Icon_Paste.png</normaloff>:/icons/icons/Icon_Paste.png</iconset>
|
||||||
<action name="actionRename">
|
</property>
|
||||||
<property name="icon">
|
<property name="text">
|
||||||
<iconset theme="QIcon::ThemeIcon::MailMessageNew"/>
|
<string>Paste</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
</action>
|
||||||
<string>Rename</string>
|
<action name="actionRename">
|
||||||
</property>
|
<property name="text">
|
||||||
</action>
|
<string>Rename</string>
|
||||||
<action name="actionEdit_Value">
|
</property>
|
||||||
<property name="text">
|
</action>
|
||||||
<string>Edit Value</string>
|
<action name="actionEdit_Value">
|
||||||
</property>
|
<property name="text">
|
||||||
</action>
|
<string>Edit Value</string>
|
||||||
<action name="actionEdit_as_Hex">
|
</property>
|
||||||
<property name="text">
|
</action>
|
||||||
<string>Edit as Hex</string>
|
<action name="actionEdit_as_Hex">
|
||||||
</property>
|
<property name="text">
|
||||||
</action>
|
<string>Edit as Hex</string>
|
||||||
<action name="actionDelete">
|
</property>
|
||||||
<property name="icon">
|
</action>
|
||||||
<iconset theme="QIcon::ThemeIcon::EditDelete"/>
|
<action name="actionDelete">
|
||||||
</property>
|
<property name="text">
|
||||||
<property name="text">
|
<string>Delete</string>
|
||||||
<string>Delete</string>
|
</property>
|
||||||
</property>
|
</action>
|
||||||
</action>
|
<action name="actiond">
|
||||||
<action name="actiond">
|
<property name="text">
|
||||||
<property name="text">
|
<string>d</string>
|
||||||
<string>d</string>
|
</property>
|
||||||
</property>
|
</action>
|
||||||
</action>
|
<action name="actiond_2">
|
||||||
<action name="actiond_2">
|
<property name="text">
|
||||||
<property name="text">
|
<string>d</string>
|
||||||
<string>d</string>
|
</property>
|
||||||
</property>
|
</action>
|
||||||
</action>
|
<action name="actionClear_Undo_History">
|
||||||
<action name="actionClear_Undo_History">
|
<property name="text">
|
||||||
<property name="text">
|
<string>Clear Undo History</string>
|
||||||
<string>Clear Undo History</string>
|
</property>
|
||||||
</property>
|
</action>
|
||||||
</action>
|
<action name="actionFind">
|
||||||
<action name="actionFind">
|
<property name="text">
|
||||||
<property name="text">
|
<string>Find</string>
|
||||||
<string>Find</string>
|
</property>
|
||||||
</property>
|
</action>
|
||||||
</action>
|
<action name="actionAbout">
|
||||||
<action name="actionAbout">
|
<property name="text">
|
||||||
<property name="icon">
|
<string>About</string>
|
||||||
<iconset theme="QIcon::ThemeIcon::HelpAbout"/>
|
</property>
|
||||||
</property>
|
</action>
|
||||||
<property name="text">
|
<action name="actionChange_Icons">
|
||||||
<string>About</string>
|
<property name="text">
|
||||||
</property>
|
<string>Change Icons</string>
|
||||||
</action>
|
</property>
|
||||||
<action name="actionChange_Icons">
|
</action>
|
||||||
<property name="text">
|
<action name="actionCheck_for_Updates">
|
||||||
<string>Change Icons</string>
|
<property name="text">
|
||||||
</property>
|
<string>Check for Updates</string>
|
||||||
</action>
|
</property>
|
||||||
<action name="actionCheck_for_Updates">
|
</action>
|
||||||
<property name="icon">
|
<action name="actionFind_2">
|
||||||
<iconset theme="QIcon::ThemeIcon::SyncSynchronizing"/>
|
<property name="icon">
|
||||||
</property>
|
<iconset resource="../data/data.qrc">
|
||||||
<property name="text">
|
<normaloff>:/icons/icons/Icon_Find.png</normaloff>:/icons/icons/Icon_Find.png</iconset>
|
||||||
<string>Check for Updates</string>
|
</property>
|
||||||
</property>
|
<property name="text">
|
||||||
</action>
|
<string>Find</string>
|
||||||
<action name="actionFind_2">
|
</property>
|
||||||
<property name="icon">
|
</action>
|
||||||
<iconset theme="QIcon::ThemeIcon::EditFind"/>
|
<action name="actionPreferences">
|
||||||
</property>
|
<property name="text">
|
||||||
<property name="text">
|
<string>Preferences...</string>
|
||||||
<string>Find</string>
|
</property>
|
||||||
</property>
|
</action>
|
||||||
</action>
|
<action name="actionReport_Issue">
|
||||||
</widget>
|
<property name="text">
|
||||||
<resources/>
|
<string>Report Issue</string>
|
||||||
<connections/>
|
</property>
|
||||||
</ui>
|
</action>
|
||||||
|
<action name="actionRun_Tests">
|
||||||
|
<property name="text">
|
||||||
|
<string>Run Tests</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
</widget>
|
||||||
|
<resources>
|
||||||
|
<include location="../data/data.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
43
app/materialviewer.cpp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#include "materialviewer.h"
|
||||||
|
#include "ui_materialviewer.h"
|
||||||
|
|
||||||
|
MaterialViewer::MaterialViewer(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
, ui(new Ui::MaterialViewer)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
MaterialViewer::~MaterialViewer()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ToHexStr(quint32 in)
|
||||||
|
{
|
||||||
|
return QString("%1").arg(in, 8, 16, QChar('0')).toUpper();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MaterialViewer::SetMaterial(const XMaterial* aMaterial)
|
||||||
|
{
|
||||||
|
Q_UNUSED(aMaterial);
|
||||||
|
|
||||||
|
// TODO: Fill in MaterialViewer::SetMaterial
|
||||||
|
|
||||||
|
// ui->lineEdit_NamePtr->setText(ToHexStr(aMaterial->namePtr));
|
||||||
|
// ui->lineEdit_Name->setText(aMaterial->name);
|
||||||
|
// ui->lineEdit_RefPtr->setText(ToHexStr(aMaterial->refNamePtr));
|
||||||
|
// ui->lineEdit_RefName->setText(aMaterial->refName);
|
||||||
|
// QString unknownStr = "";
|
||||||
|
// foreach (quint32 unknownPtr, aMaterial->pointers) {
|
||||||
|
// unknownStr += ToHexStr(unknownPtr) + "\n";
|
||||||
|
// }
|
||||||
|
// ui->lineEdit_Unknowns->setText(unknownStr);
|
||||||
|
// ui->lineEdit_StateA->setText(ToHexStr(aMaterial->stateBits[0]));
|
||||||
|
// ui->lineEdit_StateA->setText(ToHexStr(aMaterial->stateBits[1]));
|
||||||
|
// ui->spinBox_TextureCount->setValue(aMaterial->textureCount);
|
||||||
|
// ui->spinBox_ConstCount->setValue(aMaterial->constCount);
|
||||||
|
// ui->lineEdit_TechSetPtr->setText(ToHexStr(aMaterial->techSetPtr));
|
||||||
|
// ui->lineEdit_TexturePtr->setText(ToHexStr(aMaterial->texturePtr));
|
||||||
|
// ui->lineEdit_ConstantPtr->setText(ToHexStr(aMaterial->constPtr));
|
||||||
|
}
|
||||||
27
app/materialviewer.h
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#ifndef MATERIALVIEWER_H
|
||||||
|
#define MATERIALVIEWER_H
|
||||||
|
|
||||||
|
#include "xmaterial.h"
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QScrollArea>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class MaterialViewer;
|
||||||
|
}
|
||||||
|
|
||||||
|
class MaterialViewer : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit MaterialViewer(QWidget *parent = nullptr);
|
||||||
|
~MaterialViewer();
|
||||||
|
|
||||||
|
void SetMaterial(const XMaterial *aMaterial);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::MaterialViewer *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MATERIALVIEWER_H
|
||||||
236
app/materialviewer.ui
Normal file
@ -0,0 +1,236 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>MaterialViewer</class>
|
||||||
|
<widget class="QWidget" name="MaterialViewer">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>1001</width>
|
||||||
|
<height>650</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_Title">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>16</pointsize>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Material 0</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<item row="0" column="0" colspan="2">
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>325</width>
|
||||||
|
<height>398</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>325</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>9</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Header</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Name Ptr:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_NamePtr"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Name:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ref Ptr:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ref Name:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Unknowns:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>State A:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>State B:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="text">
|
||||||
|
<string>Texture Count:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Name"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_RefPtr"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_RefName"/>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Unknowns"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_StateA"/>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_StateB"/>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_TextureCount"/>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ConstCount"/>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_TechSetPtr"/>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<widget class="QLabel" name="label_12">
|
||||||
|
<property name="text">
|
||||||
|
<string>Constant Count:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0">
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>Tech Set Ptr:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="0">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>Texture Ptr:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="0">
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="text">
|
||||||
|
<string>Constant Ptr:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_TexturePtr"/>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_ConstantPtr"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_4">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>400</width>
|
||||||
|
<height>400</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>9</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Data</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_6"/>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>143</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
14
app/modelviewer.cpp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include "modelviewer.h"
|
||||||
|
#include "ui_modelviewer.h"
|
||||||
|
|
||||||
|
ModelViewer::ModelViewer(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
, ui(new Ui::ModelViewer)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
ModelViewer::~ModelViewer()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
22
app/modelviewer.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#ifndef MODELVIEWER_H
|
||||||
|
#define MODELVIEWER_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class ModelViewer;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ModelViewer : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit ModelViewer(QWidget *parent = nullptr);
|
||||||
|
~ModelViewer();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::ModelViewer *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MODELVIEWER_H
|
||||||
624
app/modelviewer.ui
Normal file
@ -0,0 +1,624 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>ModelViewer</class>
|
||||||
|
<widget class="QWidget" name="ModelViewer">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>1001</width>
|
||||||
|
<height>897</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Properties</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Name Pointer:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_NamePtr">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_42">
|
||||||
|
<property name="text">
|
||||||
|
<string>Model Name:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Tag Count:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_TagCount">
|
||||||
|
<property name="suffix">
|
||||||
|
<string> tags</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Root Tag Count: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_RootTagCount">
|
||||||
|
<property name="suffix">
|
||||||
|
<string> root tags</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Surface Count: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_SurfaceCount">
|
||||||
|
<property name="suffix">
|
||||||
|
<string> surfaces</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Unknown A:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_UnknownA">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bone Name Pointer:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_BoneNamePtr">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Parent List Pointer:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ParentListPtr">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="text">
|
||||||
|
<string>Quats Pointer:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_QuatsPtr">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0">
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>Transformation Pointer:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_TransPtr">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="0">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>Classification Pointer:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ClassPtr">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="0">
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="text">
|
||||||
|
<string>Base Material Pointer:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_BaseMatPtr">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="0">
|
||||||
|
<widget class="QLabel" name="label_12">
|
||||||
|
<property name="text">
|
||||||
|
<string>Surfaces Pointer;</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_SurfacesPtr">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="13" column="0">
|
||||||
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>Material Handlers Pointer:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="13" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_MatHandlesPtr">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="14" column="0">
|
||||||
|
<widget class="QLabel" name="label_23">
|
||||||
|
<property name="text">
|
||||||
|
<string>Coll Surf Pointer:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="14" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ClassPtr_2">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="15" column="0">
|
||||||
|
<widget class="QLabel" name="label_24">
|
||||||
|
<property name="text">
|
||||||
|
<string>Coll Surface Count:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="15" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ClassPtr_3">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="16" column="0">
|
||||||
|
<widget class="QLabel" name="label_25">
|
||||||
|
<property name="text">
|
||||||
|
<string>Contents:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="16" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ClassPtr_4">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="17" column="0">
|
||||||
|
<widget class="QLabel" name="label_26">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bone Info Pointer:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="17" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ClassPtr_5">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="18" column="0">
|
||||||
|
<widget class="QLabel" name="label_28">
|
||||||
|
<property name="text">
|
||||||
|
<string>Radius:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="18" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_2"/>
|
||||||
|
</item>
|
||||||
|
<item row="19" column="0">
|
||||||
|
<widget class="QLabel" name="label_29">
|
||||||
|
<property name="text">
|
||||||
|
<string>Min X: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="19" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_3"/>
|
||||||
|
</item>
|
||||||
|
<item row="20" column="0">
|
||||||
|
<widget class="QLabel" name="label_30">
|
||||||
|
<property name="text">
|
||||||
|
<string>Min Y: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="20" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_4"/>
|
||||||
|
</item>
|
||||||
|
<item row="21" column="0">
|
||||||
|
<widget class="QLabel" name="label_31">
|
||||||
|
<property name="text">
|
||||||
|
<string>Min Z: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="21" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_5"/>
|
||||||
|
</item>
|
||||||
|
<item row="22" column="0">
|
||||||
|
<widget class="QLabel" name="label_32">
|
||||||
|
<property name="text">
|
||||||
|
<string>Max X: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="22" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_6"/>
|
||||||
|
</item>
|
||||||
|
<item row="23" column="0">
|
||||||
|
<widget class="QLabel" name="label_33">
|
||||||
|
<property name="text">
|
||||||
|
<string>Max Y: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="23" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_7"/>
|
||||||
|
</item>
|
||||||
|
<item row="24" column="0">
|
||||||
|
<widget class="QLabel" name="label_34">
|
||||||
|
<property name="text">
|
||||||
|
<string>Max Z: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="24" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_8"/>
|
||||||
|
</item>
|
||||||
|
<item row="25" column="0">
|
||||||
|
<widget class="QLabel" name="label_35">
|
||||||
|
<property name="text">
|
||||||
|
<string>Lod Count:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="25" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ClassPtr_7">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="26" column="0">
|
||||||
|
<widget class="QLabel" name="label_36">
|
||||||
|
<property name="text">
|
||||||
|
<string>Coll Lod:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="26" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ClassPtr_8">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="27" column="0">
|
||||||
|
<widget class="QLabel" name="label_37">
|
||||||
|
<property name="text">
|
||||||
|
<string>Stream Info Pointer:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="27" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ClassPtr_9">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="28" column="0">
|
||||||
|
<widget class="QLabel" name="label_38">
|
||||||
|
<property name="text">
|
||||||
|
<string>Memory Usage:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="28" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ClassPtr_10">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="29" column="0">
|
||||||
|
<widget class="QLabel" name="label_39">
|
||||||
|
<property name="text">
|
||||||
|
<string>Flags:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="29" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ClassPtr_11">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="30" column="0">
|
||||||
|
<widget class="QLabel" name="label_40">
|
||||||
|
<property name="text">
|
||||||
|
<string>Phys Preset Pointer:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="30" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ClassPtr_12">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="31" column="0">
|
||||||
|
<widget class="QLabel" name="label_41">
|
||||||
|
<property name="text">
|
||||||
|
<string>Phys Geometry Pointer:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="31" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_ClassPtr_13">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="title">
|
||||||
|
<string>Lod Info</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_14">
|
||||||
|
<property name="text">
|
||||||
|
<string>Lod Info Index:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox_LodIndex"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="2">
|
||||||
|
<widget class="Line" name="line_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_15">
|
||||||
|
<property name="text">
|
||||||
|
<string>Distance:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_16">
|
||||||
|
<property name="text">
|
||||||
|
<string>Surface Count:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_BoneNamePtr_2">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_17">
|
||||||
|
<property name="text">
|
||||||
|
<string>Surface Index:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_BoneNamePtr_3">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_18">
|
||||||
|
<property name="text">
|
||||||
|
<string>Part Bit 1: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_BoneNamePtr_4">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="label_19">
|
||||||
|
<property name="text">
|
||||||
|
<string>Part Bit 2: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_BoneNamePtr_5">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="label_20">
|
||||||
|
<property name="text">
|
||||||
|
<string>Part Bit 3: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_BoneNamePtr_6">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<widget class="QLabel" name="label_21">
|
||||||
|
<property name="text">
|
||||||
|
<string>Part Bit 4: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_BoneNamePtr_7">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0">
|
||||||
|
<widget class="QLabel" name="label_22">
|
||||||
|
<property name="text">
|
||||||
|
<string>Part Bit 5: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_BoneNamePtr_8">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="Line" name="line">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_3DWindow">
|
||||||
|
<property name="title">
|
||||||
|
<string>3D Window</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
35
app/preferenceeditor.cpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#include "preferenceeditor.h"
|
||||||
|
#include "ui_preferenceeditor.h"
|
||||||
|
|
||||||
|
PreferenceEditor::PreferenceEditor(QWidget *parent)
|
||||||
|
: QDialog(parent)
|
||||||
|
, ui(new Ui::PreferenceEditor)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
ui->frame_View->show();
|
||||||
|
ui->frame_TreeWidget->hide();
|
||||||
|
ui->frame_FileEditors->hide();
|
||||||
|
|
||||||
|
connect(ui->listWidget_Categories, &QListWidget::itemSelectionChanged, this, [this]() {
|
||||||
|
const QString itemText = ui->listWidget_Categories->selectedItems().first()->text();
|
||||||
|
if (itemText == "View") {
|
||||||
|
ui->frame_View->show();
|
||||||
|
ui->frame_TreeWidget->hide();
|
||||||
|
ui->frame_FileEditors->hide();
|
||||||
|
} else if (itemText == "Tree Widget") {
|
||||||
|
ui->frame_View->hide();
|
||||||
|
ui->frame_TreeWidget->show();
|
||||||
|
ui->frame_FileEditors->hide();
|
||||||
|
} else if (itemText == "File Editors") {
|
||||||
|
ui->frame_View->hide();
|
||||||
|
ui->frame_TreeWidget->hide();
|
||||||
|
ui->frame_FileEditors->show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
PreferenceEditor::~PreferenceEditor()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
22
app/preferenceeditor.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#ifndef PREFERENCEEDITOR_H
|
||||||
|
#define PREFERENCEEDITOR_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class PreferenceEditor;
|
||||||
|
}
|
||||||
|
|
||||||
|
class PreferenceEditor : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit PreferenceEditor(QWidget *parent = nullptr);
|
||||||
|
~PreferenceEditor();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::PreferenceEditor *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // PREFERENCEEDITOR_H
|
||||||
528
app/preferenceeditor.ui
Normal file
@ -0,0 +1,528 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>PreferenceEditor</class>
|
||||||
|
<widget class="QDialog" name="PreferenceEditor">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>1118</width>
|
||||||
|
<height>861</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>703</width>
|
||||||
|
<height>512</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Filter</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="listWidget_Categories">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="currentRow">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>View</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="data/Data.qrc">
|
||||||
|
<normaloff>:/icons/icons/Icon_Views.png</normaloff>:/icons/icons/Icon_Views.png</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Tree Widget</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="data/Data.qrc">
|
||||||
|
<normaloff>:/icons/icons/Icon_Tree.png</normaloff>:/icons/icons/Icon_Tree.png</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>File Editors</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="data/Data.qrc">
|
||||||
|
<normaloff>:/icons/icons/Icon_Editor.png</normaloff>:/icons/icons/Icon_Editor.png</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame_View">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Shape::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Shadow::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="data/Data.qrc">:/icons/icons/Icon_Views.png</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>View</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTabWidget" name="tabWidget_Editors_3">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tab_3">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Font && Colors</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Font</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Family:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="comboBox_FontFamily"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Size:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="spinBox_FontSize"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="text">
|
||||||
|
<string>Zoom:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="spinBox_ViewZoom">
|
||||||
|
<property name="suffix">
|
||||||
|
<string>%</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>588</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame_TreeWidget">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Shape::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Shadow::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="data/Data.qrc">:/icons/icons/Icon_Tree.png</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Tree Widget</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTabWidget" name="tabWidget_Editors">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Tab 1</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_2">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Tab 2</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame_FileEditors">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Shape::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Shadow::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="data/Data.qrc">:/icons/icons/Icon_Editor.png</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>File Editors</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTabWidget" name="tabWidget_Editors_2">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>7</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tab_FastFile">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Fast File</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_Zone">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Zone File</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_IWIFile">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Images</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_LocalString">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Local Strings</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab__StringTable">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>String Table</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_Sounds">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Sounds</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_TechSet">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Tech Set</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_Model">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Model</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_6">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Page</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::StandardButton::Apply|QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources>
|
||||||
|
<include location="data/Data.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>PreferenceEditor</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>248</x>
|
||||||
|
<y>254</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>PreferenceEditor</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>316</x>
|
||||||
|
<y>260</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
||||||
103
app/reportissuedialog.cpp
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
#include "reportissuedialog.h"
|
||||||
|
#include "qjsonarray.h"
|
||||||
|
#include "ui_reportissuedialog.h"
|
||||||
|
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QNetworkRequest>
|
||||||
|
|
||||||
|
ReportIssueDialog::ReportIssueDialog(const QString &giteaBaseUrl,
|
||||||
|
const QString &repoOwner,
|
||||||
|
const QString &repoName,
|
||||||
|
const QString &accessToken,
|
||||||
|
QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::ReportIssueDialog),
|
||||||
|
networkManager(new QNetworkAccessManager(this)),
|
||||||
|
giteaBaseUrl(giteaBaseUrl),
|
||||||
|
repoOwner(repoOwner),
|
||||||
|
repoName(repoName),
|
||||||
|
accessToken(accessToken)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
connect(networkManager, &QNetworkAccessManager::finished, this, &ReportIssueDialog::onNetworkReplyFinished);
|
||||||
|
}
|
||||||
|
|
||||||
|
ReportIssueDialog::~ReportIssueDialog()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportIssueDialog::on_buttonSend_clicked()
|
||||||
|
{
|
||||||
|
QString title = ui->lineEditSummary->text().trimmed();
|
||||||
|
QString details = ui->textEditDetails->toPlainText().trimmed();
|
||||||
|
QString contact = ui->lineEditContact->text().trimmed();
|
||||||
|
|
||||||
|
if (title.isEmpty()) {
|
||||||
|
QMessageBox::warning(this, tr("Input Error"), tr("Please enter a summary/title for the issue."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString body = details;
|
||||||
|
if (!contact.isEmpty()) {
|
||||||
|
body += QString("\n\nContact info:\n%1").arg(contact);
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->buttonSend->setEnabled(false);
|
||||||
|
sendIssueReport(title, body, contact);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportIssueDialog::on_buttonCancel_clicked()
|
||||||
|
{
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportIssueDialog::sendIssueReport(const QString &title, const QString &body, const QString &/*contact*/)
|
||||||
|
{
|
||||||
|
// Compose URL: e.g. https://gitea.example.com/api/v1/repos/{owner}/{repo}/issues
|
||||||
|
QUrl url(QString("%1/api/v1/repos/%2/%3/issues").arg(giteaBaseUrl).arg(repoOwner).arg(repoName));
|
||||||
|
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
||||||
|
|
||||||
|
if (!accessToken.isEmpty()) {
|
||||||
|
request.setRawHeader("Authorization", "token " + accessToken.toUtf8());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Compose JSON body
|
||||||
|
QJsonObject json;
|
||||||
|
json["title"] = title;
|
||||||
|
json["body"] = body;
|
||||||
|
json["labels"] = QJsonArray{12};
|
||||||
|
|
||||||
|
QJsonDocument doc(json);
|
||||||
|
QByteArray data = doc.toJson();
|
||||||
|
|
||||||
|
networkManager->post(request, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportIssueDialog::onNetworkReplyFinished(QNetworkReply *reply)
|
||||||
|
{
|
||||||
|
ui->buttonSend->setEnabled(true);
|
||||||
|
|
||||||
|
QByteArray responseData = reply->readAll();
|
||||||
|
QString responseStr = QString::fromUtf8(responseData);
|
||||||
|
|
||||||
|
if (reply->error() != QNetworkReply::NoError) {
|
||||||
|
QString errorStr = reply->errorString();
|
||||||
|
if (errorStr.isEmpty()) errorStr = "Unknown network error";
|
||||||
|
QMessageBox::critical(this, tr("Error"), tr("Failed to send issue report:\n%1\nResponse:\n%2").arg(errorStr).arg(responseStr));
|
||||||
|
} else {
|
||||||
|
int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
||||||
|
if (status == 201) {
|
||||||
|
QMessageBox::information(this, tr("Success"), tr("Issue reported successfully!"));
|
||||||
|
accept();
|
||||||
|
} else {
|
||||||
|
QMessageBox::warning(this, tr("Failed"), tr("Unexpected response from server (%1):\n%2").arg(status).arg(responseStr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reply->deleteLater();
|
||||||
|
}
|
||||||
43
app/reportissuedialog.h
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#ifndef REPORTISSUEDIALOG_H
|
||||||
|
#define REPORTISSUEDIALOG_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QNetworkAccessManager>
|
||||||
|
#include <QNetworkReply>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class ReportIssueDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ReportIssueDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit ReportIssueDialog(const QString &giteaBaseUrl,
|
||||||
|
const QString &repoOwner,
|
||||||
|
const QString &repoName,
|
||||||
|
const QString &accessToken,
|
||||||
|
QWidget *parent = nullptr);
|
||||||
|
~ReportIssueDialog();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_buttonSend_clicked();
|
||||||
|
void on_buttonCancel_clicked();
|
||||||
|
|
||||||
|
void onNetworkReplyFinished(QNetworkReply *reply);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::ReportIssueDialog *ui;
|
||||||
|
|
||||||
|
QNetworkAccessManager *networkManager;
|
||||||
|
|
||||||
|
QString giteaBaseUrl;
|
||||||
|
QString repoOwner;
|
||||||
|
QString repoName;
|
||||||
|
QString accessToken;
|
||||||
|
|
||||||
|
void sendIssueReport(const QString &title, const QString &body, const QString &contact);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // REPORTISSUEDIALOG_H
|
||||||
84
app/reportissuedialog.ui
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>ReportIssueDialog</class>
|
||||||
|
<widget class="QDialog" name="ReportIssueDialog">
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Report a Problem</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="labelInstructions">
|
||||||
|
<property name="text">
|
||||||
|
<string>Please describe the problem you encountered. We’ll use this info to help fix it.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="labelSummary">
|
||||||
|
<property name="text">
|
||||||
|
<string>Summary (short title):</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEditSummary" />
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="labelDetails">
|
||||||
|
<property name="text">
|
||||||
|
<string>Details (what happened?):</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="textEditDetails" />
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="labelContact">
|
||||||
|
<property name="text">
|
||||||
|
<string>Your contact (email or name, optional):</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEditContact" />
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="buttonLayout">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="buttonSend">
|
||||||
|
<property name="text">
|
||||||
|
<string>Send Report</string>
|
||||||
|
</property>
|
||||||
|
<property name="default">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="buttonCancel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Cancel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
58
app/rumblefileviewer.cpp
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#include "rumblefileviewer.h"
|
||||||
|
#include "ui_rumblefileviewer.h"
|
||||||
|
|
||||||
|
RumbleFileViewer::RumbleFileViewer(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
, ui(new Ui::RumbleFileViewer)
|
||||||
|
, mPropertyCount()
|
||||||
|
, mRumbleFile(nullptr) {
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
ui->tableWidget_Properties->setColumnCount(2);
|
||||||
|
ui->tableWidget_Properties->setRowCount(0);
|
||||||
|
ui->tableWidget_Properties->setColumnWidth(0, 200);
|
||||||
|
ui->tableWidget_Properties->horizontalHeader()->setStretchLastSection(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
RumbleFileViewer::~RumbleFileViewer() {
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RumbleFileViewer::SetRumbleFile(XRawFile *aRumbleFile) {
|
||||||
|
mRumbleFile = aRumbleFile;
|
||||||
|
|
||||||
|
ui->tableWidget_Properties->clear();
|
||||||
|
|
||||||
|
// const QString magic = aRumbleFile->contents.left(6);
|
||||||
|
// if (magic != "RUMBLE") {
|
||||||
|
// qDebug() << "Rumble file has invalid magic: " << magic;
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// int firstIndex = 0;
|
||||||
|
// int secondIndex = 0;
|
||||||
|
// int thirdIndex = 0;
|
||||||
|
|
||||||
|
// int startIndex = 0;
|
||||||
|
// for (int i = 0; i < aRumbleFile->contents.count("\\") / 2; i++) {
|
||||||
|
// ui->tableWidget_Properties->setRowCount(i + 1);
|
||||||
|
// ui->spinBox_Entries->setValue(i + 1);
|
||||||
|
|
||||||
|
// firstIndex = aRumbleFile->contents.indexOf("\\", startIndex);
|
||||||
|
// secondIndex = aRumbleFile->contents.indexOf("\\", firstIndex + 1);
|
||||||
|
// thirdIndex = aRumbleFile->contents.indexOf("\\", secondIndex + 1);
|
||||||
|
// if (thirdIndex == -1) {
|
||||||
|
// thirdIndex = aRumbleFile->contents.size();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const QString keyStr = aRumbleFile->contents.mid(firstIndex + 1, secondIndex - firstIndex - 1);
|
||||||
|
// QTableWidgetItem *keyItem = new QTableWidgetItem(keyStr);
|
||||||
|
// ui->tableWidget_Properties->setItem(i, 0, keyItem);
|
||||||
|
|
||||||
|
// const QString valStr = aRumbleFile->contents.mid(secondIndex + 1, thirdIndex - secondIndex - 1);
|
||||||
|
// QTableWidgetItem *valueItem = new QTableWidgetItem(valStr);
|
||||||
|
// ui->tableWidget_Properties->setItem(i, 1, valueItem);
|
||||||
|
|
||||||
|
// startIndex = thirdIndex;
|
||||||
|
// }
|
||||||
|
}
|
||||||
28
app/rumblefileviewer.h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef RUMBLEFILEVIEWER_H
|
||||||
|
#define RUMBLEFILEVIEWER_H
|
||||||
|
|
||||||
|
#include "xrawfile.h"
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class RumbleFileViewer;
|
||||||
|
}
|
||||||
|
|
||||||
|
class RumbleFileViewer : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit RumbleFileViewer(QWidget *parent = nullptr);
|
||||||
|
~RumbleFileViewer();
|
||||||
|
|
||||||
|
void SetRumbleFile(XRawFile* aRumbleFile);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::RumbleFileViewer *ui;
|
||||||
|
quint32 mPropertyCount;
|
||||||
|
XRawFile* mRumbleFile;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // RUMBLEFILEVIEWER_H
|
||||||
153
app/rumblefileviewer.ui
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>RumbleFileViewer</class>
|
||||||
|
<widget class="QWidget" name="RumbleFileViewer">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>841</width>
|
||||||
|
<height>457</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>841</width>
|
||||||
|
<height>457</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_Title">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>16</pointsize>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Rumble File Viewer</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0" colspan="2">
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>325</width>
|
||||||
|
<height>398</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>325</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>9</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Header</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="2" column="0" colspan="3">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" colspan="2">
|
||||||
|
<widget class="QSpinBox" name="spinBox_Entries">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>10000</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Entries:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_LocalStrViewer">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>400</width>
|
||||||
|
<height>400</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>9</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Properties</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QTableWidget" name="tableWidget_Properties">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
54
app/rumblegraphviewer.cpp
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
#include "rumblegraphviewer.h"
|
||||||
|
#include "ui_rumblegraphviewer.h"
|
||||||
|
|
||||||
|
RumbleGraphViewer::RumbleGraphViewer(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
, ui(new Ui::RumbleGraphViewer),
|
||||||
|
mEntryCount(),
|
||||||
|
mRumbleGraphFile(nullptr) {
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
ui->tableWidget_Entries->setColumnCount(2);
|
||||||
|
ui->tableWidget_Entries->setHorizontalHeaderLabels({ "X", "Y" });
|
||||||
|
ui->tableWidget_Entries->setRowCount(0);
|
||||||
|
ui->tableWidget_Entries->setColumnWidth(0, 200);
|
||||||
|
ui->tableWidget_Entries->horizontalHeader()->setStretchLastSection(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
RumbleGraphViewer::~RumbleGraphViewer() {
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RumbleGraphViewer::SetRumbleGraphFile(const XRawFile* aRawFile) {
|
||||||
|
mRumbleGraphFile = aRawFile;
|
||||||
|
|
||||||
|
XDataStream rawFileStream;//(mRumbleGraphFile->contents.toLatin1());
|
||||||
|
|
||||||
|
QByteArray magic(15, Qt::Uninitialized);
|
||||||
|
rawFileStream.readRawData(magic.data(), 15);
|
||||||
|
|
||||||
|
rawFileStream.skipRawData(4);
|
||||||
|
|
||||||
|
char sectionChar;
|
||||||
|
rawFileStream >> sectionChar;
|
||||||
|
int sectionCount = sectionChar - '0';
|
||||||
|
ui->tableWidget_Entries->setRowCount(sectionCount);
|
||||||
|
ui->spinBox_Entries->setValue(sectionCount);
|
||||||
|
ui->groupBox_LocalStrViewer->setTitle(QString("Entries (%1)").arg(sectionCount));
|
||||||
|
|
||||||
|
rawFileStream.skipRawData(2);
|
||||||
|
|
||||||
|
for (int i = 0; i < sectionCount; i++) {
|
||||||
|
QByteArray xVal(6, Qt::Uninitialized), yVal(6, Qt::Uninitialized);
|
||||||
|
rawFileStream.readRawData(xVal.data(), 6);
|
||||||
|
rawFileStream.skipRawData(1);
|
||||||
|
rawFileStream.readRawData(yVal.data(), 6);
|
||||||
|
rawFileStream.skipRawData(2);
|
||||||
|
|
||||||
|
QTableWidgetItem *xItem = new QTableWidgetItem(xVal);
|
||||||
|
QTableWidgetItem *yItem = new QTableWidgetItem(yVal);
|
||||||
|
|
||||||
|
ui->tableWidget_Entries->setItem(i, 0, xItem);
|
||||||
|
ui->tableWidget_Entries->setItem(i, 1, yItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
30
app/rumblegraphviewer.h
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#ifndef RUMBLEGRAPHVIEWER_H
|
||||||
|
#define RUMBLEGRAPHVIEWER_H
|
||||||
|
|
||||||
|
#include "xrawfile.h"
|
||||||
|
#include "zonefile.h"
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class RumbleGraphViewer;
|
||||||
|
}
|
||||||
|
|
||||||
|
class RumbleGraphViewer : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit RumbleGraphViewer(QWidget *parent = nullptr);
|
||||||
|
~RumbleGraphViewer();
|
||||||
|
|
||||||
|
void SetEntryCount(quint32 aCount);
|
||||||
|
void SetRumbleGraphFile(const XRawFile *aRawFile);
|
||||||
|
void SetZoneFile(ZoneFile* aZoneFile);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::RumbleGraphViewer *ui;
|
||||||
|
quint32 mEntryCount;
|
||||||
|
const XRawFile* mRumbleGraphFile;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // RUMBLEGRAPHVIEWER_H
|
||||||
153
app/rumblegraphviewer.ui
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>RumbleGraphViewer</class>
|
||||||
|
<widget class="QWidget" name="RumbleGraphViewer">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>841</width>
|
||||||
|
<height>457</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>841</width>
|
||||||
|
<height>457</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_Title">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>16</pointsize>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Rumble Graph File </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0" colspan="2">
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>325</width>
|
||||||
|
<height>398</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>325</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>9</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Header</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Entry Count: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" colspan="2">
|
||||||
|
<widget class="QSpinBox" name="spinBox_Entries">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>10000</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="3">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_LocalStrViewer">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>400</width>
|
||||||
|
<height>400</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>9</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Entries</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QTableWidget" name="tableWidget_Entries">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
80
app/soundviewer.cpp
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
#include "soundviewer.h"
|
||||||
|
#include "ui_soundviewer.h"
|
||||||
|
|
||||||
|
SoundViewer::SoundViewer(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
, ui(new Ui::SoundViewer)
|
||||||
|
, player(new QMediaPlayer())
|
||||||
|
, buffer(new QBuffer())
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
connect(ui->pushButton_Play, &QPushButton::clicked, player, &QMediaPlayer::play);
|
||||||
|
connect(ui->pushButton_Pause, &QPushButton::clicked, player, &QMediaPlayer::pause);
|
||||||
|
connect(ui->pushButton_Stop, &QPushButton::clicked, this, [this]() {
|
||||||
|
if (player->isPlaying()) {
|
||||||
|
player->stop();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
connect(ui->pushButton_SkipForward, &QPushButton::clicked, this, [this]() {
|
||||||
|
player->setPosition(player->position() + 30);
|
||||||
|
});
|
||||||
|
connect(ui->pushButton_SkipBack, &QPushButton::clicked, this, [this]() {
|
||||||
|
player->setPosition(player->position() - 30);
|
||||||
|
});
|
||||||
|
connect(player, &QMediaPlayer::positionChanged, player, [this](qint64 position) {
|
||||||
|
ui->horizontalSlider->setSliderPosition(position);
|
||||||
|
ui->label_Time->setText(QString("%1:%2:%3")
|
||||||
|
.arg(position / 60000)
|
||||||
|
.arg((position % 60000) / 1000)
|
||||||
|
.arg(position % 1000));
|
||||||
|
});
|
||||||
|
connect(player, &QMediaPlayer::durationChanged, player, [this](qint64 duration) {
|
||||||
|
ui->horizontalSlider->setMaximum(duration);
|
||||||
|
ui->label_TimeMax->setText(QString("%1:%2:%3")
|
||||||
|
.arg(duration / 60000)
|
||||||
|
.arg((duration % 60000) / 1000)
|
||||||
|
.arg(duration % 1000));
|
||||||
|
});
|
||||||
|
connect(ui->horizontalSlider, &QSlider::sliderMoved, this, [this](int position) {
|
||||||
|
player->setPosition(position);
|
||||||
|
});
|
||||||
|
|
||||||
|
for (auto outputDevice : QMediaDevices::audioOutputs()) {
|
||||||
|
ui->comboBox_Output->addItem(outputDevice.description());
|
||||||
|
}
|
||||||
|
connect(ui->comboBox_Output, &QComboBox::currentIndexChanged, this, [this](int index) {
|
||||||
|
auto outputDevice = QMediaDevices::audioOutputs()[index];
|
||||||
|
QAudioOutput *audioOutput = new QAudioOutput(outputDevice);
|
||||||
|
player->setAudioOutput(audioOutput);
|
||||||
|
});
|
||||||
|
|
||||||
|
auto outputDevice = QMediaDevices::defaultAudioOutput();
|
||||||
|
QAudioOutput *audioOutput = new QAudioOutput(outputDevice);
|
||||||
|
player->setAudioOutput(audioOutput);
|
||||||
|
}
|
||||||
|
|
||||||
|
SoundViewer::~SoundViewer()
|
||||||
|
{
|
||||||
|
delete buffer;
|
||||||
|
delete player;
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
// void SoundViewer::SetSound(std::shared_ptr<Sound> aSound)
|
||||||
|
// {
|
||||||
|
// buffer->setData(aSound->data);
|
||||||
|
// if (!buffer->open(QIODevice::ReadOnly)) {
|
||||||
|
// qWarning() << "Failed to open QBuffer.";
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ui->groupBox->setTitle(aSound->path);
|
||||||
|
// player->setSourceDevice(buffer);
|
||||||
|
// }
|
||||||
|
|
||||||
|
void SoundViewer::SetOutput(QAudioOutput *aOutput) {
|
||||||
|
if (!aOutput) { return; }
|
||||||
|
|
||||||
|
player->setAudioOutput(aOutput);
|
||||||
|
}
|
||||||
32
app/soundviewer.h
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#ifndef SOUNDVIEWER_H
|
||||||
|
#define SOUNDVIEWER_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QMediaPlayer>
|
||||||
|
#include <QBuffer>
|
||||||
|
#include <QAudioDevice>
|
||||||
|
#include <QMediaDevices>
|
||||||
|
#include <QAudioOutput>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class SoundViewer;
|
||||||
|
}
|
||||||
|
|
||||||
|
class SoundViewer : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit SoundViewer(QWidget *parent = nullptr);
|
||||||
|
~SoundViewer();
|
||||||
|
|
||||||
|
//void SetSound(std::shared_ptr<Sound> aSound);
|
||||||
|
|
||||||
|
void SetOutput(QAudioOutput *aOutput);
|
||||||
|
private:
|
||||||
|
Ui::SoundViewer *ui;
|
||||||
|
QMediaPlayer *player;
|
||||||
|
QBuffer *buffer;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SOUNDVIEWER_H
|
||||||
2573
app/soundviewer.ui
Normal file
35
app/stringtableviewer.cpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#include "stringtableviewer.h"
|
||||||
|
#include "ui_stringtableviewer.h"
|
||||||
|
|
||||||
|
StringTableViewer::StringTableViewer(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
, ui(new Ui::StringTableViewer)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
StringTableViewer::~StringTableViewer()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StringTableViewer::SetStringTable(const XStringTable *aStringTable) {
|
||||||
|
ui->tableWidget_Strings->clear();
|
||||||
|
|
||||||
|
ui->tableWidget_Strings->setRowCount(aStringTable->GetRowCount());
|
||||||
|
ui->tableWidget_Strings->setColumnCount(aStringTable->GetColumnCount());
|
||||||
|
|
||||||
|
int currentIndex = 0;
|
||||||
|
for (auto value : *aStringTable->GetValues()) {
|
||||||
|
|
||||||
|
QTableWidgetItem *tableKeyItem = new QTableWidgetItem();
|
||||||
|
tableKeyItem->setText(value->GetName());
|
||||||
|
ui->tableWidget_Strings->setItem(currentIndex, 0, tableKeyItem);
|
||||||
|
|
||||||
|
QTableWidgetItem *tableValItem = new QTableWidgetItem();
|
||||||
|
tableValItem->setText(value->GetString());
|
||||||
|
ui->tableWidget_Strings->setItem(currentIndex, 1, tableValItem);
|
||||||
|
|
||||||
|
currentIndex++;
|
||||||
|
}
|
||||||
|
}
|
||||||
26
app/stringtableviewer.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#ifndef STRINGTABLEVIEWER_H
|
||||||
|
#define STRINGTABLEVIEWER_H
|
||||||
|
|
||||||
|
#include "xstringtable.h"
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class StringTableViewer;
|
||||||
|
}
|
||||||
|
|
||||||
|
class StringTableViewer : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit StringTableViewer(QWidget *parent = nullptr);
|
||||||
|
~StringTableViewer();
|
||||||
|
|
||||||
|
void SetStringTable(const XStringTable *aStringTable);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::StringTableViewer *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // STRINGTABLEVIEWER_H
|
||||||
24
app/stringtableviewer.ui
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>StringTableViewer</class>
|
||||||
|
<widget class="QWidget" name="StringTableViewer">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>525</width>
|
||||||
|
<height>752</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QTableWidget" name="tableWidget_Strings"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
25
app/techsetviewer.cpp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#include "techsetviewer.h"
|
||||||
|
#include "ui_techsetviewer.h"
|
||||||
|
|
||||||
|
TechSetViewer::TechSetViewer(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
, ui(new Ui::TechSetViewer)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
TechSetViewer::~TechSetViewer()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TechSetViewer::SetTechSet(const XMaterialTechniqueSet* aTechSet) {
|
||||||
|
//ui->listWidget_Ptrs->clear();
|
||||||
|
ui->label_Title->setText(aTechSet->GetName());
|
||||||
|
|
||||||
|
// int ptrIndex = 1;
|
||||||
|
//for (auto ptr : aTechSet->pointers) {
|
||||||
|
// ui->listWidget_Ptrs->addItem(QString("Pointer %1: %2").arg(ptrIndex).arg(ptr));
|
||||||
|
// ptrIndex++;
|
||||||
|
//}
|
||||||
|
}
|
||||||
@ -1,25 +1,26 @@
|
|||||||
#ifndef TECHSETVIEWER_H
|
#ifndef TECHSETVIEWER_H
|
||||||
#define TECHSETVIEWER_H
|
#define TECHSETVIEWER_H
|
||||||
|
|
||||||
#include "asset_structs.h"
|
#include "xmaterialtechniqueset.h"
|
||||||
#include <QWidget>
|
|
||||||
|
#include <QWidget>
|
||||||
namespace Ui {
|
|
||||||
class TechSetViewer;
|
namespace Ui {
|
||||||
}
|
class TechSetViewer;
|
||||||
|
}
|
||||||
class TechSetViewer : public QWidget
|
|
||||||
{
|
class TechSetViewer : public QWidget
|
||||||
Q_OBJECT
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
|
||||||
explicit TechSetViewer(QWidget *parent = nullptr);
|
public:
|
||||||
~TechSetViewer();
|
explicit TechSetViewer(QWidget *parent = nullptr);
|
||||||
|
~TechSetViewer();
|
||||||
void SetTechSet(std::shared_ptr<TechSet> aTechSet);
|
|
||||||
|
void SetTechSet(const XMaterialTechniqueSet *aTechSet);
|
||||||
private:
|
|
||||||
Ui::TechSetViewer *ui;
|
private:
|
||||||
};
|
Ui::TechSetViewer *ui;
|
||||||
|
};
|
||||||
#endif // TECHSETVIEWER_H
|
|
||||||
|
#endif // TECHSETVIEWER_H
|
||||||
151
app/techsetviewer.ui
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>TechSetViewer</class>
|
||||||
|
<widget class="QWidget" name="TechSetViewer">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>880</width>
|
||||||
|
<height>559</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_Title">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>16</pointsize>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Technique Set 0</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Set Parameters</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Name:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Name">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Technique set name</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>World Vertex Format:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="spinBox_WorldVertFormat"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="listWidget_Techniques"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>Current Technique</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Name:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_TechniqueName">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Technique set name</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Flags:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="spinBox_Flags"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>Pass Count:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="spinBox_PassCount"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Material Pass</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
806
app/xtreewidget.cpp
Normal file
@ -0,0 +1,806 @@
|
|||||||
|
#include "xtreewidget.h"
|
||||||
|
#include "qheaderview.h"
|
||||||
|
#include "qmenu.h"
|
||||||
|
#include "logmanager.h"
|
||||||
|
|
||||||
|
XTreeWidget::XTreeWidget(QWidget *parent)
|
||||||
|
: QTreeWidget(parent) {
|
||||||
|
mFastFiles = QMap<QString, const FastFile*>();
|
||||||
|
mZoneFiles = QMap<QString, const ZoneFile*>();
|
||||||
|
mDDSFiles = QMap<QString, const DDSFile*>();
|
||||||
|
mIWIFiles = QMap<QString, const IWIFile*>();
|
||||||
|
|
||||||
|
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
|
setSelectionMode(QTreeWidget::SingleSelection);
|
||||||
|
setColumnCount(3);
|
||||||
|
header()->hide();
|
||||||
|
setMinimumWidth(350);
|
||||||
|
setSortingEnabled(true);
|
||||||
|
setIconSize(QSize(16, 16));
|
||||||
|
|
||||||
|
header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
|
|
||||||
|
// Set the last two columns to a fixed width
|
||||||
|
//header()->setSectionResizeMode(1, QHeaderView::Fixed);
|
||||||
|
//header()->setSectionResizeMode(2, QHeaderView::Fixed);
|
||||||
|
|
||||||
|
// Adjust the fixed widths to suit your icon size (e.g., 32 pixels)
|
||||||
|
//header()->resizeSection(0, 275);
|
||||||
|
//header()->resizeSection(1, 32);
|
||||||
|
//header()->resizeSection(2, 32);
|
||||||
|
|
||||||
|
connect(this, &XTreeWidget::itemSelectionChanged, this, &XTreeWidget::ItemSelectionChanged);
|
||||||
|
connect(this, &XTreeWidget::customContextMenuRequested, this, &XTreeWidget::PrepareContextMenu);
|
||||||
|
}
|
||||||
|
|
||||||
|
XTreeWidget::~XTreeWidget() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void XTreeWidget::AddFastFile(FastFile* aFastFile) {
|
||||||
|
XTreeWidgetItem *fastFileItem = new XTreeWidgetItem(this);
|
||||||
|
fastFileItem->setText(0, aFastFile->GetStem());
|
||||||
|
fastFileItem->setIcon(0, Utils::CreateAssetIcon("FF"));
|
||||||
|
if (aFastFile->GetPlatform() == "PC") {
|
||||||
|
fastFileItem->setIcon(1, Utils::CreateAssetIcon("PC"));
|
||||||
|
} else if (aFastFile->GetPlatform() == "360") {
|
||||||
|
fastFileItem->setIcon(1, Utils::CreateAssetIcon("360"));
|
||||||
|
} else if (aFastFile->GetPlatform() == "PS3") {
|
||||||
|
fastFileItem->setIcon(1, Utils::CreateAssetIcon("PS3"));
|
||||||
|
} else if (aFastFile->GetPlatform() == "Wii") {
|
||||||
|
fastFileItem->setIcon(1, Utils::CreateAssetIcon("WII"));
|
||||||
|
} else if (aFastFile->GetPlatform() == "WiiU") {
|
||||||
|
fastFileItem->setIcon(1, Utils::CreateAssetIcon("WU"));
|
||||||
|
}
|
||||||
|
if (aFastFile->GetGame() == "COD2") {
|
||||||
|
fastFileItem->setIcon(2, Utils::CreateGameIcon(2));
|
||||||
|
} if (aFastFile->GetGame() == "COD4") {
|
||||||
|
fastFileItem->setIcon(2, Utils::CreateGameIcon(4));
|
||||||
|
} else if (aFastFile->GetGame() == "COD5") {
|
||||||
|
fastFileItem->setIcon(2, Utils::CreateGameIcon(5));
|
||||||
|
} else if (aFastFile->GetGame() == "COD6") {
|
||||||
|
fastFileItem->setIcon(2, Utils::CreateGameIcon(6));
|
||||||
|
} else if (aFastFile->GetGame() == "COD7") {
|
||||||
|
fastFileItem->setIcon(2, Utils::CreateGameIcon(7));
|
||||||
|
} else if (aFastFile->GetGame() == "COD8") {
|
||||||
|
fastFileItem->setIcon(2, Utils::CreateGameIcon(8));
|
||||||
|
} else if (aFastFile->GetGame() == "COD9") {
|
||||||
|
fastFileItem->setIcon(2, Utils::CreateGameIcon(9));
|
||||||
|
} else if (aFastFile->GetGame() == "COD10") {
|
||||||
|
fastFileItem->setIcon(2, Utils::CreateGameIcon(10));
|
||||||
|
} else if (aFastFile->GetGame() == "COD11") {
|
||||||
|
fastFileItem->setIcon(2, Utils::CreateGameIcon(11));
|
||||||
|
} else if (aFastFile->GetGame() == "COD12") {
|
||||||
|
fastFileItem->setIcon(2, Utils::CreateGameIcon(12));
|
||||||
|
}
|
||||||
|
|
||||||
|
AddZoneFile(aFastFile->GetZoneFile(), fastFileItem);
|
||||||
|
|
||||||
|
mFastFiles[aFastFile->GetStem()] = aFastFile;
|
||||||
|
|
||||||
|
resizeColumnToContents(1);
|
||||||
|
setSortingEnabled(true);
|
||||||
|
sortByColumn(0, Qt::AscendingOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
void XTreeWidget::AddZoneFile(const ZoneFile* aZoneFile, XTreeWidgetItem *aParentItem) {
|
||||||
|
XTreeWidgetItem *zoneItem;
|
||||||
|
if (aParentItem != nullptr) {
|
||||||
|
zoneItem = new XTreeWidgetItem(aParentItem);
|
||||||
|
} else {
|
||||||
|
zoneItem = new XTreeWidgetItem(this);
|
||||||
|
}
|
||||||
|
zoneItem->setIcon(0, Utils::CreateAssetIcon("ZF"));
|
||||||
|
zoneItem->setText(0, aZoneFile->GetBaseStem() + ".zone");
|
||||||
|
|
||||||
|
XAssetList assetList = aZoneFile->GetAssetList();
|
||||||
|
QVector<XAsset*> localizeEntries;
|
||||||
|
for (int i = 0; i < assetList.Size(); i++)
|
||||||
|
{
|
||||||
|
XAsset *currentAsset = assetList.GetAsset(i);
|
||||||
|
if (currentAsset->GetType() == ASSET_TYPE_LOCALIZE_ENTRY)
|
||||||
|
{
|
||||||
|
localizeEntries.append(currentAsset);
|
||||||
|
} else if (currentAsset->GetType() == ASSET_TYPE_LOCALIZE_ENTRY)
|
||||||
|
{
|
||||||
|
localizeEntries.append(currentAsset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// if (!assetMap.localizeEntries.isEmpty()) {
|
||||||
|
// QIcon localStrIcon = Utils::CreateAssetIcon(ASSET_TYPE_LOCALIZE_ENTRY);
|
||||||
|
|
||||||
|
// XTreeWidgetItem *localStrRoot = new XTreeWidgetItem(zoneItem);
|
||||||
|
// localStrRoot->setText(0, "String Files");
|
||||||
|
// localStrRoot->setIcon(0, localStrIcon);
|
||||||
|
// localStrRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
|
||||||
|
// XTreeWidgetItem *localStrItem = new XTreeWidgetItem(localStrRoot);
|
||||||
|
// localStrItem->setText(0, aZoneFile->GetStem().section('.', 0, 0) + ".str");
|
||||||
|
// localStrItem->setIcon(0, localStrIcon);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!assetMap.techSets.isEmpty()) {
|
||||||
|
// QIcon techSetIcon = Utils::CreateAssetIcon(ASSET_TYPE_TECHNIQUE_SET);
|
||||||
|
|
||||||
|
// XTreeWidgetItem *techSetRoot = new XTreeWidgetItem(zoneItem);
|
||||||
|
// techSetRoot->setText(0, "Tech Sets");
|
||||||
|
// techSetRoot->setIcon(0, techSetIcon);
|
||||||
|
// techSetRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
|
||||||
|
// for (auto techSet : assetMap.techSets) {
|
||||||
|
// XTreeWidgetItem *techSetItem = new XTreeWidgetItem(techSetRoot);
|
||||||
|
// techSetItem->setText(0, techSet.name);
|
||||||
|
// techSetItem->setIcon(0, techSetIcon);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!assetMap.rawFiles.isEmpty()) {
|
||||||
|
// QIcon rawFileIcon = Utils::CreateAssetIcon(ASSET_TYPE_RAWFILE);
|
||||||
|
|
||||||
|
// XTreeWidgetItem *rawFileRoot = new XTreeWidgetItem(zoneItem);
|
||||||
|
// rawFileRoot->setText(0, "Raw Files");
|
||||||
|
// rawFileRoot->setIcon(0, rawFileIcon);
|
||||||
|
// rawFileRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
// for (auto rawFile : assetMap.rawFiles) {
|
||||||
|
// if (!rawFile.length) { continue; }
|
||||||
|
|
||||||
|
// XTreeWidgetItem *tempItem = rawFileRoot;
|
||||||
|
// // const QStringList pathParts = rawFile->path.split('/');
|
||||||
|
// // for (const QString &pathPart : pathParts) {
|
||||||
|
// // bool childFound = false;
|
||||||
|
// // for (int i = 0; i < tempItem->childCount(); i++) {
|
||||||
|
// // QTreeWidgetItem *rawChildItem = tempItem->child(i);
|
||||||
|
// // XTreeWidgetItem *childItem = dynamic_cast<XTreeWidgetItem*>(rawChildItem);
|
||||||
|
// // if (childItem->text(0) == pathPart) {
|
||||||
|
// // tempItem = childItem;
|
||||||
|
|
||||||
|
// // childFound = true;
|
||||||
|
// // break;
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // const QString rawFileStr = pathPart;// = QString("%1 [%2-%3]").arg(pathPart).arg(rawFile.startPos).arg(rawFile.endPos);
|
||||||
|
// // if (pathPart == pathParts.last()) {
|
||||||
|
// // XTreeWidgetItem *rawFileItem = new XTreeWidgetItem(tempItem);
|
||||||
|
// // rawFileItem->setText(0, rawFileStr);
|
||||||
|
|
||||||
|
// // tempItem = rawFileItem;
|
||||||
|
// // } else if (!childFound) {
|
||||||
|
// // tempItem = new XTreeWidgetItem(tempItem);
|
||||||
|
// // tempItem->setText(0, rawFileStr);
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // }
|
||||||
|
// tempItem->setIcon(0, rawFileIcon);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!assetMap.menuDefinitions.isEmpty()) {
|
||||||
|
// // QIcon MenuDefIcon = Utils::CreateAssetIcon(ASSET_TYPE_MENU);
|
||||||
|
|
||||||
|
// // XTreeWidgetItem *menuRoot = new XTreeWidgetItem(zoneItem);
|
||||||
|
// // menuRoot->setText(0, "Menu Files");
|
||||||
|
// // menuRoot->setIcon(0, MenuDefIcon);
|
||||||
|
// // menuRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
|
||||||
|
// // int menuIndex = 1;
|
||||||
|
// // for (MenuDef menuDef : assetMap.menuDefinitions) {
|
||||||
|
// // XTreeWidgetItem *MenuDefRoot = new XTreeWidgetItem(menuRoot);
|
||||||
|
// // MenuDefRoot->setText(0, QString("Menu %1").arg(menuIndex));
|
||||||
|
// // for (Menu menu : menuDef.men) {
|
||||||
|
// // XTreeWidgetItem *menuItem = new XTreeWidgetItem(MenuDefRoot);
|
||||||
|
// // menuItem->setText(0, menu.filePath);
|
||||||
|
// // menuItem->setIcon(0, MenuDefIcon);
|
||||||
|
// // }
|
||||||
|
// // menuIndex++;
|
||||||
|
// // }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!assetMap.images.isEmpty()) {
|
||||||
|
// // QIcon imageIcon = Utils::CreateAssetIcon(ASSET_TYPE_IMAGE);
|
||||||
|
|
||||||
|
// // XTreeWidgetItem *imageRoot = new XTreeWidgetItem(zoneItem);
|
||||||
|
// // imageRoot->setText(0, "Images");
|
||||||
|
// // imageRoot->setIcon(0, imageIcon);
|
||||||
|
// // imageRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
|
||||||
|
// // for (Image image : assetMap.images) {
|
||||||
|
// // XTreeWidgetItem *imageItem = new XTreeWidgetItem(imageRoot);
|
||||||
|
// // imageItem->setText(0, image.materialName);
|
||||||
|
// // imageItem->setIcon(0, imageIcon);
|
||||||
|
// // }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!assetMap.models.isEmpty()) {
|
||||||
|
// QIcon modelIcon = Utils::CreateAssetIcon(ASSET_TYPE_XMODEL);
|
||||||
|
|
||||||
|
// XTreeWidgetItem *modelsRoot = new XTreeWidgetItem(zoneItem);
|
||||||
|
// modelsRoot->setText(0, "Models");
|
||||||
|
// modelsRoot->setIcon(0, modelIcon);
|
||||||
|
// modelsRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
|
||||||
|
// for (auto model: assetMap.models) {
|
||||||
|
// XTreeWidgetItem *modelItem = new XTreeWidgetItem(modelsRoot);
|
||||||
|
// modelItem->setText(0, model.name);
|
||||||
|
// modelItem->setIcon(0, modelIcon);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!assetMap.materials.isEmpty()) {
|
||||||
|
// QIcon materialIcon = Utils::CreateAssetIcon(ASSET_TYPE_MATERIAL);
|
||||||
|
|
||||||
|
// XTreeWidgetItem *materialsRoot = new XTreeWidgetItem(zoneItem);
|
||||||
|
// materialsRoot->setText(0, "Materials");
|
||||||
|
// materialsRoot->setIcon(0, materialIcon);
|
||||||
|
// materialsRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
|
||||||
|
// for (auto material: assetMap.materials) {
|
||||||
|
// XTreeWidgetItem *materialItem = new XTreeWidgetItem(materialsRoot);
|
||||||
|
// //materialItem->setText(0, material.name);
|
||||||
|
// materialItem->setIcon(0, materialIcon);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!assetMap.stringTables.isEmpty()) {
|
||||||
|
// QIcon stringTableIcon = Utils::CreateAssetIcon(ASSET_TYPE_STRINGTABLE);
|
||||||
|
|
||||||
|
// XTreeWidgetItem *strTableRoot = new XTreeWidgetItem(zoneItem);
|
||||||
|
// strTableRoot->setText(0, "String Tables");
|
||||||
|
// strTableRoot->setIcon(0, stringTableIcon);
|
||||||
|
// strTableRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
|
||||||
|
// for (auto strTable: assetMap.stringTables) {
|
||||||
|
// XTreeWidgetItem *modelItem = new XTreeWidgetItem(strTableRoot);
|
||||||
|
// modelItem->setText(0, strTable.name);
|
||||||
|
// modelItem->setIcon(0, stringTableIcon);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!assetMap.sounds.isEmpty()) {
|
||||||
|
// QIcon soundIcon = Utils::CreateAssetIcon(ASSET_TYPE_SOUND);
|
||||||
|
|
||||||
|
// XTreeWidgetItem *soundsRoot = new XTreeWidgetItem(zoneItem);
|
||||||
|
// soundsRoot->setText(0, "Sounds");
|
||||||
|
// soundsRoot->setIcon(0, soundIcon);
|
||||||
|
// soundsRoot->SetCategory(CATEGORY_TYPE);
|
||||||
|
// }
|
||||||
|
|
||||||
|
mZoneFiles[aZoneFile->GetBaseStem() + ".zone"] = aZoneFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
void XTreeWidget::CloseFastFile(const QString aFFName) {
|
||||||
|
const QString fileStem = aFFName;
|
||||||
|
emit ItemClosed(fileStem);
|
||||||
|
}
|
||||||
|
|
||||||
|
void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
|
||||||
|
auto activeItem = itemAt(pos);
|
||||||
|
if (!activeItem) { return; }
|
||||||
|
if (activeItem->text(0).isEmpty()) { return; }
|
||||||
|
|
||||||
|
QString activeText = activeItem->text(0);
|
||||||
|
QMenu *contextMenu = new QMenu(this);
|
||||||
|
|
||||||
|
if (activeText.contains(".dds")) {
|
||||||
|
const QString fileStem = activeText.replace(".dds", "");
|
||||||
|
if (!mDDSFiles.contains(fileStem)) {
|
||||||
|
qDebug() << "Error: Could not find " << fileStem << " in DDS map!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QAction *closeAction = new QAction("Close File");
|
||||||
|
contextMenu->addAction(closeAction);
|
||||||
|
connect(closeAction, &QAction::triggered, this, [this, &fileStem, &activeItem](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
mDDSFiles.remove(fileStem);
|
||||||
|
invisibleRootItem()->removeChild(activeItem);
|
||||||
|
});
|
||||||
|
|
||||||
|
QMenu *exportSubmenu = new QMenu("Export...", this);
|
||||||
|
contextMenu->addMenu(exportSubmenu);
|
||||||
|
|
||||||
|
const DDSFile* ddsFile = mDDSFiles[fileStem];
|
||||||
|
|
||||||
|
QAction *exportIWIAction = new QAction("Export as IWI");
|
||||||
|
exportSubmenu->addAction(exportIWIAction);
|
||||||
|
connect(exportIWIAction, &QAction::triggered, this, [ddsFile](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
ddsFile->SaveIWI();
|
||||||
|
});
|
||||||
|
|
||||||
|
QAction *exportPNGAction = new QAction("Export as PNG");
|
||||||
|
exportSubmenu->addAction(exportPNGAction);
|
||||||
|
connect(exportPNGAction, &QAction::triggered, this, [ddsFile](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
ddsFile->SavePNG();
|
||||||
|
});
|
||||||
|
|
||||||
|
QAction *exportJPGAction = new QAction("Export as JPG");
|
||||||
|
exportSubmenu->addAction(exportJPGAction);
|
||||||
|
connect(exportJPGAction, &QAction::triggered, this, [ddsFile](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
ddsFile->SaveJPG();
|
||||||
|
});
|
||||||
|
} else if (activeText.contains(".iwi")) {
|
||||||
|
const QString fileStem = activeText.replace(".iwi", "");
|
||||||
|
if (!mIWIFiles.contains(fileStem)) {
|
||||||
|
qDebug() << "Error: Could not find " << fileStem << " in IWI map!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QAction *closeAction = new QAction("Close File");
|
||||||
|
contextMenu->addAction(closeAction);
|
||||||
|
connect(closeAction, &QAction::triggered, this, [this, &fileStem, &activeItem](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
mIWIFiles.remove(fileStem);
|
||||||
|
invisibleRootItem()->removeChild(activeItem);
|
||||||
|
});
|
||||||
|
|
||||||
|
QMenu *exportSubmenu = new QMenu("Export...", this);
|
||||||
|
contextMenu->addMenu(exportSubmenu);
|
||||||
|
|
||||||
|
const IWIFile* iwiFile = mIWIFiles[fileStem];
|
||||||
|
|
||||||
|
QAction *exportDDSAction = new QAction("Export as DDS");
|
||||||
|
exportSubmenu->addAction(exportDDSAction);
|
||||||
|
connect(exportDDSAction, &QAction::triggered, this, [iwiFile](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
iwiFile->SaveDDS();
|
||||||
|
});
|
||||||
|
|
||||||
|
QAction *exportPNGAction = new QAction("Export as PNG");
|
||||||
|
exportSubmenu->addAction(exportPNGAction);
|
||||||
|
connect(exportPNGAction, &QAction::triggered, this, [iwiFile](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
iwiFile->SavePNG();
|
||||||
|
});
|
||||||
|
|
||||||
|
QAction *exportJPGAction = new QAction("Export as JPG");
|
||||||
|
exportSubmenu->addAction(exportJPGAction);
|
||||||
|
connect(exportJPGAction, &QAction::triggered, this, [iwiFile](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
iwiFile->SaveJPG();
|
||||||
|
});
|
||||||
|
} else if (activeText.contains(".ff")) {
|
||||||
|
const QString fileStem = activeText;
|
||||||
|
|
||||||
|
QMenu *closeMultipleAction = new QMenu("Close Multiple Tabs");
|
||||||
|
|
||||||
|
QAction *closeAllAction = new QAction("Close All");
|
||||||
|
closeMultipleAction->addAction(closeAllAction);
|
||||||
|
connect(closeAllAction, &QAction::triggered, this, [this](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
mFastFiles.clear();
|
||||||
|
clear();
|
||||||
|
|
||||||
|
emit Cleared();
|
||||||
|
});
|
||||||
|
|
||||||
|
QAction *closeAllButAction = new QAction("Close All BUT This");
|
||||||
|
closeMultipleAction->addAction(closeAllButAction);
|
||||||
|
connect(closeAllButAction, &QAction::triggered, this, [this, &activeItem](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
for (int i = 0; i < invisibleRootItem()->childCount(); i++) {
|
||||||
|
auto childItem = invisibleRootItem()->child(i);
|
||||||
|
if (childItem == activeItem) { continue; }
|
||||||
|
|
||||||
|
const QString fileStem = childItem->text(0);
|
||||||
|
if (!mFastFiles.contains(fileStem)) {
|
||||||
|
qDebug() << "Error: Could not find " << fileStem << " in Fast File map!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mFastFiles.remove(fileStem);
|
||||||
|
CloseFastFile(fileStem);
|
||||||
|
invisibleRootItem()->removeChild(childItem);
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
QAction *closeAboveAction = new QAction("Close All Above");
|
||||||
|
closeMultipleAction->addAction(closeAboveAction);
|
||||||
|
connect(closeAboveAction, &QAction::triggered, this, [this, &activeItem](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
for (int i = 0; i < invisibleRootItem()->childCount(); i++) {
|
||||||
|
auto childItem = invisibleRootItem()->child(i);
|
||||||
|
if (childItem == activeItem) { return; }
|
||||||
|
|
||||||
|
const QString fileStem = childItem->text(0);
|
||||||
|
if (!mFastFiles.contains(fileStem)) {
|
||||||
|
qDebug() << "Error: Could not find " << fileStem << " in Fast File map!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mFastFiles.remove(fileStem);
|
||||||
|
CloseFastFile(fileStem);
|
||||||
|
invisibleRootItem()->removeChild(childItem);
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
QAction *closeBelowAction = new QAction("Close All Below");
|
||||||
|
closeMultipleAction->addAction(closeBelowAction);
|
||||||
|
connect(closeBelowAction, &QAction::triggered, this, [this, &activeItem](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
bool ready = false;
|
||||||
|
for (int i = 0; i < invisibleRootItem()->childCount(); i++) {
|
||||||
|
auto childItem = invisibleRootItem()->child(i);
|
||||||
|
if (!ready && (childItem != activeItem)) { continue; }
|
||||||
|
if (childItem == activeItem) {
|
||||||
|
ready = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString fileStem = childItem->text(0);
|
||||||
|
if (!mFastFiles.contains(fileStem)) {
|
||||||
|
qDebug() << "Error: Could not find " << fileStem << " in Fast File map!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mFastFiles.remove(fileStem);
|
||||||
|
CloseFastFile(fileStem);
|
||||||
|
invisibleRootItem()->removeChild(childItem);
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
contextMenu->addMenu(closeMultipleAction);
|
||||||
|
|
||||||
|
QAction *closeAction = new QAction("Close File");
|
||||||
|
contextMenu->addAction(closeAction);
|
||||||
|
connect(closeAction, &QAction::triggered, this, [this, &activeItem, &activeText](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
const QString fileStem = activeItem->text(0);
|
||||||
|
|
||||||
|
mFastFiles.remove(fileStem);
|
||||||
|
CloseFastFile(activeText);
|
||||||
|
invisibleRootItem()->removeChild(activeItem);
|
||||||
|
});
|
||||||
|
|
||||||
|
QMenu *exportSubmenu = new QMenu("Export...", this);
|
||||||
|
contextMenu->addMenu(exportSubmenu);
|
||||||
|
|
||||||
|
const FastFile* fastFile = mFastFiles[fileStem];
|
||||||
|
|
||||||
|
QAction *exportFastFileAction = new QAction("Export Fast File");
|
||||||
|
exportSubmenu->addAction(exportFastFileAction);
|
||||||
|
connect(exportFastFileAction, &QAction::triggered, this, [fastFile](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
const QString fastFilePath = QFileDialog::getSaveFileName(
|
||||||
|
nullptr, "Export Fast File...", QDir::currentPath(),
|
||||||
|
"Fast File (*.ff);;All Files(*.*)");
|
||||||
|
|
||||||
|
fastFile->ExportFastFile(fastFilePath);
|
||||||
|
});
|
||||||
|
QAction *exportZoneFileAction = new QAction("Export Zone File");
|
||||||
|
exportSubmenu->addAction(exportZoneFileAction);
|
||||||
|
connect(exportZoneFileAction, &QAction::triggered, this, [](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
// const QString zoneFilePath = QFileDialog::getSaveFileName(
|
||||||
|
// nullptr, "Export Zone File...", QDir::currentPath(),
|
||||||
|
// "Zone File (*.zone);;All Files(*.*)");
|
||||||
|
//fastFile->GetZoneFile()->SaveZoneFile(zoneFilePath);
|
||||||
|
});
|
||||||
|
} else if (activeText.contains(".zone")) {
|
||||||
|
const QString fileStem = activeText;
|
||||||
|
if (!mZoneFiles.contains(fileStem)) {
|
||||||
|
qDebug() << "Error: Could not find " << fileStem << " in Zone File map!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenu *exportSubmenu = new QMenu("Export...", this);
|
||||||
|
contextMenu->addMenu(exportSubmenu);
|
||||||
|
|
||||||
|
//const ZoneFile* zoneFile = mZoneFiles[fileStem];
|
||||||
|
|
||||||
|
QAction *exportZoneFileAction = new QAction("Export Zone File");
|
||||||
|
exportSubmenu->addAction(exportZoneFileAction);
|
||||||
|
connect(exportZoneFileAction, &QAction::triggered, this, [](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
});
|
||||||
|
QAction *exportFastFileAction = new QAction("Export Fast File");
|
||||||
|
exportSubmenu->addAction(exportFastFileAction);
|
||||||
|
connect(exportFastFileAction, &QAction::triggered, this, [](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
});
|
||||||
|
} else if (activeItem && activeText.contains(".wav")) {
|
||||||
|
XTreeWidgetItem *parentItem = dynamic_cast<XTreeWidgetItem*>(activeItem->parent());
|
||||||
|
while (parentItem && !parentItem->text(0).contains(".zone")) {
|
||||||
|
parentItem = dynamic_cast<XTreeWidgetItem*>(parentItem->parent());
|
||||||
|
|
||||||
|
if (parentItem == invisibleRootItem()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (parentItem && parentItem != invisibleRootItem() && parentItem->text(0).contains(".zone")) {
|
||||||
|
//const QString fileStem = parentItem->text(0).section('.', 0, 0);
|
||||||
|
// QVector<LoadedSound> LoadedSounds = mZoneFiles[fileStem]->GetAssetMap().sounds;
|
||||||
|
// for (LoadedSound LoadedSound : LoadedSounds) {
|
||||||
|
// for (Sound sound : LoadedSound.sounds) {
|
||||||
|
// if (sound.path.contains(activeText)) {
|
||||||
|
// QMenu *exportSubmenu = new QMenu("Export...", this);
|
||||||
|
// contextMenu->addMenu(exportSubmenu);
|
||||||
|
|
||||||
|
// QAction *exportWAVAction = new QAction("Export as WAV File");
|
||||||
|
// exportSubmenu->addAction(exportWAVAction);
|
||||||
|
// connect(exportWAVAction, &QAction::triggered, this, [sound](bool checked) {
|
||||||
|
// Q_UNUSED(checked);
|
||||||
|
|
||||||
|
// QDir dir = QDir::currentPath();
|
||||||
|
// if (!dir.exists("exports/")) {
|
||||||
|
// dir.mkdir("exports/");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!dir.exists("exports/sounds/")) {
|
||||||
|
// dir.mkdir("exports/sounds/");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const QString fileName = "exports/sounds/" + sound.path.split('/').last();
|
||||||
|
// QFile wavFile(fileName);
|
||||||
|
// if (!wavFile.open(QIODevice::WriteOnly)) {
|
||||||
|
// qDebug() << "Failed to write wav file!";
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// wavFile.write(sound.data);
|
||||||
|
// wavFile.close();
|
||||||
|
// });
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
} else if (activeItem && activeText == "Sounds") {
|
||||||
|
XTreeWidgetItem *parentItem = dynamic_cast<XTreeWidgetItem*>(activeItem->parent());
|
||||||
|
while (parentItem && !parentItem->text(0).contains(".zone")) {
|
||||||
|
parentItem = dynamic_cast<XTreeWidgetItem*>(parentItem->parent());
|
||||||
|
|
||||||
|
if (parentItem == invisibleRootItem()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (parentItem && parentItem != invisibleRootItem() && parentItem->text(0).contains(".zone")) {
|
||||||
|
const QString fileStem = parentItem->text(0).section('.', 0, 0);
|
||||||
|
//auto zoneFile = mZoneFiles[fileStem];
|
||||||
|
|
||||||
|
QMenu *exportSubmenu = new QMenu("Export...", this);
|
||||||
|
contextMenu->addMenu(exportSubmenu);
|
||||||
|
|
||||||
|
QAction *exportAllWAVAction = new QAction("Export ALL as WAV Files");
|
||||||
|
exportSubmenu->addAction(exportAllWAVAction);
|
||||||
|
connect(exportAllWAVAction, &QAction::triggered, this, [](bool checked) {
|
||||||
|
Q_UNUSED(checked);
|
||||||
|
|
||||||
|
// for (LoadedSound LoadedSound : zoneFile->GetAssetMap().sounds) {
|
||||||
|
// for (Sound sound : LoadedSound.sounds) {
|
||||||
|
// if (!sound.dataLength) { continue; }
|
||||||
|
|
||||||
|
// QDir dir = QDir::currentPath();
|
||||||
|
// if (!dir.exists("exports/")) {
|
||||||
|
// dir.mkdir("exports/");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!dir.exists("exports/sounds/")) {
|
||||||
|
// dir.mkdir("exports/sounds/");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const QString fileName = "exports/sounds/" + sound.path.split('/').last();
|
||||||
|
// QFile wavFile(fileName);
|
||||||
|
// if (!wavFile.open(QIODevice::WriteOnly)) {
|
||||||
|
// qDebug() << "Failed to write wav file!";
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// wavFile.write(sound.data);
|
||||||
|
// wavFile.close();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QPoint pt(pos);
|
||||||
|
contextMenu->exec(mapToGlobal(pt));
|
||||||
|
|
||||||
|
delete contextMenu;
|
||||||
|
}
|
||||||
|
|
||||||
|
void XTreeWidget::ItemSelectionChanged() {
|
||||||
|
if (selectedItems().isEmpty()) { return; }
|
||||||
|
|
||||||
|
XTreeWidgetItem *selectedItem = dynamic_cast<XTreeWidgetItem*>(selectedItems().first());
|
||||||
|
if (!selectedItem) { return; }
|
||||||
|
if (selectedItem->text(0).isEmpty()) { return; }
|
||||||
|
QString selectedText = selectedItem->text(0);
|
||||||
|
emit ItemSelected(selectedText);
|
||||||
|
|
||||||
|
XTreeWidgetItem *parentItem = dynamic_cast<XTreeWidgetItem*>(selectedItem->parent());
|
||||||
|
|
||||||
|
/*if (selectedText.contains(".dds")) {
|
||||||
|
if (!mDDSFiles.contains(selectedText)) {
|
||||||
|
LogManager::instance().addError("Could not find " + selectedText + " in DDS map!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
emit DDSFileSelected(mDDSFiles[selectedText], selectedText);
|
||||||
|
} else if (selectedText.contains(".iwi")) {
|
||||||
|
if (!mIWIFiles.contains(selectedText)) {
|
||||||
|
LogManager::instance().addError("Could not find " + selectedText + " in IWI map!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
emit IWIFileSelected(mIWIFiles[selectedText], selectedText);
|
||||||
|
} else */if (selectedText.contains(".ff")) {
|
||||||
|
if (!mFastFiles.contains(selectedText)) {
|
||||||
|
LogManager::instance().addError("Could not find " + selectedText + " in Fast File map!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
emit FastFileSelected(mFastFiles[selectedText], selectedText);
|
||||||
|
} else if (selectedText.contains(".zone")) {
|
||||||
|
if (!mZoneFiles.contains(selectedText)) {
|
||||||
|
LogManager::instance().addError("Could not find " + selectedText + " in Zone File map!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
emit ZoneFileSelected(mZoneFiles[selectedText], selectedText);
|
||||||
|
} else if (selectedText.contains(".str")) {
|
||||||
|
if (!mZoneFiles.contains(selectedText.replace(".str", ".zone"))) {
|
||||||
|
LogManager::instance().addError("Could not find " + selectedText + " in Zone File map!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
emit LocalStringSelected(mZoneFiles[selectedText], selectedText);
|
||||||
|
} else if (parentItem && (parentItem->text(0) == "Images")) {
|
||||||
|
XTreeWidgetItem *grandpaItem = dynamic_cast<XTreeWidgetItem*>(parentItem->parent());
|
||||||
|
if (grandpaItem && grandpaItem->text(0).contains(".zone")) {
|
||||||
|
const QString fileStem = grandpaItem->text(0).section('.', 0, 0);
|
||||||
|
// QVector<Image> images = mZoneFiles[fileStem]->GetAssetMap().images;
|
||||||
|
// for (Image image : images) {
|
||||||
|
// if (image.materialName == selectedText) {
|
||||||
|
// emit ImageSelected(std::make_shared<Image>(image), fileStem);
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
} /*else if (parentItem && (parentItem->text(0) == "Tech Sets")) {
|
||||||
|
XTreeWidgetItem *grandpaItem = dynamic_cast<XTreeWidgetItem*>(parentItem->parent());
|
||||||
|
if (grandpaItem && grandpaItem->text(0).contains(".zone")) {
|
||||||
|
const QString fileStem = grandpaItem->text(0).section('.', 0, 0);
|
||||||
|
auto techsets = mZoneFiles[fileStem]->GetAssetList().techSets;
|
||||||
|
for (auto techset : techsets) {
|
||||||
|
if (techset.name == selectedText) {
|
||||||
|
emit TechSetSelected(new MaterialTechSet(techset), fileStem);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (parentItem && (parentItem->text(0) == "Materials")) {
|
||||||
|
XTreeWidgetItem *grandpaItem = dynamic_cast<XTreeWidgetItem*>(parentItem->parent());
|
||||||
|
if (grandpaItem && grandpaItem->text(0).contains(".zone")) {
|
||||||
|
const QString fileStem = grandpaItem->text(0).section('.', 0, 0);
|
||||||
|
auto materials = mZoneFiles[fileStem]->GetAssetMap().materials;
|
||||||
|
for (auto material : materials) {
|
||||||
|
// if (material.name == selectedText) {
|
||||||
|
// emit MaterialSelected(std::make_shared<Material>(material), fileStem);
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (parentItem && selectedText.contains(".wav")) {
|
||||||
|
XTreeWidgetItem *grandpaItem = dynamic_cast<XTreeWidgetItem*>(parentItem->parent());
|
||||||
|
while (grandpaItem && !grandpaItem->text(0).contains(".zone")) {
|
||||||
|
grandpaItem = dynamic_cast<XTreeWidgetItem*>(grandpaItem->parent());
|
||||||
|
|
||||||
|
if (grandpaItem == invisibleRootItem()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (grandpaItem && grandpaItem != invisibleRootItem() && grandpaItem->text(0).contains(".zone")) {
|
||||||
|
const QString fileStem = grandpaItem->text(0).section('.', 0, 0);
|
||||||
|
// QVector<LoadedSound> LoadedSounds = mZoneFiles[fileStem]->GetAssetMap().sounds;
|
||||||
|
// for (LoadedSound LoadedSound : LoadedSounds) {
|
||||||
|
// for (Sound sound : LoadedSound.sounds) {
|
||||||
|
// if (sound.path.contains(selectedText)) {
|
||||||
|
// emit SoundSelected(std::make_shared<Sound>(sound), fileStem);
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
} else if (selectedItem->GetCategory() != CATEGORY_TYPE) {
|
||||||
|
XTreeWidgetItem *zoneRoot = selectedItem;
|
||||||
|
|
||||||
|
bool zoneChild = false;
|
||||||
|
while (zoneRoot) {
|
||||||
|
zoneRoot = dynamic_cast<XTreeWidgetItem*>(zoneRoot->parent());
|
||||||
|
if (zoneRoot->text(0).contains("Raw Files")) {
|
||||||
|
zoneChild = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!zoneChild) { return; }
|
||||||
|
const QString fileStem = zoneRoot->parent()->text(0);
|
||||||
|
|
||||||
|
if (!mZoneFiles.contains(fileStem)) {
|
||||||
|
LogManager::instance().addError("Could not find " + fileStem + " in Zone File map!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto rawFiles = mZoneFiles[fileStem]->GetAssetMap().rawFiles;
|
||||||
|
for (auto rawFile : rawFiles) {
|
||||||
|
//if (rawFile->path.split('/').last() == selectedText) {
|
||||||
|
// emit RawFileSelected(std::make_shared<RawFile>(rawFile), fileStem);
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
const ZoneFile* XTreeWidget::FindZoneFile(const QString aStem) {
|
||||||
|
foreach (auto zoneFile, mZoneFiles) {
|
||||||
|
if (zoneFile->GetStem() == aStem) {
|
||||||
|
return zoneFile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
const FastFile *XTreeWidget::FindFastFile(const QString aStem) {
|
||||||
|
foreach (auto fastFile, mFastFiles) {
|
||||||
|
if (fastFile->GetStem() == aStem) {
|
||||||
|
return fastFile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool XTreeWidget::HasZoneFile(const QString aStem) {
|
||||||
|
return FindZoneFile(aStem) != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool XTreeWidget::HasFastFile(const QString aStem) {
|
||||||
|
return FindFastFile(aStem) != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void XTreeWidget::AddIWIFile(IWIFile* aIWIFile) {
|
||||||
|
const QString iwiFileName = QString(aIWIFile->fileStem + ".iwi");
|
||||||
|
|
||||||
|
for (int i = 0; i < invisibleRootItem()->childCount(); i++) {
|
||||||
|
auto iwiFileItem = invisibleRootItem()->child(i);
|
||||||
|
if (iwiFileItem->text(0) == iwiFileName) {
|
||||||
|
delete iwiFileItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
XTreeWidgetItem *iwiItem = new XTreeWidgetItem(this);
|
||||||
|
iwiItem->setIcon(0, Utils::CreateAssetIcon(ASSET_TYPE_IMAGE));
|
||||||
|
iwiItem->setText(0, iwiFileName);
|
||||||
|
mIWIFiles[aIWIFile->fileStem.section(".", 0, 0)] = aIWIFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
void XTreeWidget::AddDDSFile(DDSFile* aDDSFile) {
|
||||||
|
const QString ddsFileName = QString(aDDSFile->fileStem + ".dds");
|
||||||
|
|
||||||
|
for (int i = 0; i < invisibleRootItem()->childCount(); i++) {
|
||||||
|
auto ddsFileItem = invisibleRootItem()->child(i);
|
||||||
|
if (ddsFileItem->text(0) == ddsFileName) {
|
||||||
|
delete ddsFileItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
XTreeWidgetItem *ddsItem = new XTreeWidgetItem(this);
|
||||||
|
ddsItem->setIcon(0, Utils::CreateAssetIcon(ASSET_TYPE_IMAGE));
|
||||||
|
ddsItem->setText(0, ddsFileName);
|
||||||
|
mDDSFiles[aDDSFile->fileStem.section(".", 0, 0)] = aDDSFile;
|
||||||
|
}
|
||||||
67
app/xtreewidget.h
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
#ifndef XTREEWIDGET_H
|
||||||
|
#define XTREEWIDGET_H
|
||||||
|
|
||||||
|
#include "d3dbsp_structs.h"
|
||||||
|
#include "ddsfile.h"
|
||||||
|
#include "iwifile.h"
|
||||||
|
#include "fastfile.h"
|
||||||
|
#include "xloadedsound.h"
|
||||||
|
#include "xtreewidgetitem.h"
|
||||||
|
#include "zonefile.h"
|
||||||
|
#include "xrawfile.h"
|
||||||
|
#include "xgfximage.h"
|
||||||
|
#include "xstringtable.h"
|
||||||
|
#include "xmenudef.h"
|
||||||
|
|
||||||
|
#include <QTreeWidget>
|
||||||
|
#include <QFileDialog>
|
||||||
|
|
||||||
|
class XTreeWidget : public QTreeWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit XTreeWidget(QWidget *parent = nullptr);
|
||||||
|
~XTreeWidget();
|
||||||
|
|
||||||
|
void AddFastFile(FastFile* aFastFile);
|
||||||
|
void AddZoneFile(const ZoneFile *aZoneFile, XTreeWidgetItem *aParentItem = nullptr);
|
||||||
|
void AddIWIFile(IWIFile* aIWIFile);
|
||||||
|
void AddDDSFile(DDSFile* aDDSFile);
|
||||||
|
|
||||||
|
const ZoneFile *FindZoneFile(const QString aStem);
|
||||||
|
const FastFile* FindFastFile(const QString aStem);
|
||||||
|
|
||||||
|
bool HasZoneFile(const QString aStem);
|
||||||
|
bool HasFastFile(const QString aStem);
|
||||||
|
|
||||||
|
void CloseFastFile(const QString aFFName);
|
||||||
|
signals:
|
||||||
|
void DDSFileSelected(const DDSFile* aDDSFile, const QString aParentName);
|
||||||
|
void IWIFileSelected(const IWIFile* aIWIFile, const QString aParentName);
|
||||||
|
void FastFileSelected(const FastFile* aFastFile, const QString aParentName);
|
||||||
|
void ZoneFileSelected(const ZoneFile* aZoneFile, const QString aParentName);
|
||||||
|
void LocalStringSelected(const ZoneFile* aZoneFile, const QString aParentName);
|
||||||
|
void RawFileSelected(const XRawFile* aRawFile, const QString aParentName);
|
||||||
|
void ImageSelected(const XGfxImage* aImage, const QString aParentName);
|
||||||
|
void TechSetSelected(const XMaterialTechniqueSet* aZoneFile, const QString aParentName);
|
||||||
|
void StrTableSelected(const XStringTable* aStrTable, const QString aParentName);
|
||||||
|
void MenuSelected(const XMenuDef* aMenu, const QString aParentName);
|
||||||
|
void SoundSelected(const XLoadedSound* aSound, const QString aParentName);
|
||||||
|
void MaterialSelected(const XMaterial* aMaterial, const QString aParentName);
|
||||||
|
void ItemSelected(const QString itemText);
|
||||||
|
|
||||||
|
void ItemClosed(const QString itemText);
|
||||||
|
void Cleared();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void ItemSelectionChanged();
|
||||||
|
void PrepareContextMenu(const QPoint &pos);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QMap<QString, const FastFile*> mFastFiles;
|
||||||
|
QMap<QString, const ZoneFile*> mZoneFiles;
|
||||||
|
QMap<QString, const DDSFile*> mDDSFiles;
|
||||||
|
QMap<QString, const IWIFile*> mIWIFiles;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // XTREEWIDGET_H
|
||||||
56
app/xtreewidgetitem.cpp
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
#include "xtreewidgetitem.h"
|
||||||
|
|
||||||
|
XTreeWidgetItem::XTreeWidgetItem(QTreeWidget *parent, bool group)
|
||||||
|
: QTreeWidgetItem(parent)
|
||||||
|
, isGroup(group)
|
||||||
|
, mCategory(CATEGORY_NONE) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
XTreeWidgetItem::XTreeWidgetItem(QTreeWidgetItem *parent, bool group)
|
||||||
|
: QTreeWidgetItem(parent)
|
||||||
|
, isGroup(group)
|
||||||
|
, mCategory(CATEGORY_NONE) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void XTreeWidgetItem::SetCategory(TREE_CATEGORY category)
|
||||||
|
{
|
||||||
|
mCategory = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
TREE_CATEGORY XTreeWidgetItem::GetCategory()
|
||||||
|
{
|
||||||
|
return mCategory;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool XTreeWidgetItem::operator<(const QTreeWidgetItem &other) const {
|
||||||
|
// Attempt to cast the other item to our custom type.
|
||||||
|
const XTreeWidgetItem* otherItem = dynamic_cast<const XTreeWidgetItem*>(&other);
|
||||||
|
if (otherItem) {
|
||||||
|
bool thisIsGroup = this->childCount() > 0;
|
||||||
|
bool otherIsGroup = otherItem->childCount() > 0;
|
||||||
|
|
||||||
|
if (thisIsGroup != otherIsGroup) {
|
||||||
|
return otherIsGroup; // Groups should come before non-groups
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Fallback to the default string comparison on the current sort column.
|
||||||
|
return QTreeWidgetItem::operator<(other);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
XTreeWidgetItem& XTreeWidgetItem::operator=(const XTreeWidgetItem &other)
|
||||||
|
{
|
||||||
|
if (this != &other) {
|
||||||
|
// Copy text and icon for each column.
|
||||||
|
const int colCount = other.columnCount();
|
||||||
|
for (int i = 0; i < colCount; ++i) {
|
||||||
|
setText(i, other.text(i));
|
||||||
|
setIcon(i, other.icon(i));
|
||||||
|
}
|
||||||
|
// Copy custom members.
|
||||||
|
this->isGroup = other.isGroup;
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
36
app/xtreewidgetitem.h
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#ifndef XTREEWIDGETITEM_H
|
||||||
|
#define XTREEWIDGETITEM_H
|
||||||
|
|
||||||
|
#include <QTreeWidget>
|
||||||
|
#include <QTreeWidgetItem>
|
||||||
|
|
||||||
|
enum TREE_CATEGORY {
|
||||||
|
CATEGORY_NONE = 0x00,
|
||||||
|
CATEGORY_FILE = 0x01,
|
||||||
|
CATEGORY_TYPE = 0x02
|
||||||
|
};
|
||||||
|
|
||||||
|
// Custom item class
|
||||||
|
class XTreeWidgetItem : public QTreeWidgetItem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Flag to indicate if the item is a collapsible group/header.
|
||||||
|
bool isGroup;
|
||||||
|
|
||||||
|
// Constructors: default to non-group unless specified.
|
||||||
|
XTreeWidgetItem(QTreeWidget *parent, bool group = false);
|
||||||
|
XTreeWidgetItem(QTreeWidgetItem *parent, bool group = false);
|
||||||
|
|
||||||
|
void SetCategory(TREE_CATEGORY category);
|
||||||
|
TREE_CATEGORY GetCategory();
|
||||||
|
|
||||||
|
// Override the less-than operator to customize sorting.
|
||||||
|
bool operator<(const QTreeWidgetItem &other) const override;
|
||||||
|
XTreeWidgetItem &operator =(const XTreeWidgetItem &other);
|
||||||
|
|
||||||
|
private:
|
||||||
|
TREE_CATEGORY mCategory;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // XTREEWIDGETITEM_H
|
||||||
156
app/zonefileviewer.cpp
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
#include "zonefileviewer.h"
|
||||||
|
#include "ui_zonefileviewer.h"
|
||||||
|
|
||||||
|
#include "statusbarmanager.h"
|
||||||
|
|
||||||
|
ZoneFileViewer::ZoneFileViewer(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
, ui(new Ui::ZoneFileViewer) {
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
mZoneFile = nullptr;
|
||||||
|
|
||||||
|
ui->tableWidget_RecordCounts->setColumnCount(3);
|
||||||
|
ui->tableWidget_RecordCounts->setHorizontalHeaderLabels({ "Identifier", "Asset", "Count" });
|
||||||
|
ui->tableWidget_RecordCounts->horizontalHeader()->setStretchLastSection(true);
|
||||||
|
|
||||||
|
ui->tableWidget_RecordOrder->setColumnCount(3);
|
||||||
|
ui->tableWidget_RecordOrder->setHorizontalHeaderLabels({ "Identifier", "Asset", "Count" });
|
||||||
|
ui->tableWidget_RecordOrder->horizontalHeader()->setStretchLastSection(true);
|
||||||
|
|
||||||
|
connect(ui->lineEdit_TagSearch, &QLineEdit::textChanged, this, &ZoneFileViewer::SortTags);
|
||||||
|
connect(ui->tableWidget_RecordCounts, &QTableWidget::itemSelectionChanged, this, &ZoneFileViewer::HighlightRecordInOrder);
|
||||||
|
connect(ui->listWidget_Tags, &QListWidget::currentTextChanged, this, [this](const QString &aCurrentText) {
|
||||||
|
StatusBarManager::instance().updateStatus(QString("Selected tag '%1' with index %2").arg(aCurrentText).arg(mZoneFile->GetTags().indexOf(aCurrentText)));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
ZoneFileViewer::~ZoneFileViewer() {
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZoneFileViewer::HighlightRecordInOrder() {
|
||||||
|
ui->tableWidget_RecordOrder->clearSelection();
|
||||||
|
|
||||||
|
foreach (auto selectedItem, ui->tableWidget_RecordCounts->selectedItems()) {
|
||||||
|
int selectedRow = selectedItem->row();
|
||||||
|
const QString assetId = ui->tableWidget_RecordCounts->item(selectedRow, 0)->text();
|
||||||
|
|
||||||
|
for (int i = 0; i < ui->tableWidget_RecordOrder->rowCount(); i++) {
|
||||||
|
const QString testAssetId = ui->tableWidget_RecordOrder->item(i, 0)->text();
|
||||||
|
if (testAssetId != assetId) { continue; }
|
||||||
|
|
||||||
|
ui->tableWidget_RecordOrder->selectRow(i);
|
||||||
|
ui->tableWidget_RecordOrder->item(i, 0)->setSelected(true);
|
||||||
|
ui->tableWidget_RecordOrder->item(i, 1)->setSelected(true);
|
||||||
|
ui->tableWidget_RecordOrder->item(i, 2)->setSelected(true);
|
||||||
|
ui->tableWidget_RecordOrder->item(i, 3)->setSelected(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZoneFileViewer::SortTags(const QString &aSearchText) {
|
||||||
|
ui->listWidget_Tags->clear();
|
||||||
|
|
||||||
|
const QStringList tags = mZoneFile->GetTags();
|
||||||
|
if (aSearchText.isEmpty()) {
|
||||||
|
ui->listWidget_Tags->addItems(tags);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList sortedTags;
|
||||||
|
foreach (const QString tag, tags) {
|
||||||
|
if (tag.contains(aSearchText)) {
|
||||||
|
sortedTags << tag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StatusBarManager::instance().updateStatus(QString("Found %1 tags.").arg(sortedTags.size()));
|
||||||
|
ui->listWidget_Tags->addItems(sortedTags);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZoneFileViewer::SetZoneFile(const ZoneFile* aZoneFile) {
|
||||||
|
mZoneFile = aZoneFile;
|
||||||
|
|
||||||
|
ui->tableWidget_RecordCounts->clearContents();
|
||||||
|
ui->tableWidget_RecordOrder->clearContents();
|
||||||
|
ui->listWidget_Tags->clear();
|
||||||
|
|
||||||
|
const QStringList tags = mZoneFile->GetTags();
|
||||||
|
ui->listWidget_Tags->addItems(tags);
|
||||||
|
ui->label_Title->setText(mZoneFile->GetBaseStem() + ".zone");
|
||||||
|
|
||||||
|
ui->groupBox_Tags->setTitle(QString("Tags (%1)").arg(tags.size()));
|
||||||
|
|
||||||
|
if (tags.isEmpty()) {
|
||||||
|
ui->groupBox_Tags->hide();
|
||||||
|
} else {
|
||||||
|
ui->groupBox_Tags->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
QMap<XAssetType, int> recordCounts = QMap<XAssetType, int>();
|
||||||
|
QVector<QPair<XAssetType, int>> assetOccurances = QVector<QPair<XAssetType, int>>();
|
||||||
|
for (XAssetType type : mZoneFile->GetTypes()) {
|
||||||
|
if (!recordCounts.contains(type)) {
|
||||||
|
recordCounts[type] = 0;
|
||||||
|
}
|
||||||
|
recordCounts[type]++;
|
||||||
|
|
||||||
|
if (!assetOccurances.isEmpty() && assetOccurances.last().first == type) {
|
||||||
|
assetOccurances.last().second++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPair<XAssetType, int> assetOccurance(type, 1);
|
||||||
|
assetOccurances << assetOccurance;
|
||||||
|
}
|
||||||
|
ui->tableWidget_RecordOrder->setRowCount(assetOccurances.size());
|
||||||
|
|
||||||
|
int assetIndex = 0;
|
||||||
|
foreach (auto assetOccurance, assetOccurances) {
|
||||||
|
XAssetType assetType = assetOccurance.first;
|
||||||
|
int assetCount = assetOccurance.second;
|
||||||
|
|
||||||
|
QIcon assetIcon = Utils::CreateAssetIcon(assetType);
|
||||||
|
if (assetIcon.isNull()) {
|
||||||
|
qDebug() << "Icon is null for record: " << assetType;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTableWidgetItem *recordItem = new QTableWidgetItem(QString::number(assetType, 16));
|
||||||
|
QTableWidgetItem *recordStrItem = new QTableWidgetItem(XAsset::XAssetTypeToString(assetType));
|
||||||
|
QTableWidgetItem *recordCountItem = new QTableWidgetItem(QString::number(assetCount));
|
||||||
|
recordItem->setIcon(assetIcon);
|
||||||
|
|
||||||
|
ui->tableWidget_RecordOrder->setItem(assetIndex, 0, recordItem);
|
||||||
|
ui->tableWidget_RecordOrder->setItem(assetIndex, 1, recordStrItem);
|
||||||
|
ui->tableWidget_RecordOrder->setItem(assetIndex, 2, recordCountItem);
|
||||||
|
|
||||||
|
assetIndex++;
|
||||||
|
}
|
||||||
|
|
||||||
|
int recordIndex = 0;
|
||||||
|
for (XAssetType assetType : recordCounts.keys()) {
|
||||||
|
int recordCount = recordCounts[assetType];
|
||||||
|
|
||||||
|
QIcon assetIcon = Utils::CreateAssetIcon(assetType);
|
||||||
|
if (assetIcon.isNull()) {
|
||||||
|
qDebug() << "Icon is null for record: " << assetType;
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->tableWidget_RecordCounts->setRowCount(recordIndex + 1);
|
||||||
|
|
||||||
|
QTableWidgetItem *recordItem = new QTableWidgetItem(QString::number(assetType, 16));
|
||||||
|
QTableWidgetItem *recordCountStrItem = new QTableWidgetItem(XAsset::XAssetTypeToString(assetType));
|
||||||
|
QTableWidgetItem *recordCountItem = new QTableWidgetItem(QString::number(recordCount));
|
||||||
|
recordItem->setIcon(assetIcon);
|
||||||
|
|
||||||
|
ui->tableWidget_RecordCounts->setItem(recordIndex, 0, recordItem);
|
||||||
|
ui->tableWidget_RecordCounts->setItem(recordIndex, 1, recordCountStrItem);
|
||||||
|
ui->tableWidget_RecordCounts->setItem(recordIndex, 2, recordCountItem);
|
||||||
|
|
||||||
|
recordIndex++;
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->tableWidget_RecordOrder->resizeColumnsToContents();
|
||||||
|
ui->tableWidget_RecordCounts->resizeColumnsToContents();
|
||||||
|
}
|
||||||
@ -1,27 +1,33 @@
|
|||||||
#ifndef ZONEFILEVIEWER_H
|
#ifndef ZONEFILEVIEWER_H
|
||||||
#define ZONEFILEVIEWER_H
|
#define ZONEFILEVIEWER_H
|
||||||
|
|
||||||
#include "zonefile.h"
|
#include "zonefile.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class ZoneFileViewer;
|
class ZoneFileViewer;
|
||||||
}
|
}
|
||||||
|
|
||||||
class ZoneFileViewer : public QWidget
|
class ZoneFileViewer : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ZoneFileViewer(QWidget *parent = nullptr);
|
explicit ZoneFileViewer(QWidget *parent = nullptr);
|
||||||
~ZoneFileViewer();
|
~ZoneFileViewer();
|
||||||
|
|
||||||
void SetZoneFile(std::shared_ptr<ZoneFile> aZoneFile);
|
void SetZoneFile(const ZoneFile *aZoneFile);
|
||||||
private:
|
|
||||||
Ui::ZoneFileViewer *ui;
|
public slots:
|
||||||
std::shared_ptr<ZoneFile> aZoneFile;
|
void SortTags(const QString &aSearchText);
|
||||||
};
|
|
||||||
|
void HighlightRecordInOrder();
|
||||||
#endif // ZONEFILEVIEWER_H
|
|
||||||
|
private:
|
||||||
|
Ui::ZoneFileViewer *ui;
|
||||||
|
const ZoneFile* mZoneFile;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ZONEFILEVIEWER_H
|
||||||
129
app/zonefileviewer.ui
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>ZoneFileViewer</class>
|
||||||
|
<widget class="QWidget" name="ZoneFileViewer">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>556</width>
|
||||||
|
<height>428</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_Title">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>16</pointsize>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>ZoneFile 0</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_Tags">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Roboto</family>
|
||||||
|
<pointsize>9</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Tags</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Search:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_TagSearch">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Search tags...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="listWidget_Tags">
|
||||||
|
<property name="editTriggers">
|
||||||
|
<set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
|
||||||
|
</property>
|
||||||
|
<property name="alternatingRowColors">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_RecordCounts">
|
||||||
|
<property name="title">
|
||||||
|
<string>Record Counts</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QTableWidget" name="tableWidget_RecordCounts">
|
||||||
|
<property name="editTriggers">
|
||||||
|
<set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
|
||||||
|
</property>
|
||||||
|
<property name="alternatingRowColors">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::SelectionMode::SingleSelection</enum>
|
||||||
|
</property>
|
||||||
|
<property name="selectionBehavior">
|
||||||
|
<enum>QAbstractItemView::SelectionBehavior::SelectRows</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_RecordOrder">
|
||||||
|
<property name="title">
|
||||||
|
<string>Record Order</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QTableWidget" name="tableWidget_RecordOrder">
|
||||||
|
<property name="editTriggers">
|
||||||
|
<set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
|
||||||
|
</property>
|
||||||
|
<property name="alternatingRowColors">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::SelectionMode::NoSelection</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
346
asset_structs.h
@ -1,346 +0,0 @@
|
|||||||
#ifndef ASSET_STRUCTS_H
|
|
||||||
#define ASSET_STRUCTS_H
|
|
||||||
|
|
||||||
#include "enums.h"
|
|
||||||
|
|
||||||
#include <QString>
|
|
||||||
#include <QColor>
|
|
||||||
#include <QRectF>
|
|
||||||
|
|
||||||
struct LocalString {
|
|
||||||
QString string;
|
|
||||||
QString alias;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RawFile {
|
|
||||||
quint32 length;
|
|
||||||
QString path;
|
|
||||||
QString contents;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TechSet {
|
|
||||||
QString name;
|
|
||||||
bool hasShaders = false;
|
|
||||||
QVector<quint32> pointers;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Shader {
|
|
||||||
quint32 shaderPtr;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct XModelCollSurf_s
|
|
||||||
{
|
|
||||||
float mins[3];
|
|
||||||
float maxs[3];
|
|
||||||
int boneIdx;
|
|
||||||
int contents;
|
|
||||||
int surfFlags;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct XModelLodInfo
|
|
||||||
{
|
|
||||||
float dist;
|
|
||||||
unsigned short numsurfs;
|
|
||||||
unsigned short surfIndex;
|
|
||||||
int partBits[5];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct XModelHighMipBounds
|
|
||||||
{
|
|
||||||
float mins[3];
|
|
||||||
float maxs[3];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct XModelStreamInfo
|
|
||||||
{
|
|
||||||
XModelHighMipBounds *highMipBounds;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct XBoneInfo
|
|
||||||
{
|
|
||||||
float bounds[2][3];
|
|
||||||
float offset[3];
|
|
||||||
float radiusSquared;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Model {
|
|
||||||
quint32 namePtr;
|
|
||||||
quint8 tagCount;
|
|
||||||
quint8 rootTagCount;
|
|
||||||
quint8 surfCount;
|
|
||||||
quint8 unknownCount;
|
|
||||||
quint32 boneNamePtr;
|
|
||||||
quint32 parentListPtr;
|
|
||||||
quint32 quatsPtr;
|
|
||||||
quint32 transPtr;
|
|
||||||
quint32 partClassPtr;
|
|
||||||
quint32 baseMatPtr;
|
|
||||||
quint32 surfsPtr;
|
|
||||||
quint32 materialHandlesPtr;
|
|
||||||
|
|
||||||
XModelLodInfo lodInfo[4];
|
|
||||||
quint32 collSurfsPtr;
|
|
||||||
int numCollSurfs;
|
|
||||||
int contents;
|
|
||||||
quint32 boneInfoPtr;
|
|
||||||
float radius;
|
|
||||||
float mins[3];
|
|
||||||
float maxs[3];
|
|
||||||
short numLods;
|
|
||||||
short collLod;
|
|
||||||
quint32 streamInfoPtr; // is not loaded on ps3
|
|
||||||
int memUsage;
|
|
||||||
char flags;
|
|
||||||
quint32 physPresetPtr;
|
|
||||||
quint32 physGeomsPtr;
|
|
||||||
|
|
||||||
QString modelName;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Animation {
|
|
||||||
quint16 dataByteCount;
|
|
||||||
quint16 dataShortCount;
|
|
||||||
quint16 dataIntCount;
|
|
||||||
quint16 randomDataByteCount;
|
|
||||||
quint16 randomDataIntCount;
|
|
||||||
quint16 numframes;
|
|
||||||
bool isLooped;
|
|
||||||
bool isDelta;
|
|
||||||
quint8 noneRotatedBoneCount;
|
|
||||||
quint8 twoDRotatedBoneCount;
|
|
||||||
quint8 normalRotatedBoneCount;
|
|
||||||
quint8 twoDStaticRotatedBoneCount;
|
|
||||||
quint8 normalStaticRotatedBoneCount;
|
|
||||||
quint8 normalTranslatedBoneCount;
|
|
||||||
quint8 preciseTranslatedBoneCount;
|
|
||||||
quint8 staticTranslatedBoneCount;
|
|
||||||
quint8 noneTranslatedBoneCount;
|
|
||||||
quint8 totalBoneCount;
|
|
||||||
quint8 otherBoneCount1;
|
|
||||||
quint8 otherBoneCount2;
|
|
||||||
quint8 notifyCount;
|
|
||||||
quint8 assetType;
|
|
||||||
bool pad;
|
|
||||||
unsigned int randomDataShortCount;
|
|
||||||
unsigned int indexCount;
|
|
||||||
float frameRate;
|
|
||||||
float frequency;
|
|
||||||
quint32 boneIDsPtr;
|
|
||||||
quint32 dataBytePtr;
|
|
||||||
quint32 dataShortPtr;
|
|
||||||
quint32 dataIntPtr;
|
|
||||||
quint32 randomDataShortPtr;
|
|
||||||
quint32 randomDataBytePtr;
|
|
||||||
quint32 randomDataIntPtr;
|
|
||||||
quint32 longIndiciesPtr;
|
|
||||||
quint32 notificationsPtr;
|
|
||||||
quint32 deltaPartsPtr;
|
|
||||||
QString name;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct StringTable {
|
|
||||||
quint32 columnCount;
|
|
||||||
quint32 rowCount;
|
|
||||||
QString name;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Image {
|
|
||||||
QString name;
|
|
||||||
QString materialName;
|
|
||||||
quint32 size1;
|
|
||||||
quint32 size2;
|
|
||||||
IMAGE_COMPRESSION compression;
|
|
||||||
quint32 unknowna;
|
|
||||||
quint32 unknownb;
|
|
||||||
quint32 unknownc;
|
|
||||||
quint32 unknownd;
|
|
||||||
quint32 unknowne;
|
|
||||||
quint32 unknownf;
|
|
||||||
quint32 unknowng;
|
|
||||||
quint32 unknownh;
|
|
||||||
quint32 unknowni;
|
|
||||||
quint32 unknownj;
|
|
||||||
quint32 unknownk;
|
|
||||||
quint32 unknownl;
|
|
||||||
quint32 unknownm;
|
|
||||||
quint32 unknown1;
|
|
||||||
quint32 unknown2;
|
|
||||||
quint32 unknown3;
|
|
||||||
quint32 unknown4;
|
|
||||||
quint32 unknown5;
|
|
||||||
quint32 unknown6;
|
|
||||||
quint32 unknown7;
|
|
||||||
quint32 unknown8;
|
|
||||||
quint32 unknown9;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Menu {
|
|
||||||
QString filePath;
|
|
||||||
QString name;
|
|
||||||
QString definition;
|
|
||||||
quint32 menuNamePtr;
|
|
||||||
QRectF rect;
|
|
||||||
MENU_H_ALIGNMENT hAlign;
|
|
||||||
MENU_V_ALIGNMENT vAlign;
|
|
||||||
QRectF clientRect;
|
|
||||||
MENU_H_ALIGNMENT hClientAlign;
|
|
||||||
MENU_V_ALIGNMENT vClientAlign;
|
|
||||||
quint32 groupPtr;
|
|
||||||
MENU_WINDOW_STYLE style;
|
|
||||||
MENU_WINDOW_BORDER border;
|
|
||||||
quint32 ownerDraw;
|
|
||||||
quint32 ownerDrawFlags;
|
|
||||||
float borderSize;
|
|
||||||
int staticFlags;
|
|
||||||
float dynamicFlags;
|
|
||||||
float nextTime;
|
|
||||||
QColor foregroundColor;
|
|
||||||
QColor backgroundColor;
|
|
||||||
QColor borderColor;
|
|
||||||
QColor outlineColor;
|
|
||||||
quint32 materialPtr;
|
|
||||||
quint32 fontPtr;
|
|
||||||
quint32 fullScreen;
|
|
||||||
quint32 itemCount;
|
|
||||||
quint32 fontIndex;
|
|
||||||
quint32 cursorItem;
|
|
||||||
quint32 fadeCycle;
|
|
||||||
float fadeClamp;
|
|
||||||
float fadeAmount;
|
|
||||||
float fadeInAmount;
|
|
||||||
float blurRadius;
|
|
||||||
quint32 onOpenPtr;
|
|
||||||
quint32 onFocusPtr;
|
|
||||||
quint32 onClosePtr;
|
|
||||||
quint32 onESCPtr;
|
|
||||||
quint32 onKeyPtr;
|
|
||||||
quint32 visibleExpCount;
|
|
||||||
quint32 expEntryPtr;
|
|
||||||
quint32 allowedBindingPtr;
|
|
||||||
quint32 soundNamePtr;
|
|
||||||
quint32 imageTrack;
|
|
||||||
QColor focusColor;
|
|
||||||
QColor disabledColor;
|
|
||||||
quint32 rectXExpCount;
|
|
||||||
quint32 rectXExpPtr;
|
|
||||||
quint32 rectYExpCount;
|
|
||||||
quint32 rectYExpPtr;
|
|
||||||
quint32 itemWindowDefNamePtr;
|
|
||||||
QRectF itemRect;
|
|
||||||
MENU_H_ALIGNMENT itemHAlignment;
|
|
||||||
MENU_V_ALIGNMENT itemVAlignment;
|
|
||||||
quint32 itemGroupPtr;
|
|
||||||
MENU_WINDOW_STYLE itemWindowStyle;
|
|
||||||
MENU_WINDOW_BORDER itemWindowBorder;
|
|
||||||
quint32 itemOwnerDraw;
|
|
||||||
quint32 itemOwnerDrawFlags;
|
|
||||||
float itemBorderSize;
|
|
||||||
int itemStaticFlags;
|
|
||||||
int itemDynamicFlags;
|
|
||||||
int itemNextTime;
|
|
||||||
QColor itemForegroundColor;
|
|
||||||
QColor itemBackgroundColor;
|
|
||||||
QColor itemBorderColor;
|
|
||||||
QColor itemOutlineColor;
|
|
||||||
quint32 itemMaterialPtr;
|
|
||||||
QRectF itemTextRect;
|
|
||||||
MENU_H_ALIGNMENT itemText_hAlign;
|
|
||||||
MENU_V_ALIGNMENT itemText_vAlign;
|
|
||||||
MENU_ITEM_TYPE itemType;
|
|
||||||
quint32 dataType;
|
|
||||||
quint32 alignment;
|
|
||||||
MENU_FONT_TYPE fontEnum;
|
|
||||||
quint32 textAlignMode;
|
|
||||||
float textalignx;
|
|
||||||
float textaligny;
|
|
||||||
float textscale;
|
|
||||||
MENU_ITEM_TEXTSTYLE textStyle;
|
|
||||||
int gameMsgWindowIndex;
|
|
||||||
int gameMsgWindowMode;
|
|
||||||
quint32 testPtr;
|
|
||||||
quint32 textSavegameInfo;
|
|
||||||
quint32 parentPtr;
|
|
||||||
quint32 mouseEnterText;
|
|
||||||
quint32 mouseExitText;
|
|
||||||
quint32 mouseEnter;
|
|
||||||
quint32 mouseExit;
|
|
||||||
quint32 action;
|
|
||||||
quint32 onAccept;
|
|
||||||
quint32 onFocus;
|
|
||||||
quint32 leaveFocus;
|
|
||||||
quint32 dvar;
|
|
||||||
quint32 dvarTest;
|
|
||||||
quint32 keyHandlerPtr;
|
|
||||||
quint32 enableDvarPtr;
|
|
||||||
quint32 dvarFlags;
|
|
||||||
quint32 focusSoundPtr;
|
|
||||||
float special;
|
|
||||||
quint32 cursorPos;
|
|
||||||
// itemDefData_t typeData;
|
|
||||||
// listBoxDef_s *listBox;
|
|
||||||
quint32 startPos;
|
|
||||||
quint32 endPos;
|
|
||||||
quint32 drawPadding;
|
|
||||||
float elementWidth, elementHeight;
|
|
||||||
quint32 elementStyle, numColumns;
|
|
||||||
//columnInfo_s columnInfo[16];
|
|
||||||
quint32 doubleClickPtr;
|
|
||||||
int notselectable;
|
|
||||||
int noScrollBars;
|
|
||||||
int usePaging;
|
|
||||||
QColor itemSelectBorderColor;
|
|
||||||
QColor itemDisableColor;
|
|
||||||
QColor itemFocusColor;
|
|
||||||
quint32 selectIconPtr;
|
|
||||||
quint32 backgroundItemListboxPtr;
|
|
||||||
quint32 highlightTexturePtr;
|
|
||||||
// editFieldDef_s *editField;
|
|
||||||
float minVal;
|
|
||||||
float maxVal;
|
|
||||||
float defVal;
|
|
||||||
float range;
|
|
||||||
int maxChars;
|
|
||||||
int maxCharsGotoNext;
|
|
||||||
int maxPaintChars;
|
|
||||||
int paintOffset;
|
|
||||||
// multiDef_s *multi;
|
|
||||||
QVector<quint32> dvarListPtrs;
|
|
||||||
QVector<quint32> dvarStrPtrs;
|
|
||||||
QVector<float> dvarValues;
|
|
||||||
quint32 count;
|
|
||||||
quint32 strDef;
|
|
||||||
quint32 enumDvarNamePtr;
|
|
||||||
quint32 dataPtr;
|
|
||||||
quint32 itemImageTrack;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct MenuFile {
|
|
||||||
quint32 menuCount;
|
|
||||||
QVector<Menu> menuDefs;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct AssetMap {
|
|
||||||
QVector<LocalString> localStrings;
|
|
||||||
QVector<RawFile> rawFiles;
|
|
||||||
//QVector<PhysPreset> phyPresets;
|
|
||||||
QVector<Model> models;
|
|
||||||
//QVector<Material> rawFiles;
|
|
||||||
//QVector<Shader> shaders;
|
|
||||||
QVector<TechSet> techSets;
|
|
||||||
QVector<Image> images;
|
|
||||||
//QVector<Sound> sounds;
|
|
||||||
//QVector<CollisionMap> collMaps;
|
|
||||||
//QVector<LightDefinition> lightDefs;
|
|
||||||
//QVector<UiMap> uiMaps;
|
|
||||||
//QVector<DriverGlobal> driverGlobals;
|
|
||||||
//QVector<AiType> aiType;
|
|
||||||
//QVector<Effect> effects;
|
|
||||||
QVector<Animation> animations;
|
|
||||||
QVector<StringTable> stringTables;
|
|
||||||
QVector<MenuFile> menuFiles;
|
|
||||||
//QVector<Weapon> weapons;
|
|
||||||
//QVector<D3DBSP> d3dbspDumps;
|
|
||||||
//QVector<SingleplayerMap> spMaps;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // ASSET_STRUCTS_H
|
|
||||||
410
compressor.h
@ -1,410 +0,0 @@
|
|||||||
#ifndef COMPRESSOR_H
|
|
||||||
#define COMPRESSOR_H
|
|
||||||
|
|
||||||
#include "utils.h"
|
|
||||||
#include "QtZlib/zlib.h"
|
|
||||||
#include "lzokay.hpp"
|
|
||||||
#include "lzx.h"
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <QByteArray>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QDataStream>
|
|
||||||
#include <QVector>
|
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
EResult_LookbehindOverrun = -4,
|
|
||||||
EResult_OutputOverrun = -3,
|
|
||||||
EResult_InputOverrun = -2,
|
|
||||||
EResult_Error = -1,
|
|
||||||
EResult_Success = 0,
|
|
||||||
EResult_InputNotConsumed = 1,
|
|
||||||
} lzokay_EResult;
|
|
||||||
|
|
||||||
static_assert(EResult_LookbehindOverrun == lzokay_EResult(lzokay::EResult::LookbehindOverrun), "LookbehindOverrun mismatch");
|
|
||||||
static_assert(EResult_OutputOverrun == lzokay_EResult(lzokay::EResult::OutputOverrun), "OutputOverrun mismatch");
|
|
||||||
static_assert(EResult_InputOverrun == lzokay_EResult(lzokay::EResult::InputOverrun), "InputOverrun mismatch");
|
|
||||||
static_assert(EResult_Error == lzokay_EResult(lzokay::EResult::Error), "Error mismatch");
|
|
||||||
static_assert(EResult_Success == lzokay_EResult(lzokay::EResult::Success), "Success mismatch");
|
|
||||||
static_assert(EResult_InputNotConsumed == lzokay_EResult(lzokay::EResult::InputNotConsumed), "InputNotConsumed mismatch");
|
|
||||||
|
|
||||||
class Compressor {
|
|
||||||
public:
|
|
||||||
static QByteArray DecompressZLIB(const QByteArray &compressedData) {
|
|
||||||
if (compressedData.isEmpty())
|
|
||||||
return QByteArray();
|
|
||||||
|
|
||||||
// Set up the inflate stream.
|
|
||||||
z_stream strm;
|
|
||||||
memset(&strm, 0, sizeof(strm));
|
|
||||||
// The inflate() function needs a non-const pointer; this is safe as we never modify the input.
|
|
||||||
strm.next_in = reinterpret_cast<Bytef*>(const_cast<char*>(compressedData.data()));
|
|
||||||
strm.avail_in = static_cast<uInt>(compressedData.size());
|
|
||||||
|
|
||||||
// Use inflateInit(); if you want to support gzip streams, see note below.
|
|
||||||
int ret = inflateInit(&strm);
|
|
||||||
if (ret != Z_OK) {
|
|
||||||
qWarning() << "inflateInit failed:" << zError(ret);
|
|
||||||
return QByteArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
QByteArray outArray;
|
|
||||||
char buffer[4096];
|
|
||||||
|
|
||||||
// Decompress until we reach the stream end.
|
|
||||||
do {
|
|
||||||
strm.next_out = reinterpret_cast<Bytef*>(buffer);
|
|
||||||
strm.avail_out = sizeof(buffer);
|
|
||||||
|
|
||||||
ret = inflate(&strm, Z_NO_FLUSH);
|
|
||||||
// Handle a special case: if inflate() returns Z_BUF_ERROR without
|
|
||||||
// having produced any output and with no further input, then we break out.
|
|
||||||
if (ret == Z_BUF_ERROR && strm.avail_in == 0) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (ret != Z_OK && ret != Z_STREAM_END) {
|
|
||||||
qWarning() << "Error: ZLib inflate failed:" << zError(ret);
|
|
||||||
inflateEnd(&strm);
|
|
||||||
return QByteArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calculate number of bytes produced in this iteration.
|
|
||||||
int bytesProduced = sizeof(buffer) - strm.avail_out;
|
|
||||||
if (bytesProduced > 0)
|
|
||||||
outArray.append(buffer, bytesProduced);
|
|
||||||
|
|
||||||
} while (ret != Z_STREAM_END);
|
|
||||||
|
|
||||||
inflateEnd(&strm);
|
|
||||||
return outArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QByteArray DecompressLZO(const QByteArray& input) {
|
|
||||||
lzokay::EResult error;
|
|
||||||
|
|
||||||
// Ensure the input QByteArray is valid
|
|
||||||
if (input.isEmpty()) {
|
|
||||||
qDebug() << "Input QByteArray is empty.";
|
|
||||||
return QByteArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Step 1: Cast QByteArray to uint8_t*
|
|
||||||
const uint8_t *compressedData = reinterpret_cast<const uint8_t *>(input.constData());
|
|
||||||
std::size_t compressedSize = static_cast<std::size_t>(input.size());
|
|
||||||
|
|
||||||
// Step 2: Allocate a sufficiently large decompression buffer
|
|
||||||
// Use a large initial estimate if the decompressed size is unknown
|
|
||||||
std::size_t initialBufferSize = compressedSize * 20; // Arbitrary multiplier for decompression
|
|
||||||
std::unique_ptr<uint8_t[]> decompressed(new uint8_t[initialBufferSize]);
|
|
||||||
|
|
||||||
// Step 3: Attempt decompression
|
|
||||||
std::size_t decompressedSize = 0;
|
|
||||||
error = lzokay::decompress(
|
|
||||||
compressedData, compressedSize, // Input data and size
|
|
||||||
decompressed.get(), initialBufferSize, // Output buffer and initial size
|
|
||||||
decompressedSize // Actual decompressed size
|
|
||||||
);
|
|
||||||
|
|
||||||
// Step 4: Handle decompression errors
|
|
||||||
if (error != lzokay::EResult::Success) {
|
|
||||||
qDebug() << "Decompression failed with error code:" << static_cast<int>(error);
|
|
||||||
return QByteArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Step 5: Return the decompressed data as a QByteArray
|
|
||||||
return QByteArray(reinterpret_cast<const char *>(decompressed.get()), decompressedSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const int VECTOR_SIZE = 16; // 16 32-bit words
|
|
||||||
static const int NUM_OF_BLOCKS_PER_CHUNK = 8192;
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
|
||||||
// Helper functions (assuming little–endian order)
|
|
||||||
|
|
||||||
static void Convert32BitTo8Bit(quint32 value, quint8* array) {
|
|
||||||
array[0] = static_cast<quint8>(value >> 0);
|
|
||||||
array[1] = static_cast<quint8>(value >> 8);
|
|
||||||
array[2] = static_cast<quint8>(value >> 16);
|
|
||||||
array[3] = static_cast<quint8>(value >> 24);
|
|
||||||
}
|
|
||||||
|
|
||||||
static quint32 ConvertArrayTo32Bit(const QByteArray &array) {
|
|
||||||
return ((static_cast<quint32>(static_cast<uchar>(array[0])) << 0) |
|
|
||||||
(static_cast<quint32>(static_cast<uchar>(array[1])) << 8) |
|
|
||||||
(static_cast<quint32>(static_cast<uchar>(array[2])) << 16) |
|
|
||||||
(static_cast<quint32>(static_cast<uchar>(array[3])) << 24));
|
|
||||||
}
|
|
||||||
|
|
||||||
static quint32 Rotate(quint32 value, quint32 numBits) {
|
|
||||||
return (value << numBits) | (value >> (32 - numBits));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build the IV table from a 0x20–byte feed. The table is 0xFB0 bytes.
|
|
||||||
static QByteArray InitIVTable(const QByteArray &feed) {
|
|
||||||
const int tableSize = 0xFB0;
|
|
||||||
QByteArray table;
|
|
||||||
table.resize(tableSize);
|
|
||||||
int ptr = 0;
|
|
||||||
for (int i = 0; i < 200; ++i) {
|
|
||||||
for (int x = 0; x < 5; ++x) {
|
|
||||||
if (static_cast<uchar>(feed.at(ptr)) == 0x00)
|
|
||||||
ptr = 0;
|
|
||||||
int base = i * 20 + x * 4;
|
|
||||||
table[base] = feed.at(ptr);
|
|
||||||
table[base + 1] = feed.at(ptr);
|
|
||||||
table[base + 2] = feed.at(ptr);
|
|
||||||
table[base + 3] = feed.at(ptr);
|
|
||||||
++ptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Copy block numbers [1,0,0,0] into the last 16 bytes
|
|
||||||
QByteArray oneBlock;
|
|
||||||
oneBlock.append(char(1)); oneBlock.append(char(0)); oneBlock.append(char(0)); oneBlock.append(char(0));
|
|
||||||
table.replace(0xFA0, 4, oneBlock);
|
|
||||||
table.replace(0xFA4, 4, oneBlock);
|
|
||||||
table.replace(0xFA8, 4, oneBlock);
|
|
||||||
table.replace(0xFAC, 4, oneBlock);
|
|
||||||
return table;
|
|
||||||
}
|
|
||||||
|
|
||||||
// "unk" function as in the C# code.
|
|
||||||
static int unk(quint64 arg1, quint8 arg2) {
|
|
||||||
if (arg2 >= 0x40)
|
|
||||||
return 0;
|
|
||||||
return static_cast<int>(arg1 >> arg2);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Compute the IV for a given section index using the IV table.
|
|
||||||
static QByteArray GetIV(const QByteArray &table, int index) {
|
|
||||||
int num1 = 0xFA0 + index;
|
|
||||||
int num2 = unk(0x51EB851FLL * num1, 0x20);
|
|
||||||
int adjust = ((num2 >> 6) + (num2 >> 31));
|
|
||||||
int startIndex = 20 * (num1 - 200 * adjust);
|
|
||||||
// Return 8 bytes from that location.
|
|
||||||
return table.mid(startIndex, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update the IV table given the section's SHA1 hash.
|
|
||||||
static void UpdateIVTable(QByteArray &table, int index, const QByteArray §ionHash) {
|
|
||||||
int blockNumIndex = index % 4;
|
|
||||||
int baseOffset = 0xFA0 + blockNumIndex * 4;
|
|
||||||
quint32 blockNumVal = (static_cast<uchar>(table.at(baseOffset)) ) |
|
|
||||||
(static_cast<uchar>(table.at(baseOffset + 1)) << 8 ) |
|
|
||||||
(static_cast<uchar>(table.at(baseOffset + 2)) << 16) |
|
|
||||||
(static_cast<uchar>(table.at(baseOffset + 3)) << 24);
|
|
||||||
int blockNum = blockNumVal * 4 + index;
|
|
||||||
int num2 = unk(0x51EB851FLL * blockNum, 0x20);
|
|
||||||
int adjust = ((num2 >> 6) + (num2 >> 31));
|
|
||||||
int startIndex = 20 * (blockNum - 200 * adjust) + 1;
|
|
||||||
int hashIndex = 0;
|
|
||||||
for (int x = 0; x < 4; ++x) {
|
|
||||||
table[startIndex - 1] = table.at(startIndex - 1) ^ sectionHash.at(hashIndex);
|
|
||||||
table[startIndex] = table.at(startIndex) ^ sectionHash.at(hashIndex + 1);
|
|
||||||
table[startIndex + 1] = table.at(startIndex + 1) ^ sectionHash.at(hashIndex + 2);
|
|
||||||
table[startIndex + 2] = table.at(startIndex + 2) ^ sectionHash.at(hashIndex + 3);
|
|
||||||
table[startIndex + 3] = table.at(startIndex + 3) ^ sectionHash.at(hashIndex + 4);
|
|
||||||
startIndex += 5;
|
|
||||||
hashIndex += 5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static quint32 ToUInt32(const QByteArray &data, int offset) {
|
|
||||||
// Converts 4 bytes (starting at offset) from data into a 32-bit unsigned integer (little-endian)
|
|
||||||
return ((static_cast<quint32>(static_cast<uchar>(data[offset])) ) |
|
|
||||||
(static_cast<quint32>(static_cast<uchar>(data[offset+1])) << 8 ) |
|
|
||||||
(static_cast<quint32>(static_cast<uchar>(data[offset+2])) << 16) |
|
|
||||||
(static_cast<quint32>(static_cast<uchar>(data[offset+3])) << 24));
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
|
||||||
// Salsa20 decryption for one section.
|
|
||||||
// This function resets the counter for each section.
|
|
||||||
static QByteArray salsa20DecryptSection(const QByteArray §ionData, const QByteArray &key, const QByteArray &iv, int blockSize = 64)
|
|
||||||
{
|
|
||||||
// Choose the appropriate constant based on key length.
|
|
||||||
QByteArray constants;
|
|
||||||
if (key.size() == 32)
|
|
||||||
constants = "expand 32-byte k";
|
|
||||||
else if (key.size() == 16)
|
|
||||||
constants = "expand 16-byte k";
|
|
||||||
else {
|
|
||||||
qWarning() << "Invalid key size:" << key.size() << "; expected 16 or 32 bytes.";
|
|
||||||
return QByteArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
QVector<quint32> state(VECTOR_SIZE);
|
|
||||||
|
|
||||||
// Set state[0] using the first 4 bytes of the constant.
|
|
||||||
state[0] = ConvertArrayTo32Bit(constants.mid(0, 4));
|
|
||||||
|
|
||||||
// state[1] through state[4] come from the first 16 bytes of the key.
|
|
||||||
state[1] = ToUInt32(key, 0);
|
|
||||||
state[2] = ToUInt32(key, 4);
|
|
||||||
state[3] = ToUInt32(key, 8);
|
|
||||||
state[4] = ToUInt32(key, 12);
|
|
||||||
|
|
||||||
// state[5] comes from the next 4 bytes of the constant.
|
|
||||||
state[5] = ConvertArrayTo32Bit(constants.mid(4, 4));
|
|
||||||
|
|
||||||
// state[6] and state[7] come from the IV (which must be 8 bytes).
|
|
||||||
state[6] = ConvertArrayTo32Bit(iv.mid(0, 4));
|
|
||||||
state[7] = ConvertArrayTo32Bit(iv.mid(4, 4));
|
|
||||||
|
|
||||||
// state[8] and state[9] are the 64-bit block counter (start at 0).
|
|
||||||
state[8] = 0;
|
|
||||||
state[9] = 0;
|
|
||||||
|
|
||||||
// state[10] comes from the next 4 bytes of the constant.
|
|
||||||
state[10] = ConvertArrayTo32Bit(constants.mid(8, 4));
|
|
||||||
|
|
||||||
// For state[11] through state[14]:
|
|
||||||
// If the key is 32 bytes, use bytes 16..31; if 16 bytes, reuse the first 16 bytes.
|
|
||||||
if (key.size() == 32) {
|
|
||||||
state[11] = ToUInt32(key, 16);
|
|
||||||
state[12] = ToUInt32(key, 20);
|
|
||||||
state[13] = ToUInt32(key, 24);
|
|
||||||
state[14] = ToUInt32(key, 28);
|
|
||||||
} else { // key.size() == 16
|
|
||||||
state[11] = ToUInt32(key, 0);
|
|
||||||
state[12] = ToUInt32(key, 4);
|
|
||||||
state[13] = ToUInt32(key, 8);
|
|
||||||
state[14] = ToUInt32(key, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
// state[15] comes from the last 4 bytes of the constant.
|
|
||||||
state[15] = ConvertArrayTo32Bit(constants.mid(12, 4));
|
|
||||||
|
|
||||||
// Prepare the output buffer.
|
|
||||||
QByteArray output(sectionData.size(), Qt::Uninitialized);
|
|
||||||
int numBlocks = sectionData.size() / blockSize;
|
|
||||||
int remainder = sectionData.size() % blockSize;
|
|
||||||
|
|
||||||
// Process each full block.
|
|
||||||
for (int blockIndex = 0; blockIndex < numBlocks; ++blockIndex) {
|
|
||||||
QVector<quint32> x = state; // make a copy of the current state for this block
|
|
||||||
|
|
||||||
// Run 20 rounds (10 iterations) of Salsa20.
|
|
||||||
for (int round = 20; round > 0; round -= 2) {
|
|
||||||
x[4] ^= Rotate(x[0] + x[12], 7);
|
|
||||||
x[8] ^= Rotate(x[4] + x[0], 9);
|
|
||||||
x[12] ^= Rotate(x[8] + x[4], 13);
|
|
||||||
x[0] ^= Rotate(x[12] + x[8], 18);
|
|
||||||
|
|
||||||
x[9] ^= Rotate(x[5] + x[1], 7);
|
|
||||||
x[13] ^= Rotate(x[9] + x[5], 9);
|
|
||||||
x[1] ^= Rotate(x[13] + x[9], 13);
|
|
||||||
x[5] ^= Rotate(x[1] + x[13], 18);
|
|
||||||
|
|
||||||
x[14] ^= Rotate(x[10] + x[6], 7);
|
|
||||||
x[2] ^= Rotate(x[14] + x[10], 9);
|
|
||||||
x[6] ^= Rotate(x[2] + x[14], 13);
|
|
||||||
x[10] ^= Rotate(x[6] + x[2], 18);
|
|
||||||
|
|
||||||
x[3] ^= Rotate(x[15] + x[11], 7);
|
|
||||||
x[7] ^= Rotate(x[3] + x[15], 9);
|
|
||||||
x[11] ^= Rotate(x[7] + x[3], 13);
|
|
||||||
x[15] ^= Rotate(x[11] + x[7], 18);
|
|
||||||
|
|
||||||
x[1] ^= Rotate(x[0] + x[3], 7);
|
|
||||||
x[2] ^= Rotate(x[1] + x[0], 9);
|
|
||||||
x[3] ^= Rotate(x[2] + x[1], 13);
|
|
||||||
x[0] ^= Rotate(x[3] + x[2], 18);
|
|
||||||
|
|
||||||
x[6] ^= Rotate(x[5] + x[4], 7);
|
|
||||||
x[7] ^= Rotate(x[6] + x[5], 9);
|
|
||||||
x[4] ^= Rotate(x[7] + x[6], 13);
|
|
||||||
x[5] ^= Rotate(x[4] + x[7], 18);
|
|
||||||
|
|
||||||
x[11] ^= Rotate(x[10] + x[9], 7);
|
|
||||||
x[8] ^= Rotate(x[11] + x[10], 9);
|
|
||||||
x[9] ^= Rotate(x[8] + x[11], 13);
|
|
||||||
x[10] ^= Rotate(x[9] + x[8], 18);
|
|
||||||
|
|
||||||
x[12] ^= Rotate(x[15] + x[14], 7);
|
|
||||||
x[13] ^= Rotate(x[12] + x[15], 9);
|
|
||||||
x[14] ^= Rotate(x[13] + x[12], 13);
|
|
||||||
x[15] ^= Rotate(x[14] + x[13], 18);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Produce the 64-byte keystream block by adding the original state.
|
|
||||||
QVector<quint8> keyStreamBlock(blockSize);
|
|
||||||
for (int i = 0; i < VECTOR_SIZE; ++i) {
|
|
||||||
x[i] += state[i];
|
|
||||||
Convert32BitTo8Bit(x[i], keyStreamBlock.data() + 4 * i);
|
|
||||||
}
|
|
||||||
|
|
||||||
// XOR the keystream block with the corresponding block of sectionData.
|
|
||||||
const uchar* inBlock = reinterpret_cast<const uchar*>(sectionData.constData()) + blockIndex * blockSize;
|
|
||||||
uchar* outBlock = reinterpret_cast<uchar*>(output.data()) + blockIndex * blockSize;
|
|
||||||
for (int j = 0; j < blockSize; ++j) {
|
|
||||||
outBlock[j] = inBlock[j] ^ keyStreamBlock[j];
|
|
||||||
}
|
|
||||||
// Increment the 64-bit block counter.
|
|
||||||
state[8]++;
|
|
||||||
if (state[8] == 0)
|
|
||||||
state[9]++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Process any remaining bytes.
|
|
||||||
if (remainder > 0) {
|
|
||||||
QVector<quint32> x = state;
|
|
||||||
for (int round = 20; round > 0; round -= 2) {
|
|
||||||
x[4] ^= Rotate(x[0] + x[12], 7);
|
|
||||||
x[8] ^= Rotate(x[4] + x[0], 9);
|
|
||||||
x[12] ^= Rotate(x[8] + x[4], 13);
|
|
||||||
x[0] ^= Rotate(x[12] + x[8], 18);
|
|
||||||
|
|
||||||
x[9] ^= Rotate(x[5] + x[1], 7);
|
|
||||||
x[13] ^= Rotate(x[9] + x[5], 9);
|
|
||||||
x[1] ^= Rotate(x[13] + x[9], 13);
|
|
||||||
x[5] ^= Rotate(x[1] + x[13], 18);
|
|
||||||
|
|
||||||
x[14] ^= Rotate(x[10] + x[6], 7);
|
|
||||||
x[2] ^= Rotate(x[14] + x[10], 9);
|
|
||||||
x[6] ^= Rotate(x[2] + x[14], 13);
|
|
||||||
x[10] ^= Rotate(x[6] + x[2], 18);
|
|
||||||
|
|
||||||
x[3] ^= Rotate(x[15] + x[11], 7);
|
|
||||||
x[7] ^= Rotate(x[3] + x[15], 9);
|
|
||||||
x[11] ^= Rotate(x[7] + x[3], 13);
|
|
||||||
x[15] ^= Rotate(x[11] + x[7], 18);
|
|
||||||
|
|
||||||
x[1] ^= Rotate(x[0] + x[3], 7);
|
|
||||||
x[2] ^= Rotate(x[1] + x[0], 9);
|
|
||||||
x[3] ^= Rotate(x[2] + x[1], 13);
|
|
||||||
x[0] ^= Rotate(x[3] + x[2], 18);
|
|
||||||
|
|
||||||
x[6] ^= Rotate(x[5] + x[4], 7);
|
|
||||||
x[7] ^= Rotate(x[6] + x[5], 9);
|
|
||||||
x[4] ^= Rotate(x[7] + x[6], 13);
|
|
||||||
x[5] ^= Rotate(x[4] + x[7], 18);
|
|
||||||
|
|
||||||
x[11] ^= Rotate(x[10] + x[9], 7);
|
|
||||||
x[8] ^= Rotate(x[11] + x[10], 9);
|
|
||||||
x[9] ^= Rotate(x[8] + x[11], 13);
|
|
||||||
x[10] ^= Rotate(x[9] + x[8], 18);
|
|
||||||
|
|
||||||
x[12] ^= Rotate(x[15] + x[14], 7);
|
|
||||||
x[13] ^= Rotate(x[12] + x[15], 9);
|
|
||||||
x[14] ^= Rotate(x[13] + x[12], 13);
|
|
||||||
x[15] ^= Rotate(x[14] + x[13], 18);
|
|
||||||
}
|
|
||||||
QVector<quint8> keyStreamBlock(blockSize);
|
|
||||||
for (int i = 0; i < VECTOR_SIZE; ++i) {
|
|
||||||
x[i] += state[i];
|
|
||||||
Convert32BitTo8Bit(x[i], keyStreamBlock.data() + 4 * i);
|
|
||||||
}
|
|
||||||
const uchar* inBlock = reinterpret_cast<const uchar*>(sectionData.constData()) + numBlocks * blockSize;
|
|
||||||
uchar* outBlock = reinterpret_cast<uchar*>(output.data()) + numBlocks * blockSize;
|
|
||||||
for (int j = 0; j < remainder; ++j)
|
|
||||||
outBlock[j] = inBlock[j] ^ keyStreamBlock[j];
|
|
||||||
}
|
|
||||||
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif // COMPRESSOR_H
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
#ifndef D3DBSP_STRUCTS_H
|
|
||||||
#define D3DBSP_STRUCTS_H
|
|
||||||
|
|
||||||
#include <QByteArray>
|
|
||||||
|
|
||||||
// Define Lump Structure
|
|
||||||
struct Lump {
|
|
||||||
QByteArray content;
|
|
||||||
quint32 size = 0;
|
|
||||||
bool isEmpty = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Lump Index Entry Structure
|
|
||||||
struct LumpIndexEntry {
|
|
||||||
quint32 type;
|
|
||||||
quint32 length;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // D3DBSP_STRUCTS_H
|
|
||||||
@ -1,57 +1,30 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/obj">
|
<qresource prefix="/images">
|
||||||
<file>obj/defaultactor_LOD0.XMODEL_BIN</file>
|
<file>images/XPlor.png</file>
|
||||||
<file>obj/defaultactor_LOD0.XMODEL_EXPORT</file>
|
<file>images/copy.svg</file>
|
||||||
<file>obj/defaultactor_LOD0.bin</file>
|
<file>images/cut.svg</file>
|
||||||
<file>obj/defaultactor_LOD0.cast</file>
|
<file>images/multiple.png</file>
|
||||||
<file>obj/defaultactor_LOD0.gltf</file>
|
<file>images/new_file.svg</file>
|
||||||
<file>obj/defaultactor_LOD0.ma</file>
|
<file>images/open_file.svg</file>
|
||||||
<file>obj/defaultactor_LOD0.mesh.ascii</file>
|
<file>images/open_folder.svg</file>
|
||||||
<file>obj/defaultactor_LOD0.obj</file>
|
<file>images/paste.svg</file>
|
||||||
<file>obj/defaultactor_LOD0.semodel</file>
|
<file>images/refresh.svg</file>
|
||||||
<file>obj/defaultactor_LOD0.smd</file>
|
<file>images/save.svg</file>
|
||||||
<file>obj/defaultactor_LOD0_BIND.mel</file>
|
</qresource>
|
||||||
<file>obj/defaultactor_LOD0_cosmetics.mel</file>
|
<qresource prefix="/icons">
|
||||||
<file>obj/diffusemap.png</file>
|
<file>icons/Icon_Pause.png</file>
|
||||||
<file>obj/mtl_body_default_character.mtl</file>
|
<file>icons/Icon_Play.png</file>
|
||||||
<file>obj/mtl_body_default_character_images.txt</file>
|
<file>icons/Icon_SkipBack.png</file>
|
||||||
<file>obj/normalmap.png</file>
|
<file>icons/Icon_SkipForward.png</file>
|
||||||
</qresource>
|
<file>icons/Icon_Stop.png</file>
|
||||||
<qresource prefix="/d3dbsp">
|
<file>icons/Icon_Editor.png</file>
|
||||||
<file>d3dbsp/asset_viewer.d3dbsp</file>
|
<file>icons/Icon_Views.png</file>
|
||||||
<file>d3dbsp/barebones.d3dbsp</file>
|
<file>icons/Icon_Tree.png</file>
|
||||||
</qresource>
|
<file>icons/Icon_Cut.png</file>
|
||||||
<qresource prefix="/images">
|
<file>icons/Icon_Find.png</file>
|
||||||
<file>images/XPlor.png</file>
|
<file>icons/Icon_NewFile.png</file>
|
||||||
<file>images/copy.svg</file>
|
<file>icons/Icon_Paste.png</file>
|
||||||
<file>images/cut.svg</file>
|
<file>icons/Icon_Save.png</file>
|
||||||
<file>images/multiple.png</file>
|
<file>icons/Icon_OpenFile.png</file>
|
||||||
<file>images/new_file.svg</file>
|
</qresource>
|
||||||
<file>images/open_file.svg</file>
|
</RCC>
|
||||||
<file>images/open_folder.svg</file>
|
|
||||||
<file>images/paste.svg</file>
|
|
||||||
<file>images/refresh.svg</file>
|
|
||||||
<file>images/save.svg</file>
|
|
||||||
</qresource>
|
|
||||||
<qresource prefix="/icons">
|
|
||||||
<file>icons/Icon_COD4.png</file>
|
|
||||||
<file>icons/Icon_COD5.png</file>
|
|
||||||
<file>icons/Icon_COD6.png</file>
|
|
||||||
<file>icons/Icon_COD7.png</file>
|
|
||||||
<file>icons/Icon_COD8.png</file>
|
|
||||||
<file>icons/Icon_COD9.png</file>
|
|
||||||
<file>icons/Icon_DDSFile.png</file>
|
|
||||||
<file>icons/Icon_FastFile.png</file>
|
|
||||||
<file>icons/Icon_IWIFile.png</file>
|
|
||||||
<file>icons/Icon_PC.png</file>
|
|
||||||
<file>icons/Icon_Playstation.png</file>
|
|
||||||
<file>icons/Icon_Xbox.png</file>
|
|
||||||
<file>icons/Icon_ZoneFile.png</file>
|
|
||||||
<file>icons/Icon_GSCFile.png</file>
|
|
||||||
<file>icons/Icon_StringFile.png</file>
|
|
||||||
<file>icons/Icon_TechSetFile.png</file>
|
|
||||||
<file>icons/Icon_WAVFile.png</file>
|
|
||||||
<file>icons/Icon_MenuFile.png</file>
|
|
||||||
<file>icons/Icon_Image.png</file>
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
||||||
|
|||||||
BIN
data/icons/Icon.psd
Normal file
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
BIN
data/icons/Icon_Cut.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
BIN
data/icons/Icon_Editor.png
Normal file
|
After Width: | Height: | Size: 210 B |
|
Before Width: | Height: | Size: 855 B |
BIN
data/icons/Icon_Find.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |