Compare commits
1829 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2c2a364a4 | ||
|
|
8fb3a3ff23 | ||
|
|
c06b971b65 | ||
|
|
031df36935 | ||
|
|
410eb19ce6 | ||
|
|
3584dac5c0 | ||
|
|
f6c8225dac | ||
|
|
4f7793a423 | ||
|
|
ef28d12d85 | ||
|
|
3f60034c39 | ||
|
|
2343e69ce5 | ||
|
|
251b2aaeb8 | ||
|
|
48926fcade | ||
|
|
bb47f3a8e4 | ||
|
|
3677749935 | ||
|
|
75a20216d9 | ||
|
|
07a5cc6544 | ||
|
|
01d4312251 | ||
|
|
2c29ab5542 | ||
|
|
c3c2a4269d | ||
|
|
a0c5d75f83 | ||
|
|
d69b73eaa8 | ||
|
|
4270180b8b | ||
|
|
2d5f087041 | ||
|
|
9fc0ec0bf4 | ||
|
|
3f8e258055 | ||
|
|
fa2eb24ba2 | ||
|
|
433baf5f3c | ||
|
|
70c1f0640d | ||
|
|
9b1db9709b | ||
|
|
edb50b66a0 | ||
|
|
0862c79b21 | ||
|
|
2d2625bf75 | ||
|
|
2fea28f194 | ||
|
|
42d9d6abc8 | ||
|
|
46e63da4d8 | ||
|
|
d7bd0be53e | ||
|
|
3f80e92f2c | ||
|
|
0ae6d1fecf | ||
|
|
d898abf63d | ||
|
|
ba4028b9dd | ||
|
|
fb64bb314c | ||
|
|
bc5f3abd3c | ||
|
|
1934bedde2 | ||
|
|
cea8ad4b85 | ||
|
|
129d7333be | ||
|
|
9647901ba0 | ||
|
|
c21e5f5e79 | ||
|
|
c5ff13abca | ||
|
|
202ccd4c56 | ||
|
|
9d4053419b | ||
|
|
785bd8ebcc | ||
|
|
a4c5b87b90 | ||
|
|
fef87b9219 | ||
|
|
4f591aa87a | ||
|
|
d6544933aa | ||
|
|
a01a9e5943 | ||
|
|
ed4edb93e7 | ||
|
|
8869f4ca4d | ||
|
|
b137dba5db | ||
|
|
ed2b985245 | ||
|
|
d7e38b378e | ||
|
|
453a16c978 | ||
|
|
ce7f166ba3 | ||
|
|
1ab96abb91 | ||
|
|
513d418771 | ||
|
|
0ad1426950 | ||
|
|
c1f0fe1da6 | ||
|
|
071e503856 | ||
|
|
a202e67349 | ||
|
|
29fb996b00 | ||
|
|
b728f8de64 | ||
|
|
e79e8b30e0 | ||
|
|
1bee2caf5c | ||
|
|
9361aeb8eb | ||
|
|
8cbae5d62a | ||
|
|
d68ec362dd | ||
|
|
ca1de3cd17 | ||
|
|
e9d58b5a90 | ||
|
|
ee89c485fc | ||
|
|
c1a7ded1e4 | ||
|
|
8cdc6b5d7c | ||
|
|
c4f0b4fb6d | ||
|
|
4e477a17b2 | ||
|
|
de32fbe75e | ||
|
|
4abebbe3b2 | ||
|
|
4269e613a3 | ||
|
|
2d00d9cbe6 | ||
|
|
d28e9a7b62 | ||
|
|
37d1aa4129 | ||
|
|
77051ddc78 | ||
|
|
a1d6833bac | ||
|
|
13507d422b | ||
|
|
de44a17e64 | ||
|
|
e9689a0a07 | ||
|
|
770456d0c8 | ||
|
|
1b32840424 | ||
|
|
defbb01aaa | ||
|
|
904090cbb6 | ||
|
|
4bde3366c1 | ||
|
|
cfac29b0ef | ||
|
|
45c2488e36 | ||
|
|
73f1340afb | ||
|
|
3326603265 | ||
|
|
b5c4866964 | ||
|
|
f6fb473cf9 | ||
|
|
a22b6168c6 | ||
|
|
2814f2e8cf | ||
|
|
20bcd4bd69 | ||
|
|
552497d71b | ||
|
|
8d0100f100 | ||
|
|
a105003a7a | ||
|
|
e03aaec030 | ||
|
|
0aad73f4a1 | ||
|
|
3565f179af | ||
|
|
b35b0c598d | ||
|
|
6b54d04bfc | ||
|
|
10120eb12f | ||
|
|
f85b5e99ed | ||
|
|
965a3d6eec | ||
|
|
917cf44def | ||
|
|
c884edd923 | ||
|
|
bdb216bf7c | ||
|
|
e019bd91fd | ||
|
|
ea916b6ae5 | ||
|
|
cc6d5374d5 | ||
|
|
ba0b06f268 | ||
|
|
1d3e84b712 | ||
|
|
cea6b20c09 | ||
|
|
feb993e751 | ||
|
|
4acc9b08a2 | ||
|
|
8dab92d158 | ||
|
|
b5deee823c | ||
|
|
7091ab5e75 | ||
|
|
0495d0f232 | ||
|
|
e6d9a0d1ad | ||
|
|
c8236d0dd2 | ||
|
|
6bdf005171 | ||
|
|
ce77e80414 | ||
|
|
de10f0dda6 | ||
|
|
37b9ba5bd7 | ||
|
|
035d655e47 | ||
|
|
06d8860d42 | ||
|
|
9d2509ab5b | ||
|
|
f7ab5cb7c4 | ||
|
|
8520bbd2c7 | ||
|
|
d1317f8fa6 | ||
|
|
1999427225 | ||
|
|
94ff966994 | ||
|
|
e99589a3eb | ||
|
|
50cde66067 | ||
|
|
e8db0e3abb | ||
|
|
46ae5700ee | ||
|
|
c8e715c33b | ||
|
|
ed74182cc2 | ||
|
|
f0097ff733 | ||
|
|
24de9f92e8 | ||
|
|
4ba19c9556 | ||
|
|
a5be17d941 | ||
|
|
23831e38e6 | ||
|
|
ad745aae63 | ||
|
|
cc94419a72 | ||
|
|
c7c7eff918 | ||
|
|
3b52b683e3 | ||
|
|
95448eea3d | ||
|
|
ba34d72183 | ||
|
|
8590457d41 | ||
|
|
9b820cc0b6 | ||
|
|
b4b4c996ba | ||
|
|
b1454276ed | ||
|
|
aa0f77043c | ||
|
|
2c1c5debca | ||
|
|
dac4dd560a | ||
|
|
7e136a792f | ||
|
|
8baae4c77f | ||
|
|
c295981c5a | ||
|
|
3ebd08e38c | ||
|
|
f38ff074c4 | ||
|
|
c124bbe4bf | ||
|
|
061fd25c61 | ||
|
|
923abb94d8 | ||
|
|
03cf1e7535 | ||
|
|
8b80a8803b | ||
|
|
47c697feca | ||
|
|
177680216c | ||
|
|
032a937b06 | ||
|
|
4f36a1fb77 | ||
|
|
14a1d3d251 | ||
|
|
239dd55146 | ||
|
|
c09297997e | ||
|
|
776693235c | ||
|
|
b5c09965a9 | ||
|
|
d01deec11d | ||
|
|
20dabf0b49 | ||
|
|
df4e22e3d0 | ||
|
|
7a730384ef | ||
|
|
8d2aa61f9b | ||
|
|
8395704dc6 | ||
|
|
a672860c40 | ||
|
|
b73aaa4899 | ||
|
|
78cf2ead38 | ||
|
|
4babb11e2f | ||
|
|
2b4b00b388 | ||
|
|
5e1113d884 | ||
|
|
45f1c96ff2 | ||
|
|
4703ec5164 | ||
|
|
9001a64ef9 | ||
|
|
186441e7f5 | ||
|
|
e5af1edcb9 | ||
|
|
913a001375 | ||
|
|
777ef6b663 | ||
|
|
f5164f3804 | ||
|
|
6075bf3fc2 | ||
|
|
e99cd8052c | ||
|
|
d25420a33b | ||
|
|
72b25cd3a8 | ||
|
|
df98d04d79 | ||
|
|
9a7442c2fd | ||
|
|
ef97134f50 | ||
|
|
c28ed42617 | ||
|
|
eb5fdac918 | ||
|
|
518bc555a6 | ||
|
|
21a6ed247b | ||
|
|
19505b664c | ||
|
|
32ab01cd32 | ||
|
|
b4f6a9336b | ||
|
|
7ea77d8da4 | ||
|
|
708d5831e4 | ||
|
|
193fb2a381 | ||
|
|
405a75f26b | ||
|
|
34942b5af3 | ||
|
|
d2fac78413 | ||
|
|
6bebde8279 | ||
|
|
481cebee7e | ||
|
|
96fdbac69a | ||
|
|
068093aae0 | ||
|
|
d8f352ae7c | ||
|
|
21bb2ea063 | ||
|
|
efae5d6a69 | ||
|
|
8989b5ea39 | ||
|
|
4bd7bafd7c | ||
|
|
19749effce | ||
|
|
d5ce8b1ea3 | ||
|
|
7541fa7cb7 | ||
|
|
5acbf9ef59 | ||
|
|
1082b13830 | ||
|
|
a0a88b4663 | ||
|
|
c7b905c0ec | ||
|
|
8b6bcef4b7 | ||
|
|
c00ebef329 | ||
|
|
0b0d286f5c | ||
|
|
42df203389 | ||
|
|
70358d90b4 | ||
|
|
57cc70c6af | ||
|
|
85f93ef135 | ||
|
|
40d3a900a0 | ||
|
|
7c8933f8c4 | ||
|
|
6a93cc49be | ||
|
|
8baa104453 | ||
|
|
97c9a4a02c | ||
|
|
13b52229be | ||
|
|
ab14a0bc61 | ||
|
|
3a6935f126 | ||
|
|
7994b80dcf | ||
|
|
9f914dcd10 | ||
|
|
daf1de550c | ||
|
|
a9ab3ea5b4 | ||
|
|
d63e3f1559 | ||
|
|
7388cc8a78 | ||
|
|
d1b2dd2831 | ||
|
|
dacd389799 | ||
|
|
361808923a | ||
|
|
3e198086e3 | ||
|
|
49c8292e48 | ||
|
|
ff057838ec | ||
|
|
0e9a44dd43 | ||
|
|
ac3ba5b4a6 | ||
|
|
2804ad2363 | ||
|
|
e3a261d29c | ||
|
|
4741afd2cf | ||
|
|
1b55a9956f | ||
|
|
679755de35 | ||
|
|
3553f467b2 | ||
|
|
542a5393ac | ||
|
|
94f25a429f | ||
|
|
ec17355056 | ||
|
|
5d4917a5d7 | ||
|
|
e122a75dd2 | ||
|
|
2b91af4493 | ||
|
|
232d990e6d | ||
|
|
92b1e8ab75 | ||
|
|
4505b8795a | ||
|
|
a7ad2a7e1a | ||
|
|
510ad223f0 | ||
|
|
b2ee24b549 | ||
|
|
b407f6a011 | ||
|
|
d68d1d9999 | ||
|
|
faab9f4aa4 | ||
|
|
39dd219fbc | ||
|
|
660d040531 | ||
|
|
2088dfb3b3 | ||
|
|
8858df2185 | ||
|
|
3e6016dc6e | ||
|
|
096db533a6 | ||
|
|
3648ef4687 | ||
|
|
f73e870bde | ||
|
|
0afa027ab4 | ||
|
|
e6aa9f9d4e | ||
|
|
6cfc61ac0e | ||
|
|
1c3f3c1842 | ||
|
|
55320a03f1 | ||
|
|
9b2037419f | ||
|
|
99a6976f53 | ||
|
|
8888ee3974 | ||
|
|
cb4b4d584c | ||
|
|
75367e714a | ||
|
|
167a841010 | ||
|
|
2736c3a9d1 | ||
|
|
7e888a6379 | ||
|
|
dcb4eedeb0 | ||
|
|
3e6eea25b3 | ||
|
|
2ce6e59d9b | ||
|
|
132a710a0a | ||
|
|
afcb794d59 | ||
|
|
6ef3b8c458 | ||
|
|
daf5cfe425 | ||
|
|
42e4e7c063 | ||
|
|
7496a463d4 | ||
|
|
091b40cb39 | ||
|
|
0f0812618a | ||
|
|
383142bcbe | ||
|
|
f728c58383 | ||
|
|
e2095bf70b | ||
|
|
a223157000 | ||
|
|
c7052b3d6f | ||
|
|
4a8a1af885 | ||
|
|
0345861b5f | ||
|
|
4422a3df23 | ||
|
|
a214d0ed4c | ||
|
|
81b5e66dd4 | ||
|
|
625376f0d3 | ||
|
|
8f925a2e84 | ||
|
|
cf11b32849 | ||
|
|
53a99cb9ee | ||
|
|
b5711b21dc | ||
|
|
585300cd33 | ||
|
|
7d877ab488 | ||
|
|
642970df95 | ||
|
|
75d1715442 | ||
|
|
adc7127055 | ||
|
|
ca64363899 | ||
|
|
0508a62c91 | ||
|
|
93ea98520b | ||
|
|
ebca91e0d0 | ||
|
|
c3b6e9da43 | ||
|
|
5256f1c967 | ||
|
|
c631e6c61c | ||
|
|
5fe6c2dcb4 | ||
|
|
453405f131 | ||
|
|
0ee87d7b46 | ||
|
|
b0e395e853 | ||
|
|
ad7855f995 | ||
|
|
d90de7f13c | ||
|
|
9f288fc16f | ||
|
|
c2265e29d2 | ||
|
|
1b3047c812 | ||
|
|
f5b97f1e8a | ||
|
|
d3aa8a118c | ||
|
|
820bf37445 | ||
|
|
2639fba582 | ||
|
|
03c5fdef43 | ||
|
|
203dff9165 | ||
|
|
e906a807f1 | ||
|
|
5a5f06ef2a | ||
|
|
434bc01f0b | ||
|
|
f6f0cb708e | ||
|
|
322d93ab0c | ||
|
|
92913c4c27 | ||
|
|
1f79fb608a | ||
|
|
3a2a4dee5c | ||
|
|
c1e68b2c61 | ||
|
|
a38d0a0fbd | ||
|
|
b32301592f | ||
|
|
97c95b7639 | ||
|
|
852c3badbb | ||
|
|
e5b7628802 | ||
|
|
da10ce7b05 | ||
|
|
b484638bb9 | ||
|
|
9a145ab15f | ||
|
|
e473d234fd | ||
|
|
7f5deb0f97 | ||
|
|
225b8953fd | ||
|
|
6b78bab99a | ||
|
|
8e7cce0634 | ||
|
|
b7f9bfda4a | ||
|
|
2ce925caba | ||
|
|
4a7b3d6d7b | ||
|
|
219af60102 | ||
|
|
14a5144de7 | ||
|
|
49d5c02d69 | ||
|
|
91c6389754 | ||
|
|
7a3ee349da | ||
|
|
a871da4fbe | ||
|
|
3ac74c86a1 | ||
|
|
2bf88fcef5 | ||
|
|
b6875b41f4 | ||
|
|
a9559f03b0 | ||
|
|
de13141b68 | ||
|
|
af09cb06f5 | ||
|
|
faa9e6441b | ||
|
|
079b8e0e16 | ||
|
|
4debd89d8e | ||
|
|
68e8c1ce04 | ||
|
|
bf3135eb41 | ||
|
|
e9001207ea | ||
|
|
95260371cb | ||
|
|
c6c55d0130 | ||
|
|
613d08d3e2 | ||
|
|
e92666d988 | ||
|
|
5fb3edf258 | ||
|
|
ecdd751ec3 | ||
|
|
ead2a1a606 | ||
|
|
8485dcdb03 | ||
|
|
d68ffc2da6 | ||
|
|
8be0567924 | ||
|
|
a99457ee29 | ||
|
|
0e2af13656 | ||
|
|
37a58a04f2 | ||
|
|
824ca7599c | ||
|
|
f8569a74cb | ||
|
|
236b3b1c2b | ||
|
|
d820df0dbe | ||
|
|
ebdf08a514 | ||
|
|
556b9ae574 | ||
|
|
24d73aeb71 | ||
|
|
debf39fe64 | ||
|
|
c423c59365 | ||
|
|
6b0fa20b8b | ||
|
|
0428b5b694 | ||
|
|
c2672bd630 | ||
|
|
eecf095077 | ||
|
|
5e10f1fe6a | ||
|
|
9d6db921bd | ||
|
|
db1bdfd62d | ||
|
|
0845abf640 | ||
|
|
69d30f2204 | ||
|
|
08ddef6a93 | ||
|
|
f61e2d04f1 | ||
|
|
0b73b13b9a | ||
|
|
ff9d6e4fd6 | ||
|
|
2bcb2a40e4 | ||
|
|
d9e2b1f0de | ||
|
|
a51757429e | ||
|
|
bc363a74f5 | ||
|
|
bafaa6acc6 | ||
|
|
f639aae2ae | ||
|
|
0d3e6a3dce | ||
|
|
32d3ea0a2d | ||
|
|
33fd33b03a | ||
|
|
8026bba723 | ||
|
|
a6680e38d5 | ||
|
|
6fa081e004 | ||
|
|
6753d39dd0 | ||
|
|
09c213738b | ||
|
|
a346461ea8 | ||
|
|
4f9bfb4387 | ||
|
|
7adac51152 | ||
|
|
601f77b5c8 | ||
|
|
2d072325ad | ||
|
|
2db0d7cfa1 | ||
|
|
ae388c48d0 | ||
|
|
362f2b5ec4 | ||
|
|
22e8202d27 | ||
|
|
1efbd7ead2 | ||
|
|
33f467453e | ||
|
|
bec8f6b86c | ||
|
|
5b081398b5 | ||
|
|
21e151cadd | ||
|
|
0392145512 | ||
|
|
6579645934 | ||
|
|
12a869c62a | ||
|
|
0c2ea268d1 | ||
|
|
06fd054eb3 | ||
|
|
2e06e4b6b8 | ||
|
|
c4479a0185 | ||
|
|
e46b06491c | ||
|
|
5e019ed9f8 | ||
|
|
29e0cfa98b | ||
|
|
9ae3fac08e | ||
|
|
1169437ec6 | ||
|
|
57677b7b55 | ||
|
|
ec1e8b6c86 | ||
|
|
e58acce9e4 | ||
|
|
30bc51ae9e | ||
|
|
2268365c3b | ||
|
|
42e4a068bb | ||
|
|
e7c46ac658 | ||
|
|
3fffcb47d9 | ||
|
|
55af046c92 | ||
|
|
a7f053776a | ||
|
|
c75c4603fc | ||
|
|
29b76fc4f5 | ||
|
|
ec00a1eb0d | ||
|
|
c3f49386ca | ||
|
|
60197c2d7e | ||
|
|
0127d7eb8b | ||
|
|
b4b9f9601b | ||
|
|
4604b45852 | ||
|
|
9fd93e8e57 | ||
|
|
4f3e4cd542 | ||
|
|
ccf6232039 | ||
|
|
575845772f | ||
|
|
c74c7ce1d4 | ||
|
|
4d1305efb2 | ||
|
|
9d29b33ff4 | ||
|
|
a0a3a095ac | ||
|
|
14eb16d5d4 | ||
|
|
613bb72eb7 | ||
|
|
ed9c288db8 | ||
|
|
a9bf0fa97e | ||
|
|
56ea1c7be7 | ||
|
|
d11325cf0f | ||
|
|
d89d3db126 | ||
|
|
80d15d142d | ||
|
|
f77c8990ce | ||
|
|
0b3690a59c | ||
|
|
2e38b51e1c | ||
|
|
426364b961 | ||
|
|
1867a6c47b | ||
|
|
3a59d9075f | ||
|
|
a73f5340a2 | ||
|
|
2bc843fdcd | ||
|
|
b9e97ab79d | ||
|
|
06df781bca | ||
|
|
c93fb5e443 | ||
|
|
ad560ffaf9 | ||
|
|
5ebcef2718 | ||
|
|
6b52fb5fb6 | ||
|
|
5780200ba3 | ||
|
|
7b2f17826a | ||
|
|
d3f2f4f6ac | ||
|
|
2dbe3d5b83 | ||
|
|
9e7cb046b3 | ||
|
|
9afcc355ff | ||
|
|
637cff3180 | ||
|
|
d33f1071ae | ||
|
|
013e9b9992 | ||
|
|
00da91b73f | ||
|
|
54ce7885bc | ||
|
|
7959b7fd1f | ||
|
|
76e744bb7b | ||
|
|
5a74495d7b | ||
|
|
904746054c | ||
|
|
759f91ce91 | ||
|
|
a4ec3cdf0b | ||
|
|
0f020127f3 | ||
|
|
9d62bed9f3 | ||
|
|
e9d0a1d015 | ||
|
|
17640302bf | ||
|
|
7613528e7e | ||
|
|
b41f93fcd6 | ||
|
|
c9c447e7a9 | ||
|
|
688e277e89 | ||
|
|
8737a1d76a | ||
|
|
f6fe5c96c9 | ||
|
|
149aef929d | ||
|
|
3b2558bb9e | ||
|
|
57098a77ec | ||
|
|
99a3fe0a13 | ||
|
|
441b3864f3 | ||
|
|
18bea3cfa5 | ||
|
|
783d1edaf1 | ||
|
|
977a1a08e9 | ||
|
|
90ef1d2d31 | ||
|
|
9345efbafb | ||
|
|
fa6eb3a64f | ||
|
|
587c788ce3 | ||
|
|
356f101078 | ||
|
|
e00b8a93bf | ||
|
|
dc72729a40 | ||
|
|
cf8799d116 | ||
|
|
c0be4a3f7d | ||
|
|
3b85457020 | ||
|
|
a50244dc16 | ||
|
|
5f98b4fdca | ||
|
|
4846564c78 | ||
|
|
86f04884de | ||
|
|
bf52620175 | ||
|
|
e14ed9c7dd | ||
|
|
74276ae878 | ||
|
|
1cc8a1d247 | ||
|
|
6a2edcea46 | ||
|
|
0768026938 | ||
|
|
19cc1d7854 | ||
|
|
450cd17d16 | ||
|
|
35473e653d | ||
|
|
aefaa17a84 | ||
|
|
88b0134e72 | ||
|
|
c0260b4167 | ||
|
|
b574996334 | ||
|
|
adcfb30d7d | ||
|
|
f251803f55 | ||
|
|
fb97335d9f | ||
|
|
05fb47bdb0 | ||
|
|
9b9545b92a | ||
|
|
26aed6611e | ||
|
|
ca4602d788 | ||
|
|
f60b450ee8 | ||
|
|
036263993e | ||
|
|
b48445cc7e | ||
|
|
fc312113d2 | ||
|
|
2e90ce9cc5 | ||
|
|
be92b57b54 | ||
|
|
6697ab6b63 | ||
|
|
2a51e1da04 | ||
|
|
867133e93d | ||
|
|
b6298915dd | ||
|
|
196a13b1cc | ||
|
|
76a564df2e | ||
|
|
17efc38e35 | ||
|
|
bf90fed2b7 | ||
|
|
e3aac6263f | ||
|
|
8d1996833b | ||
|
|
9982f1f21b | ||
|
|
73d080bcc8 | ||
|
|
c17ccc50ab | ||
|
|
75a9976cbc | ||
|
|
f3a356375e | ||
|
|
55cf1a37cb | ||
|
|
a7050458ae | ||
|
|
db752d141b | ||
|
|
cfda5eb148 | ||
|
|
2903ebe296 | ||
|
|
1af5065df7 | ||
|
|
e9df32a983 | ||
|
|
12d16ddc06 | ||
|
|
9200810f60 | ||
|
|
78c7459b3a | ||
|
|
0d97a31ce9 | ||
|
|
c56bfe064a | ||
|
|
ce9eafcd51 | ||
|
|
59caa98c43 | ||
|
|
81aaddb0e7 | ||
|
|
37d3188ce7 | ||
|
|
8f2abc6750 | ||
|
|
e970e5f246 | ||
|
|
ac95138c18 | ||
|
|
ab3e258f19 | ||
|
|
0f5893ed60 | ||
|
|
91902a031e | ||
|
|
e8fe09cf23 | ||
|
|
e3616c1ce1 | ||
|
|
35cac6b93b | ||
|
|
6d61f9d2e1 | ||
|
|
bfe382c315 | ||
|
|
b3f97cdce4 | ||
|
|
229b8f304a | ||
|
|
78718700f9 | ||
|
|
4f3be49728 | ||
|
|
c7ce056728 | ||
|
|
4197498e2d | ||
|
|
ccbbde549e | ||
|
|
c504cf02e4 | ||
|
|
95fe5004c8 | ||
|
|
cf4aedd97c | ||
|
|
ba0c9e8b29 | ||
|
|
b473adcf80 | ||
|
|
ac3484b82e | ||
|
|
c8b0f0bdf8 | ||
|
|
5a7e62e4a9 | ||
|
|
6ba442577f | ||
|
|
99e54aed80 | ||
|
|
016ff5b4aa | ||
|
|
f3e9c82432 | ||
|
|
579efc05fc | ||
|
|
aae4f3319f | ||
|
|
8844caf44d | ||
|
|
61c6b28237 | ||
|
|
64049f0f81 | ||
|
|
4b4f59a5d4 | ||
|
|
4c0744260d | ||
|
|
912e71be53 | ||
|
|
16ed00aede | ||
|
|
e6a7a9353c | ||
|
|
7ad86595e4 | ||
|
|
190bcf68f3 | ||
|
|
406f646949 | ||
|
|
17a939e38d | ||
|
|
f6818f9654 | ||
|
|
b5cdc33e7c | ||
|
|
fe918d41c2 | ||
|
|
a82188ac07 | ||
|
|
0bd373cd56 | ||
|
|
e145593c28 | ||
|
|
43fb7fe342 | ||
|
|
bee2408413 | ||
|
|
0d166081ad | ||
|
|
a37ce3ee9f | ||
|
|
ab3e810a95 | ||
|
|
469deeb141 | ||
|
|
8b47774aee | ||
|
|
774aa1570f | ||
|
|
bd8b907d13 | ||
|
|
1172056833 | ||
|
|
43d5831394 | ||
|
|
a259b6b8ab | ||
|
|
24b5406a1d | ||
|
|
8de7072720 | ||
|
|
d545246bbf | ||
|
|
cd23695116 | ||
|
|
5a3a058ed3 | ||
|
|
16abbad6b2 | ||
|
|
b8d3d8f5e4 | ||
|
|
1dcd7c5b14 | ||
|
|
ac7ea2b9fa | ||
|
|
a1ab82b188 | ||
|
|
afe70003f4 | ||
|
|
03ef438a72 | ||
|
|
8cb3c07151 | ||
|
|
b47c505438 | ||
|
|
2e3d5162f7 | ||
|
|
53162e23b6 | ||
|
|
164f16c85b | ||
|
|
8f5e60f787 | ||
|
|
1906a08f72 | ||
|
|
a35b3b4602 | ||
|
|
b7783b19d2 | ||
|
|
b2f9b3175b | ||
|
|
3289bfaa87 | ||
|
|
87e6edd554 | ||
|
|
2b53f267a7 | ||
|
|
6a6551f39b | ||
|
|
b9b7d5ac21 | ||
|
|
fe40f65703 | ||
|
|
07fe099b4e | ||
|
|
54214dd2c4 | ||
|
|
2ce9e540da | ||
|
|
4091d00057 | ||
|
|
1544acff05 | ||
|
|
7c1497a058 | ||
|
|
d05c50ea74 | ||
|
|
8963cbcb7c | ||
|
|
acb29e0dad | ||
|
|
f043b6e095 | ||
|
|
8c70c2a136 | ||
|
|
448c56647f | ||
|
|
1d600c640a | ||
|
|
c6f53d25b0 | ||
|
|
b9b9dabd75 | ||
|
|
e71da86a5c | ||
|
|
cdd30f4da5 | ||
|
|
ed5a9d5dc1 | ||
|
|
15b7126243 | ||
|
|
0ac621588e | ||
|
|
7339ebce60 | ||
|
|
b82b79fa11 | ||
|
|
acdf602505 | ||
|
|
6804ad62c6 | ||
|
|
8a8f2d4e5b | ||
|
|
9bb8ebaa10 | ||
|
|
26c6908d25 | ||
|
|
6682e56f71 | ||
|
|
3048a77a05 | ||
|
|
257f45c3c3 | ||
|
|
8ab0d25b4a | ||
|
|
a3f24d1bbf | ||
|
|
2e915780aa | ||
|
|
3d46f2a3af | ||
|
|
4f8029ad7c | ||
|
|
b67ed1988f | ||
|
|
55c9a81922 | ||
|
|
90b624a3e0 | ||
|
|
0115b0827b | ||
|
|
79432dce20 | ||
|
|
ff44f29616 | ||
|
|
a76c6b2307 | ||
|
|
984708dfd3 | ||
|
|
a8b5303207 | ||
|
|
35874b5fd2 | ||
|
|
a67d4c70d7 | ||
|
|
be92957328 | ||
|
|
48d0653331 | ||
|
|
612a6dd06c | ||
|
|
ef2089cafb | ||
|
|
5c64dba65a | ||
|
|
e87cd7077e | ||
|
|
cf6a9a8341 | ||
|
|
51e7f44433 | ||
|
|
23d294fef5 | ||
|
|
fb2173c396 | ||
|
|
363a2c6098 | ||
|
|
0853a47a3f | ||
|
|
fe5d0c9cdf | ||
|
|
95bd5b073a | ||
|
|
a553ac8716 | ||
|
|
f8cc86c227 | ||
|
|
23d23f6462 | ||
|
|
a2e0373d22 | ||
|
|
7ede8685ec | ||
|
|
092f32ba67 | ||
|
|
e24513d2ad | ||
|
|
ee8366adba | ||
|
|
5a59542679 | ||
|
|
0d55b6182a | ||
|
|
67c894cda9 | ||
|
|
0662de5323 | ||
|
|
244b91ee80 | ||
|
|
89b622eea8 | ||
|
|
e1279b01bc | ||
|
|
6857e26411 | ||
|
|
3c5bb4e8f3 | ||
|
|
e473123a6a | ||
|
|
0ccc70c843 | ||
|
|
8acc98563e | ||
|
|
7041f11987 | ||
|
|
bae6c24209 | ||
|
|
174424c520 | ||
|
|
cebf32c46c | ||
|
|
5ea9285c5b | ||
|
|
55c4346610 | ||
|
|
5edd9e75da | ||
|
|
45c09224f7 | ||
|
|
370d693f9d | ||
|
|
63a27fbc5f | ||
|
|
db84afd263 | ||
|
|
b8b3292161 | ||
|
|
9598a90627 | ||
|
|
7f5806b727 | ||
|
|
20ea2fde84 | ||
|
|
c124e7381c | ||
|
|
d370c2076d | ||
|
|
32c1135cd4 | ||
|
|
9203a33646 | ||
|
|
3665a82418 | ||
|
|
7d64698322 | ||
|
|
ea5b86774d | ||
|
|
0e1257cf17 | ||
|
|
b8d2c4e452 | ||
|
|
a25005a84c | ||
|
|
86b1d9aea5 | ||
|
|
f1c935ac4c | ||
|
|
a4d198005d | ||
|
|
9a3758bfc1 | ||
|
|
c3cbf4353d | ||
|
|
4bcd176944 | ||
|
|
44bbcbd14a | ||
|
|
96ccb1333b | ||
|
|
04b841c719 | ||
|
|
3bdc974ff5 | ||
|
|
adfa2645bf | ||
|
|
537c0960fe | ||
|
|
0a36629502 | ||
|
|
211ab16ddb | ||
|
|
5b8437172a | ||
|
|
62cb4da833 | ||
|
|
6647dd043d | ||
|
|
a520243563 | ||
|
|
93b318cfdf | ||
|
|
de09a80a35 | ||
|
|
d1394c6994 | ||
|
|
a12789c632 | ||
|
|
63c7df9f09 | ||
|
|
c4707fe887 | ||
|
|
04845a72bc | ||
|
|
a9db60a1d9 | ||
|
|
beae41b207 | ||
|
|
29a2d810a7 | ||
|
|
19ffb9c8df | ||
|
|
28fb26f792 | ||
|
|
07d1637342 | ||
|
|
088065e0a8 | ||
|
|
0913abe616 | ||
|
|
3d14097bf6 | ||
|
|
39b7075502 | ||
|
|
a0efb89aa0 | ||
|
|
6a89fe401a | ||
|
|
ca497e2cbd | ||
|
|
1544683bdc | ||
|
|
d237bb694b | ||
|
|
89a7007c6a | ||
|
|
281e45ce01 | ||
|
|
08d78fb6ff | ||
|
|
1587815fca | ||
|
|
1cdc647324 | ||
|
|
ee61f19253 | ||
|
|
86002b093f | ||
|
|
ff2665942e | ||
|
|
2709531f09 | ||
|
|
e9a89236a2 | ||
|
|
0265804003 | ||
|
|
1fef3e106c | ||
|
|
b36759b586 | ||
|
|
815cc0559e | ||
|
|
0750f04019 | ||
|
|
42fbe7572e | ||
|
|
0594ed5b46 | ||
|
|
a1112183de | ||
|
|
6173e1dd10 | ||
|
|
e2c29a3b28 | ||
|
|
fb80236214 | ||
|
|
bc42b3a78e | ||
|
|
1858904ce0 | ||
|
|
10758088ef | ||
|
|
4bfc75c2f9 | ||
|
|
70f9832e14 | ||
|
|
497c179245 | ||
|
|
20ab7d1739 | ||
|
|
937290db09 | ||
|
|
d7789661cd | ||
|
|
8697eebbc2 | ||
|
|
0d20f1c364 | ||
|
|
1b59b2c9bc | ||
|
|
8d92a0681a | ||
|
|
ab071163e5 | ||
|
|
f60e3d667a | ||
|
|
cafe4e38db | ||
|
|
c856d88691 | ||
|
|
b3385015e5 | ||
|
|
1e3aabf654 | ||
|
|
720abca826 | ||
|
|
3cbccd2ad3 | ||
|
|
cae3990eac | ||
|
|
1195f3db7b | ||
|
|
4e4e0e8e04 | ||
|
|
588fb26728 | ||
|
|
dc80884ab5 | ||
|
|
e465cea07b | ||
|
|
b98864d134 | ||
|
|
7fc70179ed | ||
|
|
eeee5012b7 | ||
|
|
7f3b51dd17 | ||
|
|
63666391d4 | ||
|
|
0cf2c8505e | ||
|
|
40434eadfd | ||
|
|
ef47dad566 | ||
|
|
97fc5224e7 | ||
|
|
894a1ae93a | ||
|
|
000c5edc4a | ||
|
|
63c2b98c5e | ||
|
|
34b4efe242 | ||
|
|
e4ac934dbf | ||
|
|
7bf2373fed | ||
|
|
2634d3b427 | ||
|
|
971b7cba65 | ||
|
|
3b40e003ab | ||
|
|
6450fd2692 | ||
|
|
1e11c1eac6 | ||
|
|
a4fd1a9f39 | ||
|
|
4e07297503 | ||
|
|
342da2430b | ||
|
|
be6b97b5d8 | ||
|
|
d18a55f429 | ||
|
|
e34261d3ef | ||
|
|
d3788a9c70 | ||
|
|
417646819c | ||
|
|
56bb7d721a | ||
|
|
e6a1ea9d4f | ||
|
|
96f36d16ae | ||
|
|
40020f4e1e | ||
|
|
b1e235535c | ||
|
|
49c48f2ec2 | ||
|
|
9e0b23f065 | ||
|
|
8a622a0e72 | ||
|
|
239e09ad07 | ||
|
|
ca1d899413 | ||
|
|
7a3e1ef19a | ||
|
|
28b47b601f | ||
|
|
91a274da2b | ||
|
|
68779a4dac | ||
|
|
49ad471b2d | ||
|
|
552f308e9e | ||
|
|
c4d4821327 | ||
|
|
a5ea709edc | ||
|
|
b0becb5a2d | ||
|
|
9dba2386bb | ||
|
|
43af5d9c1f | ||
|
|
e7ef45a606 | ||
|
|
f1bb09826d | ||
|
|
6fe6d0cb9a | ||
|
|
dd039677a0 | ||
|
|
63611408b1 | ||
|
|
881db86895 | ||
|
|
a01b14f301 | ||
|
|
c091a5c11a | ||
|
|
ed82c55475 | ||
|
|
570ccb7db1 | ||
|
|
b3b21e0af3 | ||
|
|
73a3e9d5bb | ||
|
|
b97f86deea | ||
|
|
eae9e7e685 | ||
|
|
e52c5ca1bb | ||
|
|
9a10501698 | ||
|
|
a252e3a02a | ||
|
|
6bae5a6031 | ||
|
|
fec01aeff1 | ||
|
|
1a3e254b6c | ||
|
|
ef9455c324 | ||
|
|
2bb29a50b7 | ||
|
|
d590fdddf6 | ||
|
|
3435d6656c | ||
|
|
7861992fe6 | ||
|
|
f5e6a3a274 | ||
|
|
fa373c7fdb | ||
|
|
8b7bf76260 | ||
|
|
da39624f1c | ||
|
|
6556dc1fdf | ||
|
|
a6a1de5006 | ||
|
|
e3571510ae | ||
|
|
4fd93fea51 | ||
|
|
e3273d7268 | ||
|
|
fd0602a9ac | ||
|
|
6f3f581d8a | ||
|
|
4867d9949d | ||
|
|
49ae7da5ce | ||
|
|
1b3144f978 | ||
|
|
063a80ecfb | ||
|
|
55d94c99b8 | ||
|
|
3a2be9a4ed | ||
|
|
9d53b738cc | ||
|
|
8761763d95 | ||
|
|
1991f9b362 | ||
|
|
72f342245d | ||
|
|
6ff138ca76 | ||
|
|
064f2e66e1 | ||
|
|
e5a48faf89 | ||
|
|
63e5faef11 | ||
|
|
e54b540bd4 | ||
|
|
311cffa901 | ||
|
|
eb0e89d3ea | ||
|
|
2f9dd8bad9 | ||
|
|
049c993ce0 | ||
|
|
fe46aa5cc2 | ||
|
|
4ec5e44b68 | ||
|
|
0a58e3e430 | ||
|
|
4c582b19eb | ||
|
|
6068188453 | ||
|
|
db0758690e | ||
|
|
d4efd003bc | ||
|
|
f740588780 | ||
|
|
f71953077d | ||
|
|
fae4c73ad3 | ||
|
|
73e4350320 | ||
|
|
6c59d97520 | ||
|
|
855c6a3c05 | ||
|
|
ff2998bee3 | ||
|
|
2129cc2906 | ||
|
|
9cce324316 | ||
|
|
f35fd97c76 | ||
|
|
35656fe0e8 | ||
|
|
35d7591def | ||
|
|
f9dc00a458 | ||
|
|
1fa852f118 | ||
|
|
7646ceeaaa | ||
|
|
a0588ef8b1 | ||
|
|
e2314c7852 | ||
|
|
a729f32c83 | ||
|
|
a5269b998b | ||
|
|
c317d3d9b1 | ||
|
|
bc0bdd02f4 | ||
|
|
ca73f0344c | ||
|
|
b956be0f44 | ||
|
|
f67275be13 | ||
|
|
a5d6c952a7 | ||
|
|
4cfc61da14 | ||
|
|
c403df0861 | ||
|
|
bb2e601e13 | ||
|
|
c5699a9b30 | ||
|
|
3c5624bc56 | ||
|
|
f7d5021ac5 | ||
|
|
4c220b1f95 | ||
|
|
356c50ec1e | ||
|
|
ec8ac117ed | ||
|
|
c61160fee3 | ||
|
|
1bd497effc | ||
|
|
4d1182bdb1 | ||
|
|
e256eaf014 | ||
|
|
dd93a90ab2 | ||
|
|
a75ddd0d0c | ||
|
|
c3d7a73c0b | ||
|
|
6e3523d594 | ||
|
|
4d1023ca30 | ||
|
|
f097b9c972 | ||
|
|
4414288b86 | ||
|
|
b3cbe3d338 | ||
|
|
1d22c78f9f | ||
|
|
01845812a1 | ||
|
|
dbc458a4d7 | ||
|
|
288f99d507 | ||
|
|
b2e3d90734 | ||
|
|
a043902d9a | ||
|
|
a9c3fdd63f | ||
|
|
bde17bb395 | ||
|
|
579d96534d | ||
|
|
0f119ed371 | ||
|
|
5b9e4c4780 | ||
|
|
3bad82db3b | ||
|
|
ec2f4fde93 | ||
|
|
223cd11835 | ||
|
|
5f810ff21c | ||
|
|
7f77e8a441 | ||
|
|
3ab01fa6a3 | ||
|
|
c19c5ca083 | ||
|
|
2d3d5d67ee | ||
|
|
dff49e9c23 | ||
|
|
97550b4fd9 | ||
|
|
16dab00bec | ||
|
|
a8a28c1512 | ||
|
|
8f948228d5 | ||
|
|
aa2f1b6b29 | ||
|
|
084efb1f14 | ||
|
|
25a22cc6f2 | ||
|
|
e5faeea2e5 | ||
|
|
f0b15ee053 | ||
|
|
e9a7ab789d | ||
|
|
bc0a97af04 | ||
|
|
f6c0bcf201 | ||
|
|
7aca08a954 | ||
|
|
c5b411c1ed | ||
|
|
f0ccbcb281 | ||
|
|
4f4b1f9145 | ||
|
|
350b1ec67e | ||
|
|
3f402d23ff | ||
|
|
9b47625115 | ||
|
|
fa7334c74f | ||
|
|
3e4f7b7bdf | ||
|
|
16e10d788a | ||
|
|
9f43b1988b | ||
|
|
0640ec7f5a | ||
|
|
e3f607dba0 | ||
|
|
6fc6ed8635 | ||
|
|
3bb0e78e1c | ||
|
|
6778640b52 | ||
|
|
df67c73d81 | ||
|
|
024f0a5027 | ||
|
|
8a0a29c64e | ||
|
|
647ddfa05e | ||
|
|
4ffca8954f | ||
|
|
ed799fb555 | ||
|
|
b7456c604d | ||
|
|
c22d252246 | ||
|
|
3e549a7d44 | ||
|
|
e0f6459674 | ||
|
|
a8999bbf38 | ||
|
|
210c7b8785 | ||
|
|
a38702a7d2 | ||
|
|
1fff83eeee | ||
|
|
24e74f785e | ||
|
|
8e7989087d | ||
|
|
963e85f047 | ||
|
|
14ed50a559 | ||
|
|
041d342faf | ||
|
|
85cf043e4a | ||
|
|
a3322f17d5 | ||
|
|
bbcf3fd7d2 | ||
|
|
56b80cb0ab | ||
|
|
0a19925e99 | ||
|
|
38a01a59fa | ||
|
|
0fd6fb1ff4 | ||
|
|
4545ddee6d | ||
|
|
13c34b0863 | ||
|
|
cc2f13710d | ||
|
|
23c52c1c86 | ||
|
|
537b63acb5 | ||
|
|
a6fe606ce6 | ||
|
|
857cef776d | ||
|
|
03c90b7c40 | ||
|
|
7da4f7fc35 | ||
|
|
764af8735c | ||
|
|
30dadcfb22 | ||
|
|
9fd91e6250 | ||
|
|
dab6d6dd6d | ||
|
|
827b240078 | ||
|
|
bb948904b6 | ||
|
|
c1367ebdca | ||
|
|
895055a3d1 | ||
|
|
827ba62671 | ||
|
|
5ac83e4b4c | ||
|
|
dba992f388 | ||
|
|
1c275695c4 | ||
|
|
cc66df18ac | ||
|
|
d303c33c2e | ||
|
|
980dd1b5a1 | ||
|
|
7669b97ac6 | ||
|
|
b612e84be8 | ||
|
|
9956b27767 | ||
|
|
07038ce88e | ||
|
|
8b3ca9564b | ||
|
|
f403a63a5c | ||
|
|
56388472cb | ||
|
|
0ae41be16b | ||
|
|
28dc67dc86 | ||
|
|
85d76dc171 | ||
|
|
80a83d48f3 | ||
|
|
b54bb62c94 | ||
|
|
cdebea71f3 | ||
|
|
0d8fcb41ee | ||
|
|
18647717df | ||
|
|
878ffa8998 | ||
|
|
a9935dcd45 | ||
|
|
4635daf6b3 | ||
|
|
b468d010a8 | ||
|
|
c3443bff99 | ||
|
|
2d1b48267d | ||
|
|
1c1fa25e6c | ||
|
|
c2c65207a3 | ||
|
|
2f987e315e | ||
|
|
70029752f5 | ||
|
|
b73b6b8e13 | ||
|
|
e57d450809 | ||
|
|
43bf854374 | ||
|
|
4118d2aa55 | ||
|
|
0bb46f3f8c | ||
|
|
6514bc6b39 | ||
|
|
951439486f | ||
|
|
b02c7cdc44 | ||
|
|
d2d8bea51e | ||
|
|
dbaeaa45cf | ||
|
|
1a72701903 | ||
|
|
265b07a8d9 | ||
|
|
d2e090317f | ||
|
|
db406e3c82 | ||
|
|
0328cb04d7 | ||
|
|
2d9b898271 | ||
|
|
b5cd52b9b3 | ||
|
|
f3d8f44c4e | ||
|
|
658f94f155 | ||
|
|
7d8ffa9ebd | ||
|
|
40185161b8 | ||
|
|
6fcc75032e | ||
|
|
89fd7759a3 | ||
|
|
d801167637 | ||
|
|
394134f774 | ||
|
|
3e24ae8812 | ||
|
|
bda383c9cd | ||
|
|
f6663b01bc | ||
|
|
224fd77641 | ||
|
|
eafa9cc107 | ||
|
|
e2ded2d6ce | ||
|
|
4a55f19761 | ||
|
|
9df1d08348 | ||
|
|
86cc86ac12 | ||
|
|
acdc52116e | ||
|
|
f2f19ccea3 | ||
|
|
52e77c6634 | ||
|
|
1803dcc873 | ||
|
|
c649028b01 | ||
|
|
fb4de46626 | ||
|
|
3d91d4fc6a | ||
|
|
c87b639a84 | ||
|
|
ef7afe5f2f | ||
|
|
429f6b03c4 | ||
|
|
c0eb3d10e2 | ||
|
|
6b7a8f96a6 | ||
|
|
5d266ace64 | ||
|
|
90fdc4328b | ||
|
|
7fea567eb2 | ||
|
|
1c44368f0a | ||
|
|
b05cb3f1a3 | ||
|
|
ad6094ca1d | ||
|
|
53e7cbbd5a | ||
|
|
732b760829 | ||
|
|
8117bcb56f | ||
|
|
f882586eb8 | ||
|
|
b182fa4bb8 | ||
|
|
7e54a226e2 | ||
|
|
f40f44b14e | ||
|
|
c813630aad | ||
|
|
bde159291c | ||
|
|
34b162d2c9 | ||
|
|
0fba76a565 | ||
|
|
5bedca7692 | ||
|
|
ee2d0ffc14 | ||
|
|
f0f3ce018d | ||
|
|
2612c9f12c | ||
|
|
1ff27e3363 | ||
|
|
e74b569115 | ||
|
|
a1412d1cdb | ||
|
|
eaf569eb6d | ||
|
|
87eb96453a | ||
|
|
dd717b2d93 | ||
|
|
cf5dd6289e | ||
|
|
30384bb4ef | ||
|
|
de8759eabd | ||
|
|
ebdc5cca7f | ||
|
|
4e3e1d0b87 | ||
|
|
d0f5464200 | ||
|
|
30723cf723 | ||
|
|
67a3c7d2ee | ||
|
|
592a6cc792 | ||
|
|
fa1263b6a4 | ||
|
|
515559d00c | ||
|
|
478d4246c4 | ||
|
|
c483a044b5 | ||
|
|
70fa4ab79c | ||
|
|
ceb1defc4e | ||
|
|
2c50cf8ac6 | ||
|
|
0acade08ca | ||
|
|
1e679dcb8d | ||
|
|
716740f918 | ||
|
|
4c65ec28d6 | ||
|
|
49a8dd7459 | ||
|
|
9bb8b39956 | ||
|
|
48ebbb7292 | ||
|
|
d4004805f5 | ||
|
|
2141247e08 | ||
|
|
389123cff3 | ||
|
|
ade5dff217 | ||
|
|
8045bec6a5 | ||
|
|
cbed027c0e | ||
|
|
87fa69385c | ||
|
|
1d2d5fe6ae | ||
|
|
6f81e84bd4 | ||
|
|
6cf698badd | ||
|
|
94ce376a76 | ||
|
|
b26eec5daf | ||
|
|
3370ae04cb | ||
|
|
c72fab15b4 | ||
|
|
592a6aef0b | ||
|
|
2b21f92347 | ||
|
|
077bcf1c82 | ||
|
|
3989e3df18 | ||
|
|
f3ed6659c3 | ||
|
|
60f736f20f | ||
|
|
b81bf1e138 | ||
|
|
e563450cb6 | ||
|
|
d6a853bd60 | ||
|
|
cc60ad1946 | ||
|
|
2d2833f2e4 | ||
|
|
fd3cd2c26a | ||
|
|
0625954bb7 | ||
|
|
7700970c93 | ||
|
|
c5205a89ee | ||
|
|
144f12525e | ||
|
|
eab6741afe | ||
|
|
e9e533b0cb | ||
|
|
e44704dc82 | ||
|
|
e9d5d42ea9 | ||
|
|
f54af8b973 | ||
|
|
ee456481cb | ||
|
|
d322a8033e | ||
|
|
812b26b668 | ||
|
|
a822692c26 | ||
|
|
7ae0b8ef06 | ||
|
|
6f0304f90e | ||
|
|
c6bb1f5d0d | ||
|
|
7ceedc1d47 | ||
|
|
3a600b4684 | ||
|
|
dc7d4e1134 | ||
|
|
595576b151 | ||
|
|
c4e129509b | ||
|
|
62024217b7 | ||
|
|
655eaa36ce | ||
|
|
686d6e9834 | ||
|
|
ef4c8f53c5 | ||
|
|
2d976827dd | ||
|
|
0741fd5b1d | ||
|
|
f64d3ad7de | ||
|
|
db6110e996 | ||
|
|
015921522d | ||
|
|
75fcedb030 | ||
|
|
c7a32bb83d | ||
|
|
f78f707935 | ||
|
|
3900366a6b | ||
|
|
17dd26e1ca | ||
|
|
9ab3683148 | ||
|
|
2cc8ecbb90 | ||
|
|
94e3c30054 | ||
|
|
669db1a293 | ||
|
|
cf8fcada6e | ||
|
|
287987b8fe | ||
|
|
a99da7b94e | ||
|
|
b07b1f0b51 | ||
|
|
dba2b052a6 | ||
|
|
0321f3b55f | ||
|
|
85d845c5ce | ||
|
|
95e9fe7693 | ||
|
|
8cd87236c9 | ||
|
|
f8b4c0ee1d | ||
|
|
d5515c9d0e | ||
|
|
65032389a4 | ||
|
|
5942f1a8f9 | ||
|
|
36a6d124aa | ||
|
|
0afb1d9e24 | ||
|
|
2de3c6d67b | ||
|
|
b498ad800c | ||
|
|
d48749f797 | ||
|
|
94e9101ce0 | ||
|
|
16a5c2f676 | ||
|
|
5ec46bcdfb | ||
|
|
a77b181e32 | ||
|
|
5a09eeea27 | ||
|
|
e07b6fdce7 | ||
|
|
23f20ceaf8 | ||
|
|
27eaa10873 | ||
|
|
2f9becbac6 | ||
|
|
6cc39e9bdb | ||
|
|
88f066f469 | ||
|
|
dda9d03e54 | ||
|
|
464b232321 | ||
|
|
c5a24eaf70 | ||
|
|
1748aabd69 | ||
|
|
3f5ecbe007 | ||
|
|
b14e034344 | ||
|
|
d0213e466c | ||
|
|
0b156f1d26 | ||
|
|
fe3a3ad8b5 | ||
|
|
c50a61d52a | ||
|
|
de4323f949 | ||
|
|
d1a02e6ddc | ||
|
|
5fd330b35e | ||
|
|
1234fe9c1c | ||
|
|
a44510d1df | ||
|
|
0d0e519e68 | ||
|
|
950cb9a717 | ||
|
|
91e2b427ef | ||
|
|
fc7e35e1cd | ||
|
|
24bf4c2cba | ||
|
|
1c01899799 | ||
|
|
678a19ce3b | ||
|
|
5711159e68 | ||
|
|
db9057f5a8 | ||
|
|
096ecc1d14 | ||
|
|
fc0498b3a8 | ||
|
|
4e4a3489ef | ||
|
|
d6640832f1 | ||
|
|
ef4f8ec713 | ||
|
|
c0481e7207 | ||
|
|
afa4fa6510 | ||
|
|
68caac1abd | ||
|
|
f014b29fc4 | ||
|
|
66262b14ad | ||
|
|
fe71a58f28 | ||
|
|
d3736ccb17 | ||
|
|
f045ce4386 | ||
|
|
1bfb01d5f5 | ||
|
|
83e4023dc0 | ||
|
|
2641cd6737 | ||
|
|
d325a3d247 | ||
|
|
e2cc3e1a33 | ||
|
|
647fd951ec | ||
|
|
7f0474e9de | ||
|
|
4a7f0849ab | ||
|
|
7059bead84 | ||
|
|
f7612c4a49 | ||
|
|
3e36428568 | ||
|
|
07c6752cf7 | ||
|
|
a6e4619378 | ||
|
|
07d336ddf0 | ||
|
|
20ffcb68b6 | ||
|
|
e1201fc6e2 | ||
|
|
1e2b087601 | ||
|
|
5dc410a999 | ||
|
|
c498af29aa | ||
|
|
ad03d9543b | ||
|
|
b73e42346e | ||
|
|
509ca11d76 | ||
|
|
2ca3c50463 | ||
|
|
2e3cb77702 | ||
|
|
06c761e9ac | ||
|
|
dbeaafbe99 | ||
|
|
03d9525eb6 | ||
|
|
bfd13d58e0 | ||
|
|
fdf8f35049 | ||
|
|
d8272b8812 | ||
|
|
b7037e3cf7 | ||
|
|
21afcd8767 | ||
|
|
25273485d9 | ||
|
|
abef04c637 | ||
|
|
d930a25d94 | ||
|
|
de1018d7a6 | ||
|
|
6d3e54369c | ||
|
|
197c49d740 | ||
|
|
0631bd9d89 | ||
|
|
815d3e0f61 | ||
|
|
f945dbc0fb | ||
|
|
c1c163d78c | ||
|
|
21ce0a4b28 | ||
|
|
00dc86917e | ||
|
|
218772c296 | ||
|
|
c1e13177a1 | ||
|
|
49a897c3b3 | ||
|
|
09c9e16cb1 | ||
|
|
dd162c3aa0 | ||
|
|
529cec5653 | ||
|
|
627ffb0f82 | ||
|
|
ab7a21e017 | ||
|
|
8280e04b23 | ||
|
|
7f30a2ae1b | ||
|
|
fab2c8699c | ||
|
|
98af5e4ddb | ||
|
|
895580c724 | ||
|
|
e4649b41e1 | ||
|
|
63d0bdc863 | ||
|
|
717b0a6514 | ||
|
|
53ac163a3e | ||
|
|
d4ae40ae99 | ||
|
|
02741dc64f | ||
|
|
d71cbae9df | ||
|
|
c068570192 | ||
|
|
4868bf13a8 | ||
|
|
591c35d51b | ||
|
|
d0d060d321 | ||
|
|
408faf8a66 | ||
|
|
90947a608f | ||
|
|
6a32981ba5 | ||
|
|
ea09825d10 | ||
|
|
ae8a377f26 | ||
|
|
7f60be9814 | ||
|
|
1991aa388b | ||
|
|
0ce2af7a0d | ||
|
|
0cd883e2a1 | ||
|
|
f40677c7a4 | ||
|
|
314e56b7b9 | ||
|
|
dfa95002aa | ||
|
|
800d706935 | ||
|
|
d8528ebbbe | ||
|
|
0b8f045d36 | ||
|
|
7bf8337854 | ||
|
|
79c652e115 | ||
|
|
55ece14f42 | ||
|
|
25d3f948d3 | ||
|
|
d59862eb5e | ||
|
|
6235e2140e | ||
|
|
8705562559 | ||
|
|
8c510a8d5b | ||
|
|
e248cbcc7d | ||
|
|
9c93cc7d6f | ||
|
|
cda3752838 | ||
|
|
19a0c8b462 | ||
|
|
34f5e923ef | ||
|
|
4870d9a31b | ||
|
|
6a7bd0e330 | ||
|
|
88b6168f1c | ||
|
|
2966be41ba | ||
|
|
607175f02a | ||
|
|
5276abb0fb | ||
|
|
c3b41d79a2 | ||
|
|
530b5ff58d | ||
|
|
5357957fe1 | ||
|
|
9313bfa155 | ||
|
|
9c6046455e | ||
|
|
df763bdb98 | ||
|
|
7b7b0fb5f2 | ||
|
|
f8a509ffb3 | ||
|
|
b9115b4429 | ||
|
|
7bf561d440 | ||
|
|
b105403dc7 | ||
|
|
a1e4b15bcc | ||
|
|
8fb72afac9 | ||
|
|
6e51ed3c53 | ||
|
|
4b99d7127f | ||
|
|
a878e09f0f | ||
|
|
8b82e9c40f | ||
|
|
a53ca58e56 | ||
|
|
380f7bc417 | ||
|
|
4fd1771f71 | ||
|
|
a5f23a0342 | ||
|
|
5a18e69425 | ||
|
|
864847a6fe | ||
|
|
900d5a4ce0 | ||
|
|
e0345732c0 | ||
|
|
0db3d03c3c | ||
|
|
1c00e3cf2c | ||
|
|
6692f5b2aa | ||
|
|
6912cfe98a | ||
|
|
46c6b0d29d | ||
|
|
3e75de9709 | ||
|
|
1cb7b9876f | ||
|
|
b4060a4789 | ||
|
|
2db26d304f | ||
|
|
6d32cf4a11 | ||
|
|
ff219da3eb | ||
|
|
bc4d628940 | ||
|
|
7e5342e9f0 | ||
|
|
510261cb05 | ||
|
|
0085ed894f | ||
|
|
5b953228b4 | ||
|
|
f2e55d57cc | ||
|
|
71b9b2ecf9 | ||
|
|
114208533a | ||
|
|
f33a01e8c8 | ||
|
|
d84650fbe5 | ||
|
|
2ab3fb5dd0 | ||
|
|
c53b23cff0 | ||
|
|
fd4cd3e8f1 | ||
|
|
98b158c783 | ||
|
|
fec0028e12 | ||
|
|
c623ec8a2d | ||
|
|
ada5c245a8 | ||
|
|
bdbe5d1080 | ||
|
|
46d1889344 | ||
|
|
e967db4a3c | ||
|
|
41d7b3244b | ||
|
|
4c822e8375 | ||
|
|
99574ebfc6 | ||
|
|
a6972714b7 | ||
|
|
8a90e32f1b | ||
|
|
6b0b984909 | ||
|
|
ffd175c705 | ||
|
|
12b48edada | ||
|
|
53cdf6ab41 | ||
|
|
401e45d63e | ||
|
|
9e14e8553f | ||
|
|
ff0e039599 | ||
|
|
9d16df5aa8 | ||
|
|
00ee82aba6 | ||
|
|
62db8cd9b0 | ||
|
|
d425358181 | ||
|
|
a27fc8d9d9 | ||
|
|
6510b15704 | ||
|
|
abd230dcdd | ||
|
|
a8f4f74a76 | ||
|
|
68f1c03a85 | ||
|
|
2d4861454c | ||
|
|
8f9ce275c8 | ||
|
|
af22bb1495 | ||
|
|
5ab2c85e97 | ||
|
|
f71cfdf8ef | ||
|
|
96151ec0f0 | ||
|
|
ad8a8913d9 | ||
|
|
fd2948f045 | ||
|
|
39931a5284 | ||
|
|
13903d7c46 | ||
|
|
7bd6c70318 | ||
|
|
d5d2f6a822 | ||
|
|
3cc20d7962 | ||
|
|
a5b84eb9fe | ||
|
|
8a7210cad1 | ||
|
|
84f8312b86 | ||
|
|
a0703fd9e1 | ||
|
|
3f2bdc096d | ||
|
|
37480fb617 | ||
|
|
77f97ad2ad | ||
|
|
5c8888d2ed | ||
|
|
b587d835e8 | ||
|
|
1a42d62d3a | ||
|
|
e3291b0cb1 | ||
|
|
40ee29fb99 | ||
|
|
793a6a6d7e | ||
|
|
7b89baceaa | ||
|
|
c33b93793f | ||
|
|
9558baa353 | ||
|
|
81e711517d | ||
|
|
6556cb0db9 | ||
|
|
4defd8b75c | ||
|
|
9dc5dca209 | ||
|
|
9067469f7c | ||
|
|
cf5db73117 | ||
|
|
03c4a979c8 | ||
|
|
5abd466b5d | ||
|
|
5491a51daa | ||
|
|
76dd769085 | ||
|
|
a4562c5720 | ||
|
|
f864698696 | ||
|
|
21329b8440 | ||
|
|
08b2138c7e | ||
|
|
8ff72f0728 | ||
|
|
acd1ea9909 | ||
|
|
1fde2ba468 | ||
|
|
09a0207e55 | ||
|
|
ede6b7db6a | ||
|
|
24875f34d0 | ||
|
|
41e9754338 | ||
|
|
d031943f2a | ||
|
|
d426588496 | ||
|
|
81ea6f0258 | ||
|
|
7c2b9478d5 | ||
|
|
33dfaf7da1 | ||
|
|
dc444b9ca0 | ||
|
|
40829b5242 | ||
|
|
ca6ed7f00f | ||
|
|
4b566c26a3 | ||
|
|
30b3f34d91 | ||
|
|
9647587447 | ||
|
|
3e64274f6b | ||
|
|
ce2071e1e6 | ||
|
|
0eb5f93e96 | ||
|
|
6e4710b717 | ||
|
|
9b23e33c36 | ||
|
|
d9db03d606 | ||
|
|
5f1c3fa208 | ||
|
|
0aa7f13c32 | ||
|
|
5f5babe7fe | ||
|
|
8fae2dcc26 | ||
|
|
d4250fc2c7 | ||
|
|
ad90a06a39 | ||
|
|
2f085ea5f5 | ||
|
|
2f979a8cde | ||
|
|
198b80f560 | ||
|
|
9e842f1628 | ||
|
|
7919b92d28 | ||
|
|
d9a8bab631 | ||
|
|
c07727eed0 | ||
|
|
653d808417 | ||
|
|
0552d49fce | ||
|
|
00cdcef36a | ||
|
|
512f5657f7 | ||
|
|
61eb361d26 | ||
|
|
f7aa4e108a | ||
|
|
f7300c7a27 | ||
|
|
058690aad7 | ||
|
|
4b892e9eb9 | ||
|
|
662246b9e2 | ||
|
|
1f3f82eedc | ||
|
|
58d9e9cd59 | ||
|
|
a827f0dd55 | ||
|
|
2f7d2fa3ad | ||
|
|
1b936f6ffb | ||
|
|
f0442960a2 | ||
|
|
e9fbd2ccfd | ||
|
|
35c41208f5 | ||
|
|
e4683a3074 | ||
|
|
3de003a8e7 | ||
|
|
5fd8eec42c | ||
|
|
c020992e4d | ||
|
|
609caad7a4 | ||
|
|
a55e738dfa | ||
|
|
f23ecfbc84 | ||
|
|
97d5698e0c | ||
|
|
989ded6052 | ||
|
|
36e1f7b4fb | ||
|
|
b80c4bae6b | ||
|
|
ea053467b5 | ||
|
|
40cfd0576f | ||
|
|
e8c0619226 | ||
|
|
4b8d6a3223 | ||
|
|
e30b538cd3 | ||
|
|
46d891b745 | ||
|
|
3d394c2f95 | ||
|
|
7e753c2596 | ||
|
|
08de6d487a | ||
|
|
87ea37248f | ||
|
|
f902136b6a | ||
|
|
75943a57b2 | ||
|
|
1ef8d61f36 | ||
|
|
756e4dd068 | ||
|
|
6065f5e52b | ||
|
|
2eee4c5176 | ||
|
|
78ca912434 | ||
|
|
c11a20cb4f | ||
|
|
fb1f51241d | ||
|
|
2171ebe2da | ||
|
|
db26700352 | ||
|
|
09dc1f9e1e | ||
|
|
49cf53644a | ||
|
|
44c5cdf453 | ||
|
|
a483243c52 | ||
|
|
b99346e6ca | ||
|
|
2dc818e4d2 | ||
|
|
c715569d1d | ||
|
|
f80474f590 | ||
|
|
19b21cafcd | ||
|
|
5780b4503e | ||
|
|
40888e9486 | ||
|
|
8bb22b2ad8 | ||
|
|
6a7d08ecc2 | ||
|
|
f13c4e6aca | ||
|
|
54662674e6 | ||
|
|
dbbf390983 | ||
|
|
7dc649ede6 | ||
|
|
f5c0bf3b60 | ||
|
|
152c7c452c | ||
|
|
bef436400d | ||
|
|
aff89c6f5c | ||
|
|
05a1d64fbb | ||
|
|
a8d8c0690d | ||
|
|
a7c17a329a | ||
|
|
3931dc795f | ||
|
|
a1c229784f | ||
|
|
965ea93a61 | ||
|
|
31ebbf348f | ||
|
|
599b7301c8 | ||
|
|
03cecb6f1c | ||
|
|
f34431a506 | ||
|
|
6ad66fb2d7 | ||
|
|
53107d3b71 | ||
|
|
0930d70134 | ||
|
|
d5e76471ae | ||
|
|
f1c1f56b12 | ||
|
|
fc8c28722f | ||
|
|
a76b88da08 | ||
|
|
c11912a8ec | ||
|
|
d015e09c92 | ||
|
|
224727c14d | ||
|
|
bd4d5d7c47 | ||
|
|
15520fe77d | ||
|
|
3b08efa2ad | ||
|
|
bb55430f75 | ||
|
|
88076a0050 | ||
|
|
25a4091fa8 | ||
|
|
4d06271a29 | ||
|
|
600cbee7d4 | ||
|
|
13c24a310d | ||
|
|
8c036ec671 | ||
|
|
bb8b6348ec | ||
|
|
c0488d9ecf | ||
|
|
e0568a19d5 | ||
|
|
98177f27ba | ||
|
|
aa8968ecf2 | ||
|
|
ed021431e9 | ||
|
|
31f9bb566b | ||
|
|
a7036475c3 | ||
|
|
e5da4c2b4d | ||
|
|
0b104a59fe | ||
|
|
68d3ea9c42 | ||
|
|
35bf340401 | ||
|
|
f0896ceba7 | ||
|
|
1291dd534b | ||
|
|
0b61ae11ec | ||
|
|
a02b4c9592 | ||
|
|
42a64a2379 | ||
|
|
4bd4d24802 | ||
|
|
f45ea0a1cf | ||
|
|
918d6dbf56 | ||
|
|
7428590457 | ||
|
|
559ad5c5e2 | ||
|
|
3e18b92ccc | ||
|
|
e81652c2fc | ||
|
|
6b4b708fa7 | ||
|
|
22e8b0e419 | ||
|
|
12fbf8cede | ||
|
|
2c0b82ec1a | ||
|
|
2a29c6c214 | ||
|
|
edeb8736f1 | ||
|
|
7afa4f8316 | ||
|
|
0aab36c5a7 | ||
|
|
cb8ffbac73 | ||
|
|
74b522af71 | ||
|
|
c2b9ddc5b8 |
116
.github/workflows/build-cmake-conan.yml
vendored
Normal file
116
.github/workflows/build-cmake-conan.yml
vendored
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
name: reLCS conan+cmake
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
release:
|
||||||
|
types: published
|
||||||
|
jobs:
|
||||||
|
build-cmake:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: 'windows-latest'
|
||||||
|
platform: 'gl3'
|
||||||
|
gl3_gfxlib: 'glfw'
|
||||||
|
audio: 'openal'
|
||||||
|
# - os: 'windows-latest'
|
||||||
|
# platform: 'gl3'
|
||||||
|
# gl3_gfxlib: 'sdl2'
|
||||||
|
# audio: 'openal'
|
||||||
|
- os: 'windows-latest'
|
||||||
|
platform: 'd3d9'
|
||||||
|
audio: 'openal'
|
||||||
|
# - os: 'windows-latest'
|
||||||
|
# platform: 'd3d9'
|
||||||
|
# audio: 'miles'
|
||||||
|
- os: 'ubuntu-latest'
|
||||||
|
platform: 'gl3'
|
||||||
|
gl3_gfxlib: 'glfw'
|
||||||
|
audio: 'openal'
|
||||||
|
# - os: 'ubuntu-latest'
|
||||||
|
# platform: 'gl3'
|
||||||
|
# gl3_gfxlib: 'sdl2'
|
||||||
|
# audio: 'openal'
|
||||||
|
- os: 'macos-latest'
|
||||||
|
platform: 'gl3'
|
||||||
|
gl3_gfxlib: 'glfw'
|
||||||
|
audio: 'openal'
|
||||||
|
# - os: 'macos-latest'
|
||||||
|
# platform: 'gl3'
|
||||||
|
# gl3_gfxlib: 'sdl2'
|
||||||
|
# audio: 'openal'
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
continue-on-error: ${{ matrix.platform == 'ps2' || matrix.gl3_gfxlib == 'sdl2' || matrix.audio == 'miles' }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: "Checkout Miles SDK Import Library project"
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
if: ${{ matrix.audio == 'miles' }}
|
||||||
|
with:
|
||||||
|
repository: 'withmorten/re3mss'
|
||||||
|
path: 're3mss'
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
- name: "Use XCode 11 as default (conan-center-index does not provide XCode 12 binaries at the moment)"
|
||||||
|
if: startsWith(matrix.os, 'macos')
|
||||||
|
run: |
|
||||||
|
sudo xcode-select --switch /Applications/Xcode_11.7.app
|
||||||
|
- name: "Setup conan"
|
||||||
|
run: |
|
||||||
|
python -m pip install conan
|
||||||
|
conan config init
|
||||||
|
conan config set log.print_run_commands=True
|
||||||
|
conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
|
||||||
|
conan remote add madebr_ps2dev https://api.bintray.com/conan/madebr/ps2dev
|
||||||
|
- name: "Add os=playstation2 + gcc.version=3.2 to .conan/settings.yml"
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import os, yaml
|
||||||
|
settings_path = os.path.expanduser("~/.conan/settings.yml")
|
||||||
|
yml = yaml.safe_load(open(settings_path))
|
||||||
|
yml["os"]["playstation2"] = None
|
||||||
|
yml["compiler"]["gcc"]["version"].append("3.2")
|
||||||
|
yml["compiler"]["gcc"]["version"].sort()
|
||||||
|
yaml.safe_dump(yml, open(settings_path, "w"))
|
||||||
|
- name: "Create host profile"
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if test "${{ matrix.platform }}" = "ps2"; then
|
||||||
|
cp vendor/librw/conan/playstation2 host_profile
|
||||||
|
else
|
||||||
|
cp ~/.conan/profiles/default host_profile
|
||||||
|
fi
|
||||||
|
- name: "Export Playstation 2 CMake toolchain conan recipe"
|
||||||
|
run: |
|
||||||
|
conan export vendor/librw/cmake/ps2toolchain ps2dev-cmaketoolchain/master@
|
||||||
|
- name: "Export librw conan recipe"
|
||||||
|
run: |
|
||||||
|
conan export vendor/librw librw/master@
|
||||||
|
- name: "Export Miles SDK conan recipe"
|
||||||
|
if: ${{ matrix.audio == 'miles' }}
|
||||||
|
run: |
|
||||||
|
conan export re3mss miles-sdk/master@
|
||||||
|
- name: "Download/build dependencies (conan install)"
|
||||||
|
run: |
|
||||||
|
conan install ${{ github.workspace }} reLCS/master@ -if build -o reLCS:audio=${{ matrix.audio }} -o librw:platform=${{ matrix.platform }} -o librw:gl3_gfxlib=${{ matrix.gl3_gfxlib || 'glfw' }} --build missing -pr:h ./host_profile -pr:b default -s reLCS:build_type=RelWithDebInfo -s librw:build_type=RelWithDebInfo
|
||||||
|
env:
|
||||||
|
CONAN_SYSREQUIRES_MODE: enabled
|
||||||
|
- name: "Build reLCS (conan build)"
|
||||||
|
run: |
|
||||||
|
conan build ${{ github.workspace }} -if build -bf build -pf package
|
||||||
|
- name: "Package reLCS (conan package)"
|
||||||
|
run: |
|
||||||
|
conan package ${{ github.workspace }} -if build -bf build -pf package
|
||||||
|
- name: "Create binary package (cpack)"
|
||||||
|
working-directory: ./build
|
||||||
|
run: |
|
||||||
|
cpack -C RelWithDebInfo
|
||||||
|
- name: "Archive binary package (github artifacts)"
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: "${{ matrix.os }}-${{ matrix.platform }}"
|
||||||
|
path: build/*.tar.xz
|
||||||
|
if-no-files-found: error
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: re3_msvc_amd64
|
name: reLCS premake amd64
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -47,19 +47,19 @@ jobs:
|
|||||||
./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir64=${{env.GLFW_BASE}}
|
./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir64=${{env.GLFW_BASE}}
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
msbuild -m build/re3.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
msbuild -m build/reLCS.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
||||||
- name: Pack artifacts
|
- name: Pack artifacts
|
||||||
run: |
|
run: |
|
||||||
7z a re3_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
|
7z a reLCS_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
|
||||||
- name: Upload artifact to actions
|
- name: Upload artifact to actions
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: re3_${{matrix.buildtype}}_${{matrix.platform}}
|
name: reLCS_${{matrix.buildtype}}_${{matrix.platform}}
|
||||||
path: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
|
path: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
|
||||||
# - name: Upload artifact to Bintray
|
# - name: Upload artifact to Bintray
|
||||||
# uses: hpcsc/upload-bintray-docker-action@v1
|
# uses: hpcsc/upload-bintray-docker-action@v1
|
||||||
# with:
|
# with:
|
||||||
# repository: re3
|
# repository: reLCS
|
||||||
# package: ${{matrix.buildtype}}_${{matrix.platform}}
|
# package: ${{matrix.buildtype}}_${{matrix.platform}}
|
||||||
# version: 1.0-$(echo ${GITHUB_SHA}
|
# version: 1.0-$(echo ${GITHUB_SHA}
|
||||||
# sourcePath: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
|
# sourcePath: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: re3_msvc_x86
|
name: reLCS premake x86
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -47,19 +47,19 @@ jobs:
|
|||||||
./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir32=${{env.GLFW_BASE}}
|
./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir32=${{env.GLFW_BASE}}
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
msbuild -m build/re3.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
msbuild -m build/reLCS.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
||||||
- name: Pack artifacts
|
- name: Pack artifacts
|
||||||
run: |
|
run: |
|
||||||
7z a re3_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
|
7z a reLCS_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
|
||||||
- name: Upload artifact to actions
|
- name: Upload artifact to actions
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: re3_${{matrix.buildtype}}_${{matrix.platform}}
|
name: reLCS_${{matrix.buildtype}}_${{matrix.platform}}
|
||||||
path: re3_${{matrix.buildtype}}_${{matrix.platform}}.zip
|
path: reLCS_${{matrix.buildtype}}_${{matrix.platform}}.zip
|
||||||
# - name: Upload artifact to Bintray
|
# - name: Upload artifact to Bintray
|
||||||
# uses: hpcsc/upload-bintray-docker-action@v1
|
# uses: hpcsc/upload-bintray-docker-action@v1
|
||||||
# with:
|
# with:
|
||||||
# repository: re3
|
# repository: reLCS
|
||||||
# package: ${{matrix.buildtype}}_${{matrix.platform}}
|
# package: ${{matrix.buildtype}}_${{matrix.platform}}
|
||||||
# version: 1.0-$(echo ${GITHUB_SHA}
|
# version: 1.0-$(echo ${GITHUB_SHA}
|
||||||
# sourcePath: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
|
# sourcePath: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -354,3 +354,7 @@ vendor/glfw-3.3.2.bin.WIN32/
|
|||||||
vendor/glfw-3.3.2.bin.WIN64/
|
vendor/glfw-3.3.2.bin.WIN64/
|
||||||
|
|
||||||
sdk/
|
sdk/
|
||||||
|
|
||||||
|
codewarrior/reVC_Data/
|
||||||
|
codewarrior/Release/
|
||||||
|
codewarrior/Debug/
|
||||||
44
.travis.yml
44
.travis.yml
@@ -1,44 +0,0 @@
|
|||||||
language: cpp
|
|
||||||
dist: focal
|
|
||||||
os: linux
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
- env: TARGET=release_linux-amd64-librw_gl3_glfw-oal
|
|
||||||
os: linux
|
|
||||||
- env: TARGET=debug_linux-amd64-librw_gl3_glfw-oal
|
|
||||||
os: linux
|
|
||||||
- env: TARGET=release_macosx-amd64-librw_gl3_glfw-oal PREMAKE5=premake-5.0.0-alpha15
|
|
||||||
compiler: clang
|
|
||||||
os: osx
|
|
||||||
osx_image: xcode12u
|
|
||||||
- env: TARGET=debug_macosx-amd64-librw_gl3_glfw-oal PREMAKE5=premake-5.0.0-alpha15
|
|
||||||
compiler: clang
|
|
||||||
os: osx
|
|
||||||
osx_image: xcode12u
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
update: true
|
|
||||||
packages:
|
|
||||||
- linux-libc-dev
|
|
||||||
- libopenal-dev
|
|
||||||
- libglew-dev
|
|
||||||
- libglfw3-dev
|
|
||||||
- libsndfile1-dev
|
|
||||||
- libmpg123-dev
|
|
||||||
- gcc-8-multilib
|
|
||||||
- g++-8-multilib
|
|
||||||
homebrew:
|
|
||||||
packages:
|
|
||||||
- libsndfile
|
|
||||||
- mpg123
|
|
||||||
- glew
|
|
||||||
- glfw
|
|
||||||
- openal-soft
|
|
||||||
script:
|
|
||||||
- mkdir -p "$TRAVIS_BUILD_DIR/build"
|
|
||||||
- cd "$TRAVIS_BUILD_DIR"
|
|
||||||
- if [ "$TRAVIS_OS_NAME" = linux ]; then ./premake5Linux --with-librw gmake2; fi
|
|
||||||
- if [ "$TRAVIS_OS_NAME" = osx ]; then curl -L -o "${PREMAKE5}.zip" "https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/${PREMAKE5}-src.zip" && unzip -q "${PREMAKE5}.zip" && cd "$PREMAKE5" && make -f Bootstrap.mak osx && cd .. && "./${PREMAKE5}/bin/release/premake5" --with-librw gmake2; fi
|
|
||||||
- cd build
|
|
||||||
- if [ "$TRAVIS_OS_NAME" = linux ]; then env CC=gcc-8 CXX=g++-8 make config=$TARGET -j4 verbose=1; fi
|
|
||||||
- if [ "$TRAVIS_OS_NAME" = osx ]; then make config=$TARGET -j4 verbose=1; fi
|
|
||||||
@@ -1,44 +1,82 @@
|
|||||||
cmake_minimum_required(VERSION 3.8)
|
cmake_minimum_required(VERSION 3.8)
|
||||||
|
|
||||||
project(re3 C CXX)
|
set(EXECUTABLE reLCS)
|
||||||
|
set(PROJECT RELCS)
|
||||||
|
|
||||||
|
project(${EXECUTABLE} C CXX)
|
||||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(RE3_AUDIOS "NULL" "OAL" "MSS")
|
set(${PROJECT}_AUDIOS "OAL" "MSS")
|
||||||
else()
|
else()
|
||||||
set(RE3_AUDIOS "NULL" "OAL")
|
set(${PROJECT}_AUDIOS "OAL")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(RE3_AUDIO "OAL" CACHE STRING "Audio")
|
set(${PROJECT}_AUDIO "OAL" CACHE STRING "Audio")
|
||||||
|
|
||||||
set_property(CACHE RE3_AUDIO PROPERTY STRINGS ${RE3_AUDIOS})
|
option(${PROJECT}_WITH_OPUS "Build ${EXECUTABLE} with opus support" OFF)
|
||||||
message(STATUS "RE3_AUDIO = ${RE3_AUDIO} (choices=${RE3_AUDIOS})")
|
option(${PROJECT}_WITH_LIBSNDFILE "Build ${EXECUTABLE} with libsndfile (instead of internal decoder)" OFF)
|
||||||
set("RE3_AUDIO_${RE3_AUDIO}" ON)
|
|
||||||
if(NOT RE3_AUDIO IN_LIST RE3_AUDIOS)
|
set_property(CACHE ${PROJECT}_AUDIO PROPERTY STRINGS ${${PROJECT}_AUDIOS})
|
||||||
message(FATAL_ERROR "Illegal RE3_AUDIO=${RE3_AUDIO}")
|
message(STATUS "${PROJECT}_AUDIO = ${${PROJECT}_AUDIO} (choices=${${PROJECT}_AUDIOS})")
|
||||||
|
set("${PROJECT}_AUDIO_${${PROJECT}_AUDIO}" ON)
|
||||||
|
if(NOT ${PROJECT}_AUDIO IN_LIST ${PROJECT}_AUDIOS)
|
||||||
|
message(FATAL_ERROR "Illegal ${PROJECT}_AUDIO=${${PROJECT}_AUDIO}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(RE3_INSTALL)
|
option(${PROJECT}_VENDORED_LIBRW "Use vendored librw" ON)
|
||||||
include(GNUInstallDirs)
|
if(${PROJECT}_VENDORED_LIBRW)
|
||||||
set(RE3_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/re3")
|
add_subdirectory(vendor/librw)
|
||||||
|
else()
|
||||||
|
find_package(librw REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory("vendor/librw")
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
if(RE3_INSTALL)
|
if(${PROJECT}_INSTALL)
|
||||||
include(CMakePackageConfigHelpers)
|
install(DIRECTORY gamefiles/ DESTINATION ".")
|
||||||
configure_package_config_file(re3-config.cmake.in re3-config.cmake
|
if(LIBRW_PLATFORM_NULL)
|
||||||
INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
set(platform "-null")
|
||||||
)
|
elseif(LIBRW_PLATFORM_PS2)
|
||||||
install(
|
set(platform "-ps2")
|
||||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/re3-config.cmake"
|
elseif(LIBRW_PLATFORM_GL3)
|
||||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
if(LIBRW_GL3_GFXLIB STREQUAL "GLFW")
|
||||||
)
|
set(platform "-gl3-glfw")
|
||||||
install(
|
else()
|
||||||
EXPORT re3-targets
|
set(platform "-gl3-sdl2")
|
||||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
endif()
|
||||||
)
|
elseif(LIBRW_PLATFORM_D3D9)
|
||||||
|
set(platform "-d3d9")
|
||||||
|
endif()
|
||||||
|
if(${PROJECT}_AUDIO_OAL)
|
||||||
|
set(audio "-oal")
|
||||||
|
elseif(${PROJECT}_AUDIO_MSS)
|
||||||
|
set(audio "-mss")
|
||||||
|
endif()
|
||||||
|
if(${PROJECT}_WITH_OPUS)
|
||||||
|
set(audio "${audio}-opus")
|
||||||
|
endif()
|
||||||
|
if(NOT LIBRW_PLATFORM_PS2)
|
||||||
|
if(WIN32)
|
||||||
|
set(os "-win")
|
||||||
|
elseif(APPLE)
|
||||||
|
set(os "-apple")
|
||||||
|
elseif(UNIX)
|
||||||
|
set(os "-linux")
|
||||||
|
else()
|
||||||
|
set(compiler "-UNK")
|
||||||
|
message(WARNING "Unknown os. Created cpack package will be wrong. (override using cpack -P)")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
include(CMakeCPack.cmake)
|
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${platform}${audio}${os}${compiler}")
|
||||||
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GTA III reversed")
|
||||||
|
set(CPACK_PACKAGE_VENDOR "GTAModding")
|
||||||
|
# FIXME: missing license (https://github.com/GTAmodding/re3/issues/794)
|
||||||
|
# set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/LICENSE")
|
||||||
|
# set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
|
||||||
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
|
||||||
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
|
||||||
|
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
|
||||||
|
set(CPACK_GENERATOR "TXZ")
|
||||||
|
include(CPack)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
39
README.md
39
README.md
@@ -1,24 +1,21 @@
|
|||||||
<img src="https://github.com/GTAmodding/re3/blob/master/logo.png?raw=true" alt="re3 logo" width="200">
|
# reLCS
|
||||||
|
[](https://actions-badge.atrox.dev/GTAmodding/re3/goto?ref=lcs)
|
||||||
[](https://actions-badge.atrox.dev/GTAmodding/re3/goto?ref=master)
|
|
||||||
<a href="https://discord.gg/aKYAwCx92H"><img src="https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat" /></a>
|
<a href="https://discord.gg/aKYAwCx92H"><img src="https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat" /></a>
|
||||||
|
|
||||||
## Intro
|
## Intro
|
||||||
|
|
||||||
The aim of this project is to reverse GTA III for PC by replacing
|
The aim of this project is to reverse GTA Liberty City Stories.
|
||||||
parts of the game [one by one](https://en.wikipedia.org/wiki/Ship_of_Theseus)
|
|
||||||
such that we have a working game at all times.
|
|
||||||
|
|
||||||
## How can I try it?
|
## How can I try it?
|
||||||
|
|
||||||
- re3 requires game assets to work, so you **must** own [a copy of GTA III](https://store.steampowered.com/app/12100/Grand_Theft_Auto_III/).
|
- reLCS requires game assets to work.
|
||||||
- Build re3 or download it from one of the above links (Debug or Release).
|
- Build reLCS or download it from one of the above links (Debug or Release).
|
||||||
- (Optional) If you want to use optional features like Russian language or menu map, copy the files in /gamefiles folder to your game root folder.
|
- (Optional) If you want to use optional features, copy the files in /gamefiles folder to your game root folder.
|
||||||
- Move re3.exe to GTA 3 directory and run it.
|
- Move reLCS.exe to GTA LCS directory and run it.
|
||||||
|
|
||||||
## Preparing the environment for building
|
## Preparing the environment for building
|
||||||
|
|
||||||
You may want to point GTA_III_RE_DIR environment variable to GTA3 root folder if you want executable to be moved there via post-build script.
|
You may want to point GTA_LCS_RE_DIR environment variable to GTA LCS root folder if you want executable to be moved there via post-build script.
|
||||||
|
|
||||||
- For Linux, proceed: [Building on Linux](https://github.com/GTAmodding/re3/wiki/Building-on-Linux)
|
- For Linux, proceed: [Building on Linux](https://github.com/GTAmodding/re3/wiki/Building-on-Linux)
|
||||||
- For FreeBSD, proceed: [Building on FreeBSD](https://github.com/GTAmodding/re3/wiki/Building-on-FreeBSD)
|
- For FreeBSD, proceed: [Building on FreeBSD](https://github.com/GTAmodding/re3/wiki/Building-on-FreeBSD)
|
||||||
@@ -29,28 +26,12 @@ You may want to point GTA_III_RE_DIR environment variable to GTA3 root folder if
|
|||||||
|
|
||||||
**If you use 64-bit D3D9**: We don't ship 64-bit Dx9 SDK. You need to download it from Microsoft if you don't have it(although it should come pre-installed after some Windows version)
|
**If you use 64-bit D3D9**: We don't ship 64-bit Dx9 SDK. You need to download it from Microsoft if you don't have it(although it should come pre-installed after some Windows version)
|
||||||
|
|
||||||
There are various settings at the very bottom of [config.h](https://github.com/GTAmodding/re3/tree/master/src/core/config.h), you may want to take a look there. i.e. FIX_BUGS define fixes the bugs we've come across.
|
There are various settings at the very bottom of [config.h](https://github.com/GTAmodding/re3/tree/lcs/src/core/config.h), you may want to take a look there. i.e. FIX_BUGS define fixes the bugs we've come across.
|
||||||
|
|
||||||
> :information_source: **If you choose OpenAL on Windows** You must read [Running OpenAL build on Windows](https://github.com/GTAmodding/re3/wiki/Running-OpenAL-build-on-Windows).
|
> :information_source: **If you choose OpenAL on Windows** You must read [Running OpenAL build on Windows](https://github.com/GTAmodding/re3/wiki/Running-OpenAL-build-on-Windows).
|
||||||
|
|
||||||
> :information_source: **Did you notice librw?** re3 uses completely homebrew RenderWare-replacement rendering engine; [librw](https://github.com/aap/librw/). librw comes as submodule of re3, but you also can use LIBRW enviorenment variable to specify path to your own librw.
|
> :information_source: **Did you notice librw?** reLCS uses completely homebrew RenderWare-replacement rendering engine; [librw](https://github.com/aap/librw/). librw comes as submodule of reLCS, but you also can use LIBRW enviorenment variable to specify path to your own librw.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
Please read the [Coding Style](https://github.com/GTAmodding/re3/blob/master/CODING_STYLE.md) Document
|
Please read the [Coding Style](https://github.com/GTAmodding/re3/blob/master/CODING_STYLE.md) Document
|
||||||
|
|
||||||
### Unreversed / incomplete classes (at least the ones we know)
|
|
||||||
The following classes have only unused or practically unused code left:
|
|
||||||
```
|
|
||||||
NameGrid.cpp - only on mobile (a player name grid, either a very early player name code ala GTA1 or a multiplayer leftover)
|
|
||||||
PedDebug.cpp - only on mobile (debug code)
|
|
||||||
HandlingMgr.cpp - debug functions from mobile
|
|
||||||
CFormationInfo - unused PedAI class that could be found on mobile
|
|
||||||
CVehicle::ProcessBikeWheel - early bike code (only on mobile)
|
|
||||||
CAutomobile::DebugCode - debug function from mobile
|
|
||||||
CBoat::DebugCode - debug function from mobile
|
|
||||||
CBoat::ModifyHandlingValue - debug function from mobile
|
|
||||||
CBoat::DisplayHandlingData - debug function from mobile
|
|
||||||
CStreaming::PrintRequestList - debug function from mobile
|
|
||||||
d3d8raster.c - only on PC (slight RW modification that we don't actually need)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
# - Find mpg123
|
|
||||||
# Find the native mpg123 includes and library
|
|
||||||
#
|
|
||||||
# MPG123_INCLUDE_DIR - where to find mpg123.h
|
|
||||||
# MPG123_LIBRARIES - List of libraries when using mpg123.
|
|
||||||
# MPG123_FOUND - True if mpg123 found.
|
|
||||||
|
|
||||||
IF(MPG123_INCLUDE_DIR AND MPG123_LIBRARIES)
|
|
||||||
# Already in cache, be silent
|
|
||||||
SET(MPG123_FIND_QUIETLY TRUE)
|
|
||||||
ENDIF(MPG123_INCLUDE_DIR AND MPG123_LIBRARIES)
|
|
||||||
|
|
||||||
FIND_PATH(MPG123_INCLUDE_DIR mpg123.h
|
|
||||||
PATHS "${MPG123_DIR}"
|
|
||||||
PATH_SUFFIXES include
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(MPG123_LIBRARIES NAMES mpg123 mpg123-0
|
|
||||||
PATHS "${MPG123_DIR}"
|
|
||||||
PATH_SUFFIXES lib
|
|
||||||
)
|
|
||||||
|
|
||||||
# MARK_AS_ADVANCED(MPG123_LIBRARIES MPG123_INCLUDE_DIR)
|
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set MPG123_FOUND to TRUE if
|
|
||||||
# all listed variables are TRUE
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPG123 DEFAULT_MSG MPG123_LIBRARIES MPG123_INCLUDE_DIR)
|
|
||||||
34
cmake/FindMilesSDK.cmake
Normal file
34
cmake/FindMilesSDK.cmake
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# - Find Miles SDK
|
||||||
|
# Find the Miles SDK header + import library
|
||||||
|
#
|
||||||
|
# MilesSDK_INCLUDE_DIR - Where to find mss.h
|
||||||
|
# MilesSDK_LIBRARIES - List of libraries when using MilesSDK.
|
||||||
|
# MilesSDK_FOUND - True if Miles SDK found.
|
||||||
|
# MilesSDK::MilesSDK - Imported library of Miles SDK
|
||||||
|
|
||||||
|
find_path(MilesSDK_INCLUDE_DIR mss.h
|
||||||
|
PATHS "${MilesSDK_DIR}"
|
||||||
|
PATH_SUFFIXES include
|
||||||
|
)
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_miles_sdk_libname mss64)
|
||||||
|
else()
|
||||||
|
set(_miles_sdk_libname mss32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_library(MilesSDK_LIBRARIES NAMES ${_miles_sdk_libname}
|
||||||
|
PATHS "${MilesSDK_DIR}"
|
||||||
|
PATH_SUFFIXES lib
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(MilesSDK DEFAULT_MSG MilesSDK_LIBRARIES MilesSDK_INCLUDE_DIR)
|
||||||
|
|
||||||
|
if(NOT TARGET MilesSDK::MilesSDK)
|
||||||
|
add_library(MilesSDK::MilesSDK UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(MilesSDK::MilesSDK PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${MilesSDK_LIBRARIES}
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${MilesSDK_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
@@ -4,9 +4,11 @@
|
|||||||
#
|
#
|
||||||
# Once done this will define
|
# Once done this will define
|
||||||
#
|
#
|
||||||
# SNDFILE_FOUND - system has libsndfile
|
# SNDFILE_FOUND - system has libsndfile
|
||||||
# SNDFILE_INCLUDE_DIRS - the libsndfile include directory
|
# SNDFILE_INCLUDE_DIRS - the libsndfile include directory
|
||||||
# SNDFILE_LIBRARIES - Link these to use libsndfile
|
# SNDFILE_LIBRARIES - Link these to use libsndfile
|
||||||
|
# SNDFILE_CFLAGS - Compile options to use libsndfile
|
||||||
|
# SndFile::SndFile - Imported library of libsndfile
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006 Wengo
|
# Copyright (C) 2006 Wengo
|
||||||
#
|
#
|
||||||
@@ -15,53 +17,51 @@
|
|||||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
#
|
#
|
||||||
|
|
||||||
if (SNDFILE_LIBRARIES AND SNDFILE_INCLUDE_DIRS)
|
find_package(PkgConfig QUIET)
|
||||||
# in cache already
|
if(PKG_CONFIG_FOUND)
|
||||||
set(SNDFILE_FOUND TRUE)
|
pkg_search_module(PKG_SNDFILE "sndfile")
|
||||||
else (SNDFILE_LIBRARIES AND SNDFILE_INCLUDE_DIRS)
|
endif()
|
||||||
|
|
||||||
find_path(SNDFILE_INCLUDE_DIR
|
find_path(SNDFILE_INCLUDE_DIR
|
||||||
NAMES
|
NAMES
|
||||||
sndfile.h
|
sndfile.h
|
||||||
|
HINTS
|
||||||
|
${PKG_SNDFILE_INCLUDE_DIRS}
|
||||||
PATHS
|
PATHS
|
||||||
/usr/include
|
/usr/include
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
/opt/local/include
|
/opt/local/include
|
||||||
/sw/include
|
/sw/include
|
||||||
)
|
)
|
||||||
|
|
||||||
find_library(SNDFILE_LIBRARY
|
find_library(SNDFILE_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
sndfile
|
sndfile
|
||||||
|
HINTS
|
||||||
|
${PKG_SNDFILE_LIBRARIES}
|
||||||
PATHS
|
PATHS
|
||||||
/usr/lib
|
/usr/lib
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
/opt/local/lib
|
/opt/local/lib
|
||||||
/sw/lib
|
/sw/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SNDFILE_INCLUDE_DIRS
|
set(SNDFILE_CFLAGS "${PKG_SNDFILE_CFLAGS_OTHER}" CACHE STRING "CFLAGS of libsndfile")
|
||||||
${SNDFILE_INCLUDE_DIR}
|
|
||||||
)
|
|
||||||
set(SNDFILE_LIBRARIES
|
|
||||||
${SNDFILE_LIBRARY}
|
|
||||||
)
|
|
||||||
|
|
||||||
if (SNDFILE_INCLUDE_DIRS AND SNDFILE_LIBRARIES)
|
set(SNDFILE_INCLUDE_DIRS "${SNDFILE_INCLUDE_DIR}")
|
||||||
|
set(SNDFILE_LIBRARIES "${SNDFILE_LIBRARY}")
|
||||||
|
|
||||||
|
if(SNDFILE_INCLUDE_DIRS AND SNDFILE_LIBRARIES)
|
||||||
set(SNDFILE_FOUND TRUE)
|
set(SNDFILE_FOUND TRUE)
|
||||||
endif (SNDFILE_INCLUDE_DIRS AND SNDFILE_LIBRARIES)
|
endif()
|
||||||
|
|
||||||
if (SNDFILE_FOUND)
|
include(FindPackageHandleStandardArgs)
|
||||||
if (NOT SndFile_FIND_QUIETLY)
|
find_package_handle_standard_args(SndFile DEFAULT_MSG SNDFILE_INCLUDE_DIRS SNDFILE_LIBRARIES)
|
||||||
message(STATUS "Found libsndfile: ${SNDFILE_LIBRARIES}")
|
|
||||||
endif (NOT SndFile_FIND_QUIETLY)
|
|
||||||
else (SNDFILE_FOUND)
|
|
||||||
if (SndFile_FIND_REQUIRED)
|
|
||||||
message(FATAL_ERROR "Could not find libsndfile")
|
|
||||||
endif (SndFile_FIND_REQUIRED)
|
|
||||||
endif (SNDFILE_FOUND)
|
|
||||||
|
|
||||||
# show the SNDFILE_INCLUDE_DIRS and SNDFILE_LIBRARIES variables only in the advanced view
|
if(NOT TARGET SndFile::SndFile)
|
||||||
mark_as_advanced(SNDFILE_INCLUDE_DIRS SNDFILE_LIBRARIES)
|
add_library(__SndFile INTERFACE)
|
||||||
|
target_compile_options(__SndFile INTERFACE ${SNDFILE_CFLAGS})
|
||||||
endif (SNDFILE_LIBRARIES AND SNDFILE_INCLUDE_DIRS)
|
target_include_directories(__SndFile INTERFACE ${SNDFILE_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(__SndFile INTERFACE ${SNDFILE_LIBRARIES})
|
||||||
|
add_library(SndFile::SndFile ALIAS __SndFile)
|
||||||
|
endif()
|
||||||
|
|||||||
38
cmake/Findmpg123.cmake
Normal file
38
cmake/Findmpg123.cmake
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# - Find mpg123
|
||||||
|
# Find the native mpg123 includes and library
|
||||||
|
#
|
||||||
|
# mpg123_INCLUDE_DIR - Where to find mpg123.h
|
||||||
|
# mpg123_LIBRARIES - List of libraries when using mpg123.
|
||||||
|
# mpg123_CFLAGS - Compile options to use mpg123
|
||||||
|
# mpg123_FOUND - True if mpg123 found.
|
||||||
|
# MPG123::libmpg123 - Imported library of libmpg123
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PKG_CONFIG_FOUND)
|
||||||
|
pkg_search_module(PKG_MPG123 mpg123)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(mpg123_INCLUDE_DIR mpg123.h
|
||||||
|
HINTS ${PKG_MPG123_INCLUDE_DIRS}
|
||||||
|
PATHS "${mpg123_DIR}"
|
||||||
|
PATH_SUFFIXES include
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(mpg123_LIBRARIES NAMES mpg123 mpg123-0
|
||||||
|
HINTS ${PKG_MPG123_LIBRARIES}
|
||||||
|
PATHS "${mpg123_DIR}"
|
||||||
|
PATH_SUFFIXES lib
|
||||||
|
)
|
||||||
|
|
||||||
|
set(mpg123_CFLAGS "${PKG_MPG123_CFLAGS_OTHER}" CACHE STRING "CFLAGS of mpg123")
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(mpg123 DEFAULT_MSG mpg123_LIBRARIES mpg123_INCLUDE_DIR)
|
||||||
|
|
||||||
|
if(NOT TARGET MPG123::libmpg123)
|
||||||
|
add_library(__libmpg123 INTERFACE)
|
||||||
|
target_compile_options(__libmpg123 INTERFACE ${mpg123_CFLAGS})
|
||||||
|
target_include_directories(__libmpg123 INTERFACE ${mpg123_INCLUDE_DIR})
|
||||||
|
target_link_libraries(__libmpg123 INTERFACE ${mpg123_LIBRARIES})
|
||||||
|
add_library(MPG123::libmpg123 ALIAS __libmpg123)
|
||||||
|
endif()
|
||||||
64
cmake/Findopusfile.cmake
Normal file
64
cmake/Findopusfile.cmake
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
# - Try to find opusfile
|
||||||
|
#
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# OPUSFILE_FOUND - system has opusfile
|
||||||
|
# OPUSFILE_INCLUDE_DIRS - the opusfile include directories
|
||||||
|
# OPUSFILE_LIBRARIES - Link these to use opusfile
|
||||||
|
# OPUSFILE_CFLAGS - Compile options to use opusfile
|
||||||
|
# opusfile::opusfile - Imported library of opusfile
|
||||||
|
#
|
||||||
|
|
||||||
|
# FIXME: opusfile does not ship an official opusfile cmake script,
|
||||||
|
# rename this file/variables/target when/if it has.
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PKG_CONFIG_FOUND)
|
||||||
|
pkg_search_module(PKG_OPUSFILE "opusfile")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(OPUSFILE_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
opusfile.h
|
||||||
|
PATH_SUFFIXES
|
||||||
|
opusfile
|
||||||
|
HINTS
|
||||||
|
${PKG_OPUSFILE_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include
|
||||||
|
/usr/local/include
|
||||||
|
/opt/local/include
|
||||||
|
/sw/include
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(OPUSFILE_LIBRARY
|
||||||
|
NAMES
|
||||||
|
opusfile
|
||||||
|
HINTS
|
||||||
|
${PKG_OPUSFILE_LIBRARIES}
|
||||||
|
PATHS
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/sw/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
set(OPUSFILE_CFLAGS "${PKG_OPUSFILE_CFLAGS_OTHER}" CACHE STRING "CFLAGS of opusfile")
|
||||||
|
|
||||||
|
set(OPUSFILE_INCLUDE_DIRS "${OPUSFILE_INCLUDE_DIR}")
|
||||||
|
set(OPUSFILE_LIBRARIES "${OPUSFILE_LIBRARY}")
|
||||||
|
|
||||||
|
if (OPUSFILE_INCLUDE_DIRS AND OPUSFILE_LIBRARIES)
|
||||||
|
set(OPUSFILE_FOUND TRUE)
|
||||||
|
endif (OPUSFILE_INCLUDE_DIRS AND OPUSFILE_LIBRARIES)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(opusfile DEFAULT_MSG OPUSFILE_INCLUDE_DIRS OPUSFILE_LIBRARIES)
|
||||||
|
|
||||||
|
if(NOT TARGET opusfile::opusfile)
|
||||||
|
add_library(__opusfile INTERFACE)
|
||||||
|
target_compile_options(__opusfile INTERFACE ${OPUSFILE_CFLAGS})
|
||||||
|
target_include_directories(__opusfile INTERFACE ${OPUSFILE_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(__opusfile INTERFACE ${OPUSFILE_LIBRARIES})
|
||||||
|
add_library(opusfile::opusfile ALIAS __opusfile)
|
||||||
|
endif()
|
||||||
0
codewarrior/Debug/gta-vc.txt
Normal file
0
codewarrior/Debug/gta-vc.txt
Normal file
0
codewarrior/Release/gta-vc.txt
Normal file
0
codewarrior/Release/gta-vc.txt
Normal file
BIN
codewarrior/reVC.mcp
Normal file
BIN
codewarrior/reVC.mcp
Normal file
Binary file not shown.
135
conanfile.py
Normal file
135
conanfile.py
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
from conans import ConanFile, CMake, tools
|
||||||
|
from conans.errors import ConanException, ConanInvalidConfiguration
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import textwrap
|
||||||
|
|
||||||
|
|
||||||
|
class ReLCSConan(ConanFile):
|
||||||
|
name = "reLCS"
|
||||||
|
version = "master"
|
||||||
|
license = "???" # FIXME: https://github.com/GTAmodding/re3/issues/794
|
||||||
|
settings = "os", "arch", "compiler", "build_type"
|
||||||
|
generators = "cmake", "cmake_find_package"
|
||||||
|
options = {
|
||||||
|
"audio": ["openal", "miles"],
|
||||||
|
"with_libsndfile": [True, False],
|
||||||
|
"with_opus": [True, False],
|
||||||
|
}
|
||||||
|
default_options = {
|
||||||
|
"audio": "openal",
|
||||||
|
"with_libsndfile": False,
|
||||||
|
"with_opus": False,
|
||||||
|
# "libsndfile:with_external_libs": False,
|
||||||
|
# "mpg123:flexible_resampling": False,
|
||||||
|
# "mpg123:network": False,
|
||||||
|
# "mpg123:icy": False,
|
||||||
|
# "mpg123:id3v2": False,
|
||||||
|
# "mpg123:ieeefloat": False,
|
||||||
|
# "mpg123:layer1": False,
|
||||||
|
# "mpg123:layer2": False,
|
||||||
|
# "mpg123:layer3": False,
|
||||||
|
# "mpg123:moreinfo": False,
|
||||||
|
# "sdl2:vulkan": False,
|
||||||
|
# "sdl2:opengl": True,
|
||||||
|
# "sdl2:sdl2main": True,
|
||||||
|
}
|
||||||
|
no_copy_source = True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _os_is_playstation2(self):
|
||||||
|
try:
|
||||||
|
return self.settings.os == "Playstation2"
|
||||||
|
except ConanException:
|
||||||
|
return False
|
||||||
|
|
||||||
|
def configure(self):
|
||||||
|
if self.options.audio != "openal":
|
||||||
|
self.options.with_libsndfile = False
|
||||||
|
|
||||||
|
def requirements(self):
|
||||||
|
self.requires("librw/{}".format(self.version))
|
||||||
|
self.requires("mpg123/1.26.4")
|
||||||
|
if self.options.audio == "openal":
|
||||||
|
self.requires("openal/1.21.0")
|
||||||
|
elif self.options.audio == "miles":
|
||||||
|
self.requires("miles-sdk/{}".format(self.version))
|
||||||
|
if self.options.with_libsndfile:
|
||||||
|
self.requires("libsndfile/1.0.30")
|
||||||
|
if self.options.with_opus:
|
||||||
|
self.requires("opusfile/0.12")
|
||||||
|
|
||||||
|
def export_sources(self):
|
||||||
|
for d in ("cmake", "src"):
|
||||||
|
shutil.copytree(src=d, dst=os.path.join(self.export_sources_folder, d))
|
||||||
|
self.copy("CMakeLists.txt")
|
||||||
|
|
||||||
|
def validate(self):
|
||||||
|
if self.options["librw"].platform == "gl3" and self.options["librw"].gl3_gfxlib != "glfw":
|
||||||
|
raise ConanInvalidConfiguration("Only `glfw` is supported as gl3_gfxlib.")
|
||||||
|
#if not self.options.with_opus:
|
||||||
|
# if not self.options["libsndfile"].with_external_libs:
|
||||||
|
# raise ConanInvalidConfiguration("reLCS with opus support requires a libsndfile built with external libs (=ogg/flac/opus/vorbis)")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _reLCS_audio(self):
|
||||||
|
return {
|
||||||
|
"miles": "MSS",
|
||||||
|
"openal": "OAL",
|
||||||
|
}[str(self.options.audio)]
|
||||||
|
|
||||||
|
def build(self):
|
||||||
|
if self.source_folder == self.build_folder:
|
||||||
|
raise Exception("cannot build with source_folder == build_folder")
|
||||||
|
try:
|
||||||
|
os.unlink(os.path.join(self.install_folder, "Findlibrw.cmake"))
|
||||||
|
tools.save("FindOpenAL.cmake",
|
||||||
|
textwrap.dedent(
|
||||||
|
"""
|
||||||
|
set(OPENAL_FOUND ON)
|
||||||
|
set(OPENAL_INCLUDE_DIR ${OpenAL_INCLUDE_DIRS})
|
||||||
|
set(OPENAL_LIBRARY ${OpenAL_LIBRARIES})
|
||||||
|
set(OPENAL_DEFINITIONS ${OpenAL_DEFINITIONS})
|
||||||
|
"""), append=True)
|
||||||
|
if self.options["librw"].platform == "gl3" and self.options["librw"].gl3_gfxlib == "glfw":
|
||||||
|
tools.save("Findglfw3.cmake",
|
||||||
|
textwrap.dedent(
|
||||||
|
"""
|
||||||
|
if(NOT TARGET glfw)
|
||||||
|
message(STATUS "Creating glfw TARGET")
|
||||||
|
add_library(glfw INTERFACE IMPORTED)
|
||||||
|
set_target_properties(glfw PROPERTIES
|
||||||
|
INTERFACE_LINK_LIBRARIES CONAN_PKG::glfw)
|
||||||
|
endif()
|
||||||
|
"""), append=True)
|
||||||
|
tools.save("CMakeLists.txt",
|
||||||
|
textwrap.dedent(
|
||||||
|
"""
|
||||||
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
project(cmake_wrapper)
|
||||||
|
|
||||||
|
include("{}/conanbuildinfo.cmake")
|
||||||
|
conan_basic_setup(TARGETS NO_OUTPUT_DIRS)
|
||||||
|
|
||||||
|
add_subdirectory("{}" reLCS)
|
||||||
|
""").format(self.install_folder.replace("\\", "/"),
|
||||||
|
self.source_folder.replace("\\", "/")))
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
cmake = CMake(self)
|
||||||
|
cmake.definitions["RELCS_AUDIO"] = self._reLCS_audio
|
||||||
|
cmake.definitions["RELCS_WITH_OPUS"] = self.options.with_opus
|
||||||
|
cmake.definitions["RELCS_INSTALL"] = True
|
||||||
|
cmake.definitions["RELCS_VENDORED_LIBRW"] = False
|
||||||
|
env = {}
|
||||||
|
if self._os_is_playstation2:
|
||||||
|
cmake.definitions["CMAKE_TOOLCHAIN_FILE"] = self.deps_user_info["ps2dev-cmaketoolchain"].cmake_toolchain_file
|
||||||
|
env["PS2SDK"] = self.deps_cpp_info["ps2dev-ps2sdk"].rootpath
|
||||||
|
|
||||||
|
with tools.environment_append(env):
|
||||||
|
cmake.configure(source_folder=self.build_folder)
|
||||||
|
cmake.build()
|
||||||
|
|
||||||
|
def package(self):
|
||||||
|
cmake = CMake(self)
|
||||||
|
cmake.install()
|
||||||
BIN
gamefiles/TEXT/ENGLISH.gxt
Normal file
BIN
gamefiles/TEXT/ENGLISH.gxt
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,363 +0,0 @@
|
|||||||
; Author: Alexander Roger
|
|
||||||
; Date: 21/12/2000
|
|
||||||
;
|
|
||||||
; Author: Andrzej Madajczyk
|
|
||||||
; Date: 26/02/2001
|
|
||||||
; 14/03/2001 - Alpha (opacity) support added;
|
|
||||||
; 10/05/2001 - Drag/Friction Decceleration changed to constants;
|
|
||||||
; 28/08/2001 - Initial Color Variation added;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
; Note! Last line of the file MUST BE ";the end\n", otherwise you'll get parsing error(s) of the file;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;Particle Systems Configuration Data:: Format
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;A: Particle Type Name (max 20 chars)
|
|
||||||
;
|
|
||||||
;B/C/D: Render Colouring (r,g,b) (0-255)
|
|
||||||
;
|
|
||||||
;CV: Initial Color Variation (for r,g,b only, in %) (0-100);
|
|
||||||
; (i.e. Color=(100,100,100) and CV=20, then v=random(-20,20), real_color=(100+v, 100+v, 100+v));
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;B2/C2/D2: Fade Destination Color (r,g,b) (0-255)
|
|
||||||
;
|
|
||||||
;FT: Color Fade Time for (B,C,D)->(B2,C2,D2), (0 for none);
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;E: Default Initial Radius (float)
|
|
||||||
;F: Expansion Rate (float)
|
|
||||||
;
|
|
||||||
;
|
|
||||||
; Color "Fade-to-Black" options:
|
|
||||||
;G: Initial Intensity (0-255)
|
|
||||||
;H: Fade Time (time between fade steps in frames)
|
|
||||||
;I: Fade Amount (-255 to 255) can get brighter or dimmer
|
|
||||||
;
|
|
||||||
; "Fade Alpha" options:
|
|
||||||
;GA: Initial Intensity (0-255)
|
|
||||||
;HA: Fade Time (time between fade steps in frames)
|
|
||||||
;IA: Fade Amount
|
|
||||||
;
|
|
||||||
; "Z Rotation" options:
|
|
||||||
;GZA: Initial Angle (0-1023)
|
|
||||||
;HZA: Change Time (time between steps in frames)
|
|
||||||
;IZA: Angle Change Amount
|
|
||||||
;
|
|
||||||
;GZR: Initial Z Radius
|
|
||||||
;HZR: Change Time (time between steps in frames)
|
|
||||||
;IZR: Z Radius Change Amount
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;J: Animation Speed (0=no animation)(time between steps msec)
|
|
||||||
;K: Start Animation Frame ( 0 -> )
|
|
||||||
;L: Final Animation Frame ( H -> )
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;M: Rotation Speed (0=None,i-deg/frame)
|
|
||||||
;N: Gravitational Acceleration (0=none, float)
|
|
||||||
;O: Drag/Friction Decceleration (int: 0=none, 50=0.50, 80=0.80, 90=0.90, 95=0.95, 96=0.96, 99=0.99)
|
|
||||||
;
|
|
||||||
;P: Default Life-Span of Particle (msec)
|
|
||||||
;
|
|
||||||
;Q: Position Random Error [position += (+/-)rand(a)]
|
|
||||||
;R: Velocity Random Error [velocity += (+/-)rand(b)]
|
|
||||||
;S: Expansion Rate Error [exp_rate += (+)rand(c)]
|
|
||||||
;T: Rotation Rate Error [rot_speed = (+/-)rand(d)]
|
|
||||||
;U: Life-Span Error Shape [shape distribution, e=0->all at default, e->Inf then shape->0] (max=255!!)
|
|
||||||
;V: Trail Length Multiplier [length *= (float) multiplier] (only used if trail flag active)
|
|
||||||
;
|
|
||||||
;CR:Particle Create Range (in meters: 0=no check); if particles are created enough far away from camera, they are deleted (not added to particle system);
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;Z: Flags! Guide: 1=ZCHECK_FIRST, 2=ZCHECK_STEP, 4=DRAW_OPAQUE, 8=SCREEN_TRAIL,
|
|
||||||
; 16=SPEED_TRAIL, 32=RAND_VERT_V, 64=CYCLE_ANIM, 128=DRAW_DARK, 256=VERT_TRAIL
|
|
||||||
; 1024=DRAWTOP2D, 2048=CLIPOUT2D
|
|
||||||
; 4096=ZCHECK_BUMP, 8192=ZCHECK_BUMP_FIRST
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;default:
|
|
||||||
;GUNFLASH 255 255 255 0 0.1 0.0 255 0 128 0 0 0 0 0.0 1.0 250 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;
|
|
||||||
;good idea for fire-smudge?
|
|
||||||
;GUNFLASH 255 255 255 0 1.0 0.0 255 0 32 100 0 3 0 0.0 1.0 400 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;
|
|
||||||
;current:
|
|
||||||
;GUNFLASH 255 255 255 0 1.0 0.0 255 0 32 100 0 3 0 0.0 1.0 400 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;SPARK_SMALL 255 255 128 0 0.005 0.0 255 0 0 0 0 0 0 0.0 1.0 500 0.0 0.05 0.0 0 0 0.5 40
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
; A B C D CV B2 C2 D2 FT E F G H I GA HA IA GZA HZA IZA GZR HZR IZR J K L M N O P Q R S T U V CR Z
|
|
||||||
;
|
|
||||||
SPARK 255 128 64 0 0 0 0 0 0.005 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.001 1 300 0.0 0.07 0.0 0 0 1.0 20.0 48
|
|
||||||
SPARK_SMALL 255 255 128 0 0 0 0 0 0.005 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.001 1 500 0.0 0.05 0.0 0 0 0.6 20.0 40
|
|
||||||
;
|
|
||||||
WHEEL_DIRT 8 24 8 0 0 0 0 0 0.05 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.002 1 1000 0.15 0.015 0.0 0 0 1.0 30.0 4
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;WHEEL_WATER 24 24 24 0 0 0 0 0 0.05 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.002 1 1000 0.15 0.015 0.0 0 0 1.0 20.0 0
|
|
||||||
WHEEL_WATER 24 24 32 0 0 0 0 0 0.05 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.004 1 1000 0.15 0.015 0.0 0 0 1.0 20.0 1
|
|
||||||
;
|
|
||||||
;
|
|
||||||
BLOOD 128 128 128 0 0 0 0 0 0.02 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.03 1 2000 0.3 0.05 0.0 0 0 1.0 50.0 5
|
|
||||||
BLOOD_SMALL 255 32 32 0 0 0 0 0 0.007 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.005 1 2000 0.05 0.05 0.0 0 0 1.0 50.0 53
|
|
||||||
;BLOOD_SPLAT 128 128 128 0 0 0 0 0 0.1 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 200 0.3 0.0 0.0 0 0 1.0 400.0 36
|
|
||||||
BLOOD_SPURT 255 32 32 0 0 0 0 0 0.008 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.005 1 2000 0.0 0.01 0.0 0 0 2.0 50.0 52
|
|
||||||
DEBRIS 64 64 64 0 0 0 0 0 0.5 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 95 1000 0.2 0.0 0.0 0 0 1.0 50.0 4
|
|
||||||
DEBRIS2 64 64 64 0 0 0 0 0 0.04 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 5 0.01 99 1000 0.03 0.04 0.0 0 0 1.0 50.0 38
|
|
||||||
WATER 64 64 128 0 0 0 0 0 0.01 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 2000 0.0 0.0 0.0 0 0 1.0 100.0 0
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;FLAME 255 74 30 0 0 0 0 0 0.2 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 0.0 1 100 0.05 0.0 0.0 0 0 1.0 400.0 0
|
|
||||||
;FLAME 255 74 30 0 0 255 0 400 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.005 1 2000 0.02 0.01 0.01 0 0 1.0 200.0 0
|
|
||||||
FLAME 255 74 30 0 0 0 0 0 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.005 1 2000 0.02 0.01 0.01 0 0 1.0 200.0 0
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;FIREBALL 255 74 30 0 0 0 0 0 0.1 0.04 255 1 8 255 0 0 0 0 0 0.0 0 0.0 32 0 7 0 0.0 96 1000 0.1 0.0 0.0 0 0 1.0 400.0 0
|
|
||||||
;
|
|
||||||
;FIREBALL 255 74 30 0 0 0 0 0 0.1 0.05 255 0 6 255 0 0 0 0 0 0.0 0 0.0 1 0 7 0 -0.002 96 2000 0.1 0.02 0.02 3 0 1.0 200.0 0
|
|
||||||
FIREBALL 255 74 30 0 0 0 0 0 0.1 0.02 255 0 6 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.003 96 2000 0.1 0.03 0.014 2.5 0 1.0 200.0 0
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
GUNFLASH 170 170 170 0 0 0 0 0 0.1 0.0 255 1 50 255 0 0 0 0 0 0.0 0 0.0 51 0 3 0 0.0 1 250 0.0 0.0 0.0 0 0 1.0 35.0 0
|
|
||||||
GUNFLASH_NOANIM 128 128 128 0 0 0 0 0 0.1 0.0 255 1 128 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 25 0.0 0.0 0.0 0 0 1.0 35.0 0
|
|
||||||
;
|
|
||||||
GUNSMOKE 64 64 64 0 0 0 0 0 0.15 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 2 0 7 0 -0.002 95 1000 0.0 0.0 0.0 0 0 1.0 60.0 0
|
|
||||||
GUNSMOKE2 255 255 255 0 0 0 0 0 0.05 0.02 255 0 0 255 0 8 0 0 0 0.0 0 0.0 0 0 3 4 -0.001 80 1400 0.05 0.05 0.01 3 0 1.0 60.0 4
|
|
||||||
;
|
|
||||||
;
|
|
||||||
SMOKE 32 32 32 0 0 0 0 0 0.15 0.015 255 5 25 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.01 95 1000 0.05 0.05 0.01 3 0 1.0 150.0 0
|
|
||||||
;SMOKE_SLOWMOTION 32 32 32 0 0 0 0 0 0.15 0.015 255 5 15 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.003 95 1000 0.05 0.05 0.01 3 0 1.0 400.0 0
|
|
||||||
SMOKE_SLOWMOTION 32 32 32 0 0 0 0 0 0.15 0.015 128 5 11 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.003 95 3000 0.05 0.05 0.01 3 0 1.0 150.0 0
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;GARAGEPAINT_SPRAY 32 32 32 0 0 0 0 0 0.15 0.015 255 0 5 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 -0.001 95 2000 0.05 0.05 0.01 3 0 1.0 400.0 0
|
|
||||||
GARAGEPAINT_SPRAY 32 32 32 0 0 0 0 0 0.15 0.015 255 0 5 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 -0.0005 95 4000 0.05 0.05 0.01 3 0 1.0 100.0 0
|
|
||||||
SHARD 255 255 255 0 0 0 0 0 0.03 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 96 300 0.0 0.0 0.0 0 0 1.0 100.0 0
|
|
||||||
SPLASH 64 64 128 0 0 0 0 0 0.1 0.007 255 1 10 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 100.0 0
|
|
||||||
;BLOOD_SPLASH 24 64 0 0 0 0 0 0 0.1 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 96 300 0.0 0.0 0.0 0 0 1.0 100.0 0
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;CARFLAME 255 74 30 0 0 0 0 0 0.5 0.04 255 2 20 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 0.0 1 1000 0.4 0.0 0.0 0 0 1.0 400.0 64
|
|
||||||
;CARFLAME 255 74 30 0 0 0 0 0 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.001 1 2000 0.4 0.01 0.01 0 0 1.0 400.0 64
|
|
||||||
;CARFLAME 255 74 30 0 0 0 0 0 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.001 1 2000 0.4 0.01 0.01 0 0 1.0 400.0 64
|
|
||||||
;
|
|
||||||
CARFLAME 255 74 30 0 0 0 0 0 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.005 1 2000 0.02 0.01 0.01 0 0 1.0 100.0 0
|
|
||||||
;
|
|
||||||
;
|
|
||||||
STEAM 64 64 64 0 0 0 0 0 0.5 0.05 255 1 16 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 85.0 0
|
|
||||||
;
|
|
||||||
;default:
|
|
||||||
;STEAM2 255 255 255 0 0 0 0 0 0.5 0.05 255 0 0 128 2 8 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 400.0 4
|
|
||||||
STEAM2 255 255 255 0 0 0 0 0 0.5 0.015 255 0 0 192 0 1 0 0 10 0.5 1 0.02 32 0 4 0 -0.002 95 8000 0.01 0.03 0.0 0 0 1.0 85.0 4
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;STEAM_NY 255 255 255 0 0 0 0 0 0.5 0.05 255 0 0 128 2 8 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 400.0 4
|
|
||||||
STEAM_NY 255 255 255 0 0 0 0 0 0.5 0.05 255 0 0 96 2 8 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 1400 0.01 0.03 0.0 0 0 1.0 85.0 4
|
|
||||||
STEAM_NY_SLOWMOTION 255 255 255 0 0 0 0 0 0.5 0.05 255 0 0 96 2 8 0 0 0 0.0 0 0.0 32 0 4 0 -0.0015 95 1400 0.01 0.03 0.0 0 0 1.0 85.0 4
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;ENGINE_STEAM 210 210 210 0 0 0 0 0 0.5 0.05 255 0 0 192 2 16 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 250.0 4
|
|
||||||
ENGINE_STEAM 210 210 210 0 0 0 0 0 0.5 0.05 255 0 0 192 0 10 0 0 0 0.0 0 0.0 32 0 4 1 -0.005 95 4000 0.03 0.03 0.02 0 0 1.0 85.0 4
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;RAINDROP 32 32 32 0 0 0 0 0 0.6 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.025 1 1000 0.0 0.0 0.0 0 0 1.0 15.0 1
|
|
||||||
RAINDROP 64 64 64 0 0 0 0 0 0.4 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 3 0 0.05 1 1000 0.0 0.0 0.0 0 0 1.0 15.0 1
|
|
||||||
RAINDROP_SMALL 16 16 16 0 0 0 0 0 0.3 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.05 1 1000 0.0 0.0 0.0 0 0 1.0 15.0 1
|
|
||||||
RAIN_SPLASH 32 32 32 0 0 0 0 0 0.08 0.0 255 0 5 255 0 0 0 0 0 0.0 0 0.0 1 0 4 0 0.0 1 500 0.0 0.0 0.0 0 0 1.0 15.0 0
|
|
||||||
RAIN_SPLASH_BIGGROW 128 128 128 0 0 0 0 0 0.5 0.06 255 0 2 255 0 0 0 0 0 0.0 0 0.0 2 1 4 0 0.0 1 5500 0.0 0.0 0.0 0 0 1.0 15.0 0
|
|
||||||
RAIN_SPLASHUP 48 48 48 0 0 0 0 0 0.1 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 1 0 0.0 1 50 0.0 0.0 0.0 0 0 1.0 15.0 0
|
|
||||||
;
|
|
||||||
WATERSPRAY 64 64 64 0 0 0 0 0 0.2 0.0 255 0 25 255 0 0 0 0 0 0.0 0 0.0 3 0 2 0 0.002 1 800 0.05 0.0 0.01 0 0 1.0 20.0 0
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;EXPLOSION_MEDIUM 80 80 80 0 0 0 0 0 0.6 0.04 255 5 8 255 0 0 0 0 0 0.0 0 0.0 8 0 11 0 0.0 96 15000 0.2 0.0 0.0 3 0 1.0 400.0 0
|
|
||||||
;EXPLOSION_LARGE 80 80 80 0 0 0 0 0 1.1 0.04 255 5 8 255 0 0 0 0 0 0.0 0 0.0 8 0 11 0 0.0 96 15000 0.8 0.0 0.0 3 0 1.0 400.0 0
|
|
||||||
;EXPLOSION_MEDIUM 80 80 80 0 0 0 0 0 0.6 0.04 255 1 4 255 0 0 0 0 0 0.0 0 0.0 1 0 11 0 0.0 96 7000 0.2 0.0 0.0 0 0 1.0 400.0 0
|
|
||||||
;EXPLOSION_LARGE 80 80 80 0 0 0 0 0 1.1 0.04 255 1 4 255 0 0 0 0 0 0.0 0 0.0 1 0 11 0 0.0 96 7000 0.8 0.0 0.0 0 0 1.0 400.0 0
|
|
||||||
;
|
|
||||||
;EXPLOSION_MEDIUM 80 80 80 0 0 0 0 0 0.6 0.04 255 0 3 255 0 0 0 0 0 0.0 0 0.0 1 0 11 0 -0.001 96 6000 0.2 0.0 0.0 0 0 1.0 400.0 0
|
|
||||||
;EXPLOSION_LARGE 80 80 80 0 0 0 0 0 1.1 0.04 255 0 3 255 0 0 0 0 0 0.0 0 0.0 1 0 11 0 -0.001 96 6000 0.8 0.0 0.0 0 0 1.0 400.0 0
|
|
||||||
EXPLOSION_MEDIUM 80 80 80 0 0 0 0 0 0.6 0.04 255 0 3 255 0 0 0 0 0 0.0 0 0.0 2 0 5 0 -0.001 96 6000 0.2 0.0 0.0 0 0 1.0 200.0 0
|
|
||||||
EXPLOSION_LARGE 80 80 80 0 0 0 0 0 1.1 0.04 255 0 3 255 0 0 0 0 0 0.0 0 0.0 2 0 5 0 -0.001 96 6000 0.8 0.0 0.0 0 0 1.0 200.0 0
|
|
||||||
EXPLOSION_MFAST 80 80 80 0 0 0 0 0 0.6 0.04 255 0 6 255 0 0 0 0 0 0.0 0 0.0 2 0 5 0 -0.001 96 3500 0.2 0.0 0.0 0 0 1.0 200.0 0
|
|
||||||
EXPLOSION_LFAST 80 80 80 0 0 0 0 0 1.1 0.04 255 0 6 255 0 0 0 0 0 0.0 0 0.0 2 0 5 0 -0.001 96 3500 0.8 0.0 0.0 0 0 1.0 200.0 0
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;BOAT_SPLASH 32 64 32 0 0 0 0 0 0.2 0.2 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 1 2000 0.0 0.0 0.0 0 0 1.0 200.0 0
|
|
||||||
;BOAT_THRUSTJET 24 32 24 0 0 0 0 0 0.5 0.1 255 0 0 255 0 0 0 0 0 0.0 0 0.0 250 0 4 0 0.01 50 1000 0.0 0.0 0.0 0 4 1.0 200.0 8
|
|
||||||
;BOAT_SPLASH 16 32 32 0 0 0 0 0 0.2 0.2 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 1 2000 0.0 0.0 0.0 0 0 1.0 200.0 0
|
|
||||||
;BOAT_THRUSTJET 8 24 24 0 0 0 0 0 0.5 0.1 255 0 0 255 0 0 0 0 0 0.0 0 0.0 250 0 4 0 0.01 50 1000 0.0 0.0 0.0 0 4 1.0 200.0 8
|
|
||||||
;CAR_SPLASH 64 64 64 0 0 0 0 0 2.0 0.25 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.02 1 2000 0.0 0.0 0.0 0 0 1.0 250.0 0
|
|
||||||
;CAR_SPLASH 64 64 64 0 0 0 0 0 2.0 0.25 255 0 0 200 0 8 0 0 0 0.0 0 0.0 0 0 0 0 0.04 1 2000 0.0 0.0 0.0 0 0 1.0 150.0 4
|
|
||||||
;CAR_SPLASH 64 64 64 0 0 0 0 0 2.0 0.35 255 0 0 200 0 8 0 0 0 0.0 0 0.0 0 0 0 0 0.05 1 2000 0.0 0.0 0.0 0 0 1.0 150.0 4
|
|
||||||
;CAR_SPLASH 64 64 64 0 0 0 0 0 1.0 0.25 255 0 0 180 0 5 0 0 0 0.0 0 0.0 2 1 3 0 0.05 1 1000 0.0 0.0 0.0 0 0 1.0 150.0 12
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;CAR_SPLASH 64 64 64 0 0 0 0 0 1.0 0.15 255 0 0 180 0 2 0 0 0 0.0 0 0.0 2 0 3 0 0.02 1 2000 0.0 0.0 0.0 0 0 1.0 150.0 12
|
|
||||||
;CAR_SPLASH 48 48 64 0 0 0 0 0 1.0 0.15 96 0 0 255 0 0 0 0 0 0.0 0 0.0 6 0 2 0 0.01 1 2000 0.5 0.04 0.0 0 0 2.0 150.0 288
|
|
||||||
;CAR_SPLASH 48 48 64 0 0 0 0 0 1.0 0.05 96 0 0 255 0 0 0 0 0 0.0 0 0.0 0 1 2 0 0.01 1 2000 0.5 0.04 0.0 0 0 2.0 150.0 288
|
|
||||||
; A B C D CV B2 C2 D2 FT E F G H I GA HA IA GZA HZA IZA GZR HZR IZR J K L M N O P Q R S T U V CR Z
|
|
||||||
CAR_SPLASH 48 48 60 0 0 0 0 0 1.0 0.00 128 1 4 128 0 0 0 0 0 0.0 0 0.0 0 0 2 0 0.01 1 2000 0.5 0.04 0.0 0 0 1.4 150.0 272
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;BOAT_SPLASH 70 70 70 0 0 0 0 0 0.2 0.2 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 1 1000 0.0 0.0 0.0 0 0 1.0 150.0 0
|
|
||||||
BOAT_SPLASH 64 64 64 0 0 0 0 0 0.2 0.2 255 0 2 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 1 1000 0.0 0.0 0.0 0 0 1.0 150.0 0
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;BOAT_THRUSTJET 90 90 90 0 0 0 0 0 1.8 0.1 255 0 0 120 0 1 0 0 0 0.0 0 0.0 0 1 4 0 0.01 50 1600 0.8 0.4 0.02 0 4 1.0 150.0 4
|
|
||||||
BOAT_THRUSTJET 90 90 90 0 0 0 0 0 1.4 0.06 255 0 0 96 0 1 0 0 0 0.0 0 0.0 0 1 4 0 0.01 50 1600 0.8 0.4 0.02 0 4 1.0 150.0 4
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;BOAT_WAKE 255 255 255 0 0 0 0 0 2.0 0.2 255 0 0 128 0 1 0 0 0 0.0 0 0.0 0 0 0 0 0.03 50 1600 0.8 0.4 0.02 0 4 1.0 150.0 4
|
|
||||||
BOAT_WAKE 255 255 255 0 0 0 0 0 1.5 0.45 255 0 0 192 0 2 0 0 0 0.0 0 0.0 0 0 0 0 0.0 50 1600 0.8 0.4 0.02 0 4 1.0 150.0 4
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
; A B C D CV B2 C2 D2 FT E F G H I GA HA IA GZA HZA IZA GZR HZR IZR J K L M N O P Q R S T U V CR Z
|
|
||||||
WATER_HYDRANT 64 64 64 0 0 0 0 0 0.8 0.01 255 1 16 255 1 16 0 0 0 0.0 0 0.0 0 0 2 0 0.007 99 500 0.02 0.08 0.0 0 4 1.0 85.0 16
|
|
||||||
WATER_CANNON 64 64 128 0 0 0 0 0 0.03 0.03 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 85.0 0
|
|
||||||
EXTINGUISH_STEAM 32 32 32 0 0 0 0 0 0.1 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 85.0 0
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;PED_SPLASH 32 32 64 0 0 0 0 0 0.1 0.05 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 85.0 0
|
|
||||||
PED_SPLASH 48 48 60 0 0 0 0 0 0.1 0.06 96 0 0 255 0 0 0 0 0 0.0 0 0.0 0 1 2 0 0.01 1 2000 0.5 0.04 0.0 0 0 1.4 50.0 256
|
|
||||||
;
|
|
||||||
;
|
|
||||||
PEDFOOT_DUST 170 166 150 0 0 0 0 0 0.01 0.015 255 0 0 63 0 4 0 0 0 0.0 0 0.0 0 0 0 0 -0.0005 1 1000 0.0 0.0 0.0 0 0 1.0 6.0 4
|
|
||||||
;
|
|
||||||
HELI_DUST 17 15 9 0 0 0 0 0 0.2 0.1 255 1 8 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.001 1 1000 0.2 0.05 0.0 0 0 1.0 85.0 0
|
|
||||||
HELI_ATTACK 255 255 128 0 0 0 0 0 0.01 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 500 0.0 0.0 0.0 0 0 0.5 85.0 10
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;ENGINE_SMOKE 16 16 16 0 0 0 0 0 0.5 0.04 255 0 0 63 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 150.0 4
|
|
||||||
;ENGINE_SMOKE2 8 8 8 0 0 0 0 0 1.0 0.2 128 2 4 63 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.001 1 1000 0.0 0.0 0.0 0 3 1.0 150.0 4
|
|
||||||
ENGINE_SMOKE 16 16 16 0 0 0 0 0 0.5 0.04 255 0 0 52 0 2 10 0 80 0.0 0 0.0 0 0 5 2 -0.009 95 2000 0.11 0.03 0.01 1 0 1.0 85.0 4
|
|
||||||
ENGINE_SMOKE2 9 9 9 80 0 0 0 0 1.0 0.06 128 0 1 140 0 5 10 0 80 0.0 0 0.0 0 0 0 2 0.002 1 1300 0.0 0.01 0.0 3 3 1.0 85.0 4
|
|
||||||
;
|
|
||||||
;
|
|
||||||
CARFLAME_SMOKE 32 32 32 0 0 0 0 0 0.05 0.01 255 0 0 64 0 2 0 0 0 0.0 0 0.0 0 0 0 0 -0.008 95 2000 0.01 0.03 0.01 0 0 1.0 85.0 4
|
|
||||||
FIREBALL_SMOKE 32 32 32 0 0 0 0 0 0.05 0.03 255 0 0 128 0 2 0 0 0 0.0 0 0.0 0 0 0 0 -0.004 95 2000 0.01 0.03 0.01 0 0 1.0 85.0 4
|
|
||||||
;
|
|
||||||
PAINT_SMOKE 255 0 0 0 0 0 0 0 0.1 0.01 255 1 8 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 95 3000 0.0 0.005 0.0 0 0 1.0 85.0 0
|
|
||||||
TREE_LEAVES 64 64 64 0 0 0 0 0 0.2 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 85.0 0
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;CARCOLLISION_DUST 224 224 224 0 0 0 0 0 0.15 0.04 255 0 0 127 1 8 0 0 0 0.0 0 0.0 0 0 0 0 -0.002 90 2000 0.02 0.02 0.0 0 0 1.0 80.0 4
|
|
||||||
CARCOLLISION_DUST 76 76 76 0 0 0 0 0 0.10 0.02 255 0 0 160 0 4 0 0 0 0.0 0 0.0 0 0 0 0 -0.0015 90 2000 0.02 0.02 0.0 0 0 1.0 30.0 4
|
|
||||||
;
|
|
||||||
;
|
|
||||||
CAR_DEBRIS 32 32 32 0 0 0 0 0 0.5 0.0 224 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 1000 0.02 0.02 0.0 0 0 1.0 50.0 4
|
|
||||||
HELI_DEBRIS 32 32 32 0 0 0 0 0 1.5 0.0 224 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.065 90 1500 0.02 0.02 0.0 0 0 1.0 150.0 4
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;EXHAUST_FUMES 80 80 80 0 0 0 0 0 0.03 0.03 255 0 0 122 0 4 0 0 0 0.0 0 0.0 2 0 4 0 -0.001 95 1500 0.01 0.03 0.0 0 0 1.0 50.0 4
|
|
||||||
EXHAUST_FUMES 98 98 108 0 0 0 0 0 0.03 0.06 255 0 0 152 0 12 0 0 0 0.0 0 0.0 2 0 4 0 -0.002 96 1000 0.01 0.03 0.0 0 0 1.0 25.0 4
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;RUBBER 40 40 40 0 0 0 0 0 0.4 0.005 255 21 20 255 0 0 0 0 0 0.0 0 0.0 3 0 4 0 -0.0005 1 1000 0.02 0.0 0.0 0 0 1.0 400.0 4
|
|
||||||
RUBBER_SMOKE 255 255 255 0 0 0 0 0 0.4 0.005 255 0 0 127 1 8 0 0 0 0.0 0 0.0 3 0 4 0 -0.0005 1 1000 0.02 0.0 0.0 0 0 1.0 50.0 4
|
|
||||||
;BURNINGRUBBER_SMOKE128 128 128 0 0 0 0 0 0.35 0.06 255 0 0 192 1 6 0 0 0 0.0 0 0.0 0 0 0 0 -0.002 90 4000 0.02 0.02 0.0 0 0 1.0 400.0 4
|
|
||||||
BURNINGRUBBER_SMOKE 128 128 128 0 0 0 0 0 0.35 0.06 255 0 0 128 0 4 0 0 0 0.0 0 0.0 0 0 0 0 -0.002 90 2000 0.02 0.02 0.0 0 0 1.0 50.0 4
|
|
||||||
;
|
|
||||||
;
|
|
||||||
BULLETHIT_SMOKE 192 192 192 0 0 0 0 0 0.15 0.03 70 0 2 255 1 10 0 0 0 0.0 0 0.0 0 0 0 0 -0.001 90 2000 0.04 0.02 0.0 0 0 1.0 150.0 0
|
|
||||||
;
|
|
||||||
;
|
|
||||||
GUNSHELL_FIRST 108 108 108 0 0 0 0 0 0.015 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 1000 0.02 0.02 0.0 0 0 1.0 0.0 12292
|
|
||||||
GUNSHELL 108 108 108 0 0 0 0 0 0.015 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 1000 0.02 0.02 0.0 0 0 1.0 12.0 4100
|
|
||||||
GUNSHELL_BUMP1 108 108 108 0 0 0 0 0 0.015 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 1000 0.02 0.02 0.0 0 0 1.0 8.0 4100
|
|
||||||
GUNSHELL_BUMP2 108 108 108 0 0 0 0 0 0.015 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 400 0.02 0.02 0.0 0 0 1.0 8.0 4100
|
|
||||||
;
|
|
||||||
;
|
|
||||||
TEST 255 64 64 0 0 0 0 0 0.2 0.025 255 1 20 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 3000 0.0 0.0 0.0 0 0 1.0 400.0 128
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;Particles with flag DRAWTOP2D should be placed last and VR (Visibility Range) set to 0!
|
|
||||||
;
|
|
||||||
;BIRD_FRONT 8 8 8 0 0 0 0 0 0.05 0.0 255 0 0 255 2 1 0 0 0 0.0 0 0.0 1 0 3 0 0.0 1 10000 0.0 0.0 0.0 0 0 1.0 0.0 3140
|
|
||||||
BIRD_FRONT 8 8 8 0 0 0 0 0 1.05 0.0 255 0 0 255 2 2 0 0 0 0.0 0 0.0 1 0 3 0 0.0 1 8000 0.0 0.0 0.0 0 0 1.0 0.0 68
|
|
||||||
;
|
|
||||||
RAINDROP_2D 32 32 32 0 0 0 0 0 0.5 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 1 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 0.0 3072
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;
|
|
||||||
; below is just backup of above values:
|
|
||||||
;
|
|
||||||
;SPARK 255 128 64 0.005 0.0 255 0 0 0 0 0 0 0.0 1.0 300 0.0 0.07 0.0 0 0 1.0 48
|
|
||||||
;SPARK_SMALL 255 255 128 0.005 0.0 255 0 0 0 0 0 0 0.0 1.0 500 0.0 0.05 0.0 0 0 0.6 40
|
|
||||||
;BLOOD 128 128 128 0.02 0.0 255 0 0 0 0 0 0 0.03 1.0 2000 0.3 0.05 0.0 0 0 1.0 6
|
|
||||||
;BLOOD_SMALL 255 32 32 0.007 0.0 255 0 0 0 0 0 0 0.005 1.0 2000 0.05 0.05 0.0 0 0 1.0 54
|
|
||||||
;BLOOD_SPLAT 128 128 128 0.1 0.0 255 0 0 0 0 0 0 0.0 1.0 200 0.3 0.0 0.0 0 0 1.0 36
|
|
||||||
;BLOOD_SPURT 255 32 32 0.008 0.0 255 0 0 0 0 0 0 0.005 1.0 2000 0.0 0.01 0.0 0 0 2.0 52
|
|
||||||
;DEBRIS 64 64 64 0.5 0.0 255 0 0 0 0 0 0 0.01 0.95 1000 0.2 0.0 0.0 0 0 1.0 4
|
|
||||||
;DEBRIS2 64 64 64 0.04 0.0 255 0 0 0 0 0 5 0.01 0.99 1000 0.03 0.04 0.0 0 0 1.0 38
|
|
||||||
;WATER 64 64 128 0.01 0.0 255 0 0 0 0 0 0 0.0 1.0 2000 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;FLAME 255 74 30 0.2 0.0 255 0 0 31 0 5 0 0.0 1.0 100 0.05 0.0 0.0 0 0 1.0 0
|
|
||||||
;FIREBALL 255 74 30 0.1 0.04 255 0 8 31 0 8 0 0.0 0.96 1000 0.1 0.0 0.0 0 0 1.0 0
|
|
||||||
;GUNFLASH 255 255 255 0.1 0.0 255 0 50 50 0 3 0 0.0 1.0 250 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;GUNFLASHSTATIC 255 255 255 0.1 0.0 255 0 128 0 0 0 0 0.0 1.0 25 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;SMOKE 32 32 32 0.15 0.015 255 4 25 31 0 5 0 -0.01 0.95 1000 0.05 0.05 0.01 3 0 1.0 0
|
|
||||||
;SHARD 255 255 255 0.03 0.0 255 0 0 0 0 0 0 0.0 0.96 300 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;SPLASH 64 64 128 0.1 0.007 255 0 10 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;BLOOD_SPLASH 24 64 0 0.1 0.0 255 0 0 0 0 0 0 0.0 0.96 300 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;RUBBER 40 40 40 0.4 0.005 255 1 25 31 0 5 0 0.0 1.0 1000 0.02 0.0 0.0 0 0 1.0 0
|
|
||||||
;CARFLAME 255 74 30 0.5 0.04 255 1 20 31 0 5 0 0.0 1.0 1000 0.4 0.0 0.0 0 0 1.0 64
|
|
||||||
;STEAM 64 64 64 0.5 0.05 255 0 16 31 0 5 0 -0.005 0.95 2000 0.01 0.03 0.0 0 0 1.0 0
|
|
||||||
;RAINDROP 32 32 32 0.6 0.0 255 0 0 0 0 0 0 0.1 1.0 1000 0.0 0.0 0.0 0 0 1.0 1
|
|
||||||
;RAIN_SPLASH 32 32 32 0.08 0.0 255 0 0 1 0 4 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;RAINDROP_SMALL 32 32 32 0.3 0.0 255 0 0 0 0 0 0 0.1 1.0 1000 0.0 0.0 0.0 0 0 1.0 1
|
|
||||||
;EXPLOSION_MEDIUM 80 80 80 0.6 0.04 255 4 8 7 0 11 0 0.0 0.96 30000 0.2 0.0 0.0 3 0 1.0 0
|
|
||||||
;EXPLOSION_LARGE 80 80 80 1.1 0.04 255 4 8 7 0 11 0 0.0 0.96 30000 0.8 0.0 0.0 3 0 1.0 0
|
|
||||||
;BOAT_SPLASH 32 64 32 0.2 0.2 255 0 0 0 0 0 0 0.01 1.0 2000 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;BOAT_THRUSTJET 24 32 24 0.5 0.1 255 0 0 250 0 5 0 0.01 0.5 1000 0.0 0.0 0.0 0 4 1.0 8
|
|
||||||
;WATER_HYDRANT 64 64 128 0.4 0.01 255 1 2 20 0 5 0 0.007 0.99 500 0.02 0.05 0.0 0 4 1.0 256
|
|
||||||
;WATER_CANNON 64 64 128 0.03 0.03 255 0 0 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;EXTINGUISH_STEAM 32 32 32 0.1 0.0 255 0 0 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;PED_SPLASH 32 32 64 0.1 0.05 255 0 0 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;HELI_DUST 17 15 9 0.2 0.1 255 0 8 0 0 0 0 -0.001 1.0 1000 0.2 0.05 0.0 0 0 1.0 0
|
|
||||||
;HELI_ATTACK 255 255 128 0.01 0.0 255 0 0 0 0 0 0 0.0 1.0 500 0.0 0.0 0.0 0 0 0.5 10
|
|
||||||
;ENGINE_SMOKE 16 16 16 0.5 0.04 255 0 0 0 0 0 0 -0.005 0.95 2000 0.01 0.03 0.0 0 0 1.0 4
|
|
||||||
;ENGINE_SMOKE2 4 4 4 1.0 0.2 255 1 4 0 0 0 0 0.001 1.0 1000 0.0 0.0 0.0 0 3 1.0 4
|
|
||||||
;PAINT_SMOKE 255 0 0 0.1 0.01 255 0 8 0 0 0 0 0.0 0.95 3000 0.0 0.005 0.0 0 0 1.0 0
|
|
||||||
;TREE_LEAVES 64 64 64 0.2 0.0 255 0 0 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
|
||||||
;TEST 255 64 64 0.2 0.05 255 0 16 0 0 0 0 0.0 1.0 3000 0.0 0.0 0.0 0 0 1.0 128
|
|
||||||
;
|
|
||||||
;
|
|
||||||
;the end
|
|
||||||
BIN
gamefiles/data/freeroam_miami.scm
Normal file
BIN
gamefiles/data/freeroam_miami.scm
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,104 +1,104 @@
|
|||||||
# Fresnal RO Table
|
# Fresnel RO Table
|
||||||
# SUNNY CLOUDY RAINY, FOGGY
|
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
||||||
0.400000 0.400000 0.400000 0.150000 # Midnight
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # Midnight
|
||||||
0.400000 0.400000 0.400000 0.150000 # 1am
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 1am
|
||||||
0.400000 0.400000 0.400000 0.150000 # 2am
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 2am
|
||||||
0.400000 0.400000 0.400000 0.150000 # 3am
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 3am
|
||||||
0.400000 0.400000 0.400000 0.150000 # 4am
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 4am
|
||||||
0.400000 0.400000 0.400000 0.150000 # 5am
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 5am
|
||||||
0.400000 0.400000 0.400000 0.150000 # 6am
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 6am
|
||||||
0.400000 0.400000 0.400000 0.150000 # 7am
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 7am
|
||||||
0.400000 0.400000 0.400000 0.150000 # 8am
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 8am
|
||||||
0.400000 0.400000 0.400000 0.150000 # 9am
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 9am
|
||||||
0.400000 0.400000 0.400000 0.150000 # 10am
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 10am
|
||||||
0.400000 0.400000 0.400000 0.150000 # 11am
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 11am
|
||||||
0.400000 0.400000 0.400000 0.150000 # Midday
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # Midday
|
||||||
0.400000 0.400000 0.400000 0.150000 # 1pm
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 1pm
|
||||||
0.400000 0.400000 0.400000 0.150000 # 2pm
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 2pm
|
||||||
0.400000 0.400000 0.400000 0.150000 # 3pm
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 3pm
|
||||||
0.400000 0.400000 0.400000 0.150000 # 4pm
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 4pm
|
||||||
0.400000 0.400000 0.400000 0.150000 # 5pm
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 5pm
|
||||||
0.400000 0.400000 0.400000 0.150000 # 6pm
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 6pm
|
||||||
0.400000 0.400000 0.400000 0.150000 # 7pm
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 7pm
|
||||||
0.400000 0.400000 0.400000 0.150000 # 8pm
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 8pm
|
||||||
0.400000 0.400000 0.400000 0.150000 # 9pm
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 9pm
|
||||||
0.400000 0.400000 0.400000 0.150000 # 10pm
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 10pm
|
||||||
0.400000 0.400000 0.400000 0.150000 # 11pm
|
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 11pm
|
||||||
# Specular Power Table
|
# Specular Power Table (ther higher, the tighter the highlite)
|
||||||
# SUNNY CLOUDY RAINY, FOGGY
|
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
||||||
128.000000 80.000000 30.000000 128.000000 # Midnight
|
25 15 70 10 15 15 18 # Midnight
|
||||||
128.000000 80.000000 30.000000 128.000000 # 1am
|
25 15 70 10 15 15 18 # 1am
|
||||||
128.000000 80.000000 30.000000 128.000000 # 2am
|
25 15 70 10 15 15 18 # 2am
|
||||||
128.000000 80.000000 30.000000 128.000000 # 3am
|
25 15 70 10 15 15 18 # 3am
|
||||||
128.000000 80.000000 30.000000 128.000000 # 4am
|
25 15 70 10 15 15 18 # 4am
|
||||||
80.000000 60.000000 30.000000 128.000000 # 5am
|
25 15 70 10 15 15 18 # 5am
|
||||||
80.000000 60.000000 30.000000 128.000000 # 6am
|
25 15 70 10 15 15 18 # 6am
|
||||||
80.000000 60.000000 30.000000 128.000000 # 7am
|
25 15 70 10 15 15 18 # 7am
|
||||||
80.000000 60.000000 30.000000 128.000000 # 8am
|
25 15 70 10 15 15 18 # 8am
|
||||||
80.000000 60.000000 30.000000 128.000000 # 9am
|
25 15 70 10 15 15 18 # 9am
|
||||||
80.000000 60.000000 30.000000 128.000000 # 10am
|
25 15 70 10 15 15 18 # 10am
|
||||||
80.000000 60.000000 30.000000 128.000000 # 11am
|
25 15 70 10 15 15 18 # 11am
|
||||||
80.000000 60.000000 30.000000 128.000000 # Midday
|
25 15 70 10 15 15 18 # Midday
|
||||||
80.000000 60.000000 30.000000 128.000000 # 1pm
|
25 15 70 10 15 15 18 # 1pm
|
||||||
80.000000 60.000000 30.000000 128.000000 # 2pm
|
25 15 70 10 15 15 18 # 2pm
|
||||||
80.000000 60.000000 30.000000 128.000000 # 3pm
|
25 15 70 10 15 15 18 # 3pm
|
||||||
80.000000 60.000000 30.000000 128.000000 # 4pm
|
25 15 70 10 15 15 18 # 4pm
|
||||||
128.000000 80.000000 30.000000 128.000000 # 5pm
|
25 15 70 10 15 15 18 # 5pm
|
||||||
128.000000 80.000000 30.000000 128.000000 # 6pm
|
25 15 70 10 15 15 18 # 6pm
|
||||||
128.000000 80.000000 30.000000 128.000000 # 7pm
|
25 15 70 10 15 15 18 # 7pm
|
||||||
128.000000 80.000000 30.000000 128.000000 # 8pm
|
25 15 70 10 15 15 18 # 8pm
|
||||||
128.000000 80.000000 30.000000 128.000000 # 9pm
|
25 15 70 10 15 15 18 # 9pm
|
||||||
128.000000 80.000000 30.000000 128.000000 # 10pm
|
25 15 70 10 15 15 18 # 10pm
|
||||||
128.000000 80.000000 30.000000 128.000000 # 11pm
|
25 15 70 10 15 15 18 # 11pm
|
||||||
# Diffuse Colour Modifier Table (Red,Green,Blue,Amount)
|
# Diffuse Colour Modifier Table (Red,Green,Blue,Amount)
|
||||||
# SUNNY CLOUDY RAINY, FOGGY
|
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # Midnight
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # Midnight
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 1am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 1am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 2am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 2am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 3am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 3am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 4am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 4am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 5am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 5am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 6am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 6am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 7am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 7am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 8am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 8am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 9am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 9am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 10am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 10am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 11am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 11am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # Midday
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # Midday
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 1pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 1pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 2pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 2pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 3pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 3pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 4pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 4pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 5pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 5pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 6pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 6pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 7pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 7pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 8pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 8pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 9pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 9pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 10pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 10pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 11pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 11pm
|
||||||
# Specular Colour Table (Red,Green,Blue,Amount)
|
# Specular Colour Table (Red,Green,Blue,Ignored)
|
||||||
# SUNNY CLOUDY RAINY, FOGGY
|
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
||||||
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # Midnight
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # Midnight
|
||||||
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 1am
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 1am
|
||||||
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 2am
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 2am
|
||||||
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 3am
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 3am
|
||||||
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 4am
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 4am
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 5am
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 5am
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 6am
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 6am
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 7am
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 7am
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 8am
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 8am
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 9am
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 9am
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 10am
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 10am
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 11am
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 11am
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # Midday
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # Midday
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 1pm
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 1pm
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 2pm
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 2pm
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 3pm
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 3pm
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 4pm
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 4pm
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 5pm
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 5pm
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 6pm
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 6pm
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 7pm
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 7pm
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 8pm
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 8pm
|
||||||
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 9pm
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 9pm
|
||||||
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 10pm
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 10pm
|
||||||
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 11pm
|
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 11pm
|
||||||
|
|||||||
Binary file not shown.
@@ -1,130 +1,130 @@
|
|||||||
# Ramp Start Table
|
# Ramp Start Table
|
||||||
# SUNNY CLOUDY RAINY, FOGGY
|
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # Midnight
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # Midnight
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 1am
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 1am
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 2am
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 2am
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 3am
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 3am
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 4am
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 4am
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 5am
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 5am
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 6am
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 6am
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 7am
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 7am
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 8am
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 8am
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 9am
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 9am
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 10am
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 10am
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 11am
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 11am
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # Midday
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # Midday
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 1pm
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 1pm
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 2pm
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 2pm
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 3pm
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 3pm
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 4pm
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 4pm
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 5pm
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 5pm
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 6pm
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 6pm
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 7pm
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 7pm
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 8pm
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 8pm
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 9pm
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 9pm
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 10pm
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 10pm
|
||||||
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 11pm
|
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 11pm
|
||||||
# Ramp End Table
|
# Ramp End Table
|
||||||
# SUNNY CLOUDY RAINY, FOGGY
|
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
||||||
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # Midnight
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # Midnight
|
||||||
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 1am
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 1am
|
||||||
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 2am
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 2am
|
||||||
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 3am
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 3am
|
||||||
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 4am
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 4am
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 5am
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 5am
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 6am
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 6am
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 7am
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 7am
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 8am
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 8am
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 9am
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 9am
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 10am
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 10am
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 11am
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 11am
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # Midday
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # Midday
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 1pm
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 1pm
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 2pm
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 2pm
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 3pm
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 3pm
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 4pm
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 4pm
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 5pm
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 5pm
|
||||||
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 6pm
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 6pm
|
||||||
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 7pm
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 7pm
|
||||||
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 8pm
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 8pm
|
||||||
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 9pm
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 9pm
|
||||||
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 10pm
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 10pm
|
||||||
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 11pm
|
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 11pm
|
||||||
# Offset Table
|
# Offset Table
|
||||||
# SUNNY CLOUDY RAINY, FOGGY
|
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
||||||
0 0 0 0 # Midnight
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # Midnight
|
||||||
0 0 0 0 # 1am
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 1am
|
||||||
0 0 0 0 # 2am
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 2am
|
||||||
0 0 0 0 # 3am
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 3am
|
||||||
0 0 0 0 # 4am
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 4am
|
||||||
0 0 0 0 # 5am
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 5am
|
||||||
0 0 0 0 # 6am
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 6am
|
||||||
0 0 0 0 # 7am
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 7am
|
||||||
0 0 0 0 # 8am
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 8am
|
||||||
0 0 0 0 # 9am
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 9am
|
||||||
0 0 0 0 # 10am
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 10am
|
||||||
0 0 0 0 # 11am
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 11am
|
||||||
0 0 0 0 # Midday
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # Midday
|
||||||
0 0 0 0 # 1pm
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 1pm
|
||||||
0 0 0 0 # 2pm
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 2pm
|
||||||
0 0 0 0 # 3pm
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 3pm
|
||||||
0 0 0 0 # 4pm
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 4pm
|
||||||
0 0 0 0 # 5pm
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 5pm
|
||||||
0 0 0 0 # 6pm
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 6pm
|
||||||
0 0 0 0 # 7pm
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 7pm
|
||||||
0 0 0 0 # 8pm
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 8pm
|
||||||
0 0 0 0 # 9pm
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 9pm
|
||||||
0 0 0 0 # 10pm
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 10pm
|
||||||
0 0 0 0 # 11pm
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 11pm
|
||||||
# Scale Table
|
# Scale Table (the lentgh of the light band?)
|
||||||
# SUNNY CLOUDY RAINY, FOGGY
|
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
||||||
1.5 1.5 1.0 1.0 # Midnight
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # Midnight
|
||||||
1.5 1.5 1.0 1.0 # 1am
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 1am
|
||||||
1.5 1.5 1.0 1.0 # 2am
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 2am
|
||||||
1.5 1.5 1.5 1.5 # 3am
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 3am
|
||||||
2.0 2.0 2.0 2.0 # 4am
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 4am
|
||||||
2.0 2.0 2.0 2.0 # 5am
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 5am
|
||||||
2.0 2.0 2.0 2.0 # 6am
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 6am
|
||||||
2.5 2.5 2.0 2.0 # 7am
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 7am
|
||||||
2.5 2.5 2.0 2.0 # 8am
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 8am
|
||||||
2.5 2.5 2.0 2.0 # 9am
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 9am
|
||||||
2.5 2.5 2.0 2.0 # 10am
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 10am
|
||||||
2.5 2.5 2.0 2.0 # 11am
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 11am
|
||||||
2.5 2.5 2.0 2.0 # Midday
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # Midday
|
||||||
2.5 2.5 2.0 2.0 # 1pm
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 1pm
|
||||||
2.5 2.5 2.0 2.0 # 2pm
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 2pm
|
||||||
2.5 2.5 2.0 2.0 # 3pm
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 3pm
|
||||||
2.5 2.5 2.0 2.0 # 4pm
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 4pm
|
||||||
2.0 2.0 2.0 2.0 # 5pm
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 5pm
|
||||||
2.0 2.0 2.0 2.0 # 6pm
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 6pm
|
||||||
2.0 2.0 2.0 2.0 # 7pm
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 7pm
|
||||||
1.5 1.5 1.5 1.5 # 8pm
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 8pm
|
||||||
1.5 1.5 1.0 1.0 # 9pm
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 9pm
|
||||||
1.5 1.5 1.0 1.0 # 10pm
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 10pm
|
||||||
1.5 1.5 1.0 1.0 # 11pm
|
1 0.5 1.5 0.5 1.5 1.5 1.5 # 11pm
|
||||||
# Scaling Table
|
# Scaling Table (how strong the overall effect is)
|
||||||
# SUNNY CLOUDY RAINY, FOGGY
|
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS time multiplier
|
||||||
0.2 0.2 0.1 0.1 # Midnight
|
1 0.3 0.5 0.1 1 1 1 # Midnight 0.5
|
||||||
0.2 0.2 0.1 0.1 # 1am
|
1 0.3 0.5 0.1 1 1 1 # 1am 0.5
|
||||||
0.7 0.7 0.2 0.2 # 6am
|
1 0.3 0.5 0.1 1 1 1 # 2am 0.5
|
||||||
0.7 0.7 0.2 0.2 # 3am
|
1 0.3 0.5 0.1 1 1 1 # 3am 0.5
|
||||||
0.7 0.7 0.2 0.2 # 4am
|
1 0.3 0.5 0.1 1 1 1 # 4am 0.5
|
||||||
2.0 2.0 0.3 0.3 # 5am
|
1 0.3 0.5 0.1 1 1 1 # 5am 0.5
|
||||||
3.0 3.0 0.3 0.3 # 6am
|
1 0.3 0.5 0.1 1 1 1 # 6am 0.5
|
||||||
4.0 4.0 0.3 0.3 # 7am
|
1.2 0.36 0.6 0.12 1.2 1.2 1.2 # 7am 0.6
|
||||||
5.0 5.0 0.3 0.3 # 8am
|
1.4 0.42 0.7 0.14 1.4 1.4 1.4 # 8am 0.7
|
||||||
6.0 6.0 1.3 1.3 # 9am
|
1.6 0.48 0.8 0.16 1.6 1.6 1.6 # 9am 0.8
|
||||||
6.0 6.0 2.0 2.0 # 10am
|
1.8 0.54 0.9 0.18 1.8 1.8 1.8 # 10am 0.9
|
||||||
6.0 6.0 2.0 2.0 # 11am
|
2 0.6 1 0.2 2 2 2 # 11am 1
|
||||||
6.0 6.0 2.0 2.0 # Midday
|
2 0.6 1 0.2 2 2 2 # Midday tweaking value
|
||||||
6.0 6.0 2.0 2.0 # 1pm
|
2 0.6 1 0.2 2 2 2 # 1pm 1
|
||||||
6.0 6.0 1.3 1.3 # 6pm
|
2 0.6 1 0.2 2 2 2 # 2pm 1
|
||||||
5.0 5.0 0.3 0.3 # 3pm
|
2.2 0.66 1.1 0.22 2.2 2.2 2.2 # 3pm 1.1
|
||||||
4.0 4.0 0.3 0.3 # 4pm
|
2.2 0.66 1.1 0.22 2.2 2.2 2.2 # 4pm 1.1
|
||||||
3.0 3.0 0.3 0.3 # 5pm
|
2.4 0.72 1.2 0.24 2.4 2.4 2.4 # 5pm 1.2
|
||||||
2.0 2.0 0.3 0.3 # 6pm
|
2.4 0.72 1.2 0.24 2.4 2.4 2.4 # 6pm 1.2
|
||||||
0.7 0.7 0.2 0.2 # 7pm
|
2.2 0.66 1.1 0.22 2.2 2.2 2.2 # 7pm 1.1
|
||||||
0.7 0.7 0.2 0.2 # 8pm
|
2 0.6 1 0.2 2 2 2 # 8pm 1
|
||||||
0.7 0.7 0.2 0.2 # 9pm
|
1.6 0.48 0.8 0.16 1.6 1.6 1.6 # 9pm 0.8
|
||||||
0.2 0.2 0.1 0.1 # 10pm
|
1.2 0.36 0.6 0.12 1.2 1.2 1.2 # 10pm 0.6
|
||||||
0.2 0.2 0.1 0.1 # 11pm
|
1 0.3 0.5 0.1 1 1 1 # 11pm 0.5
|
||||||
|
|||||||
@@ -1,26 +1,30 @@
|
|||||||
# LM blend Table
|
# LM blend Table
|
||||||
# SUNNY CLOUDY RAINY FOGGY
|
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS basic daytime ramp
|
||||||
0.700000 0.700000 0.700000 0.550000 # Midnight
|
0.45 0.6 0.75 0.525 0.45 0.75 0.375 # Midnight 0.75 0.1
|
||||||
0.700000 0.700000 0.700000 0.550000 # 1am
|
0.48 0.64 0.8 0.56 0.48 0.8 0.4 # 1am 0.8 0.2
|
||||||
0.700000 0.700000 0.700000 0.550000 # 2am
|
0.51 0.68 0.85 0.595 0.51 0.85 0.425 # 2am 0.85 0.3
|
||||||
0.700000 0.700000 0.700000 0.550000 # 3am
|
0.54 0.72 0.9 0.63 0.54 0.9 0.45 # 3am 0.9 0.4
|
||||||
0.700000 0.700000 0.700000 0.550000 # 4am
|
0.57 0.76 0.95 0.665 0.57 0.95 0.475 # 4am 0.95 0.6
|
||||||
0.750000 0.750000 0.700000 0.600000 # 5am
|
0.6 0.8 1 0.7 0.6 1 0.5 # 5am 1 0.8
|
||||||
0.800000 0.800000 0.750000 0.600000 # 6am
|
0.6 0.8 1 0.7 0.6 1 0.5 # 6am 1 1
|
||||||
0.850000 0.850000 0.800000 0.650000 # 7am
|
0.6 0.8 1 0.7 0.6 1 0.5 # 7am 1 1
|
||||||
0.900000 0.900000 0.800000 0.700000 # 8am
|
0.6 0.8 1 0.7 0.6 1 0.5 # 8am 1 1
|
||||||
0.950000 0.900000 0.800000 0.700000 # 9am
|
0.6 0.8 1 0.7 0.6 1 0.5 # 9am 1 1
|
||||||
1.000000 0.900000 0.800000 0.700000 # 10am
|
0.6 0.8 1 0.7 0.6 1 0.5 # 10am 1 1
|
||||||
1.000000 0.900000 0.800000 0.700000 # 11am
|
0.6 0.8 1 0.7 0.6 1 0.5 # 11am 1 1
|
||||||
1.000000 0.900000 0.800000 0.700000 # Midday
|
0.6 0.8 1 0.7 0.6 1 0.5 # Midday 1 tweak here
|
||||||
1.000000 0.900000 0.800000 0.700000 # 1pm
|
0.6 0.8 1 0.7 0.6 1 0.5 # 1pm 1 1
|
||||||
1.000000 0.900000 0.800000 0.700000 # 2pm
|
0.6 0.8 1 0.7 0.6 1 0.5 # 2pm 1 1
|
||||||
0.950000 0.900000 0.800000 0.700000 # 3pm
|
0.6 0.8 1 0.7 0.6 1 0.5 # 3pm 1 1
|
||||||
0.900000 0.900000 0.800000 0.700000 # 4pm
|
0.6 0.8 1 0.7 0.6 1 0.5 # 4pm 1 1
|
||||||
0.850000 0.850000 0.800000 0.650000 # 5pm
|
0.6 0.8 1 0.7 0.6 1 0.5 # 5pm 1 1
|
||||||
0.800000 0.800000 0.750000 0.600000 # 6pm
|
0.6 0.8 1 0.7 0.6 1 0.5 # 6pm 1 0.8
|
||||||
0.750000 0.750000 0.700000 0.600000 # 7pm
|
0.57 0.76 0.95 0.665 0.57 0.95 0.475 # 7pm 0.95 0.6
|
||||||
0.700000 0.700000 0.700000 0.550000 # 8pm
|
0.54 0.72 0.9 0.63 0.54 0.9 0.45 # 8pm 0.9 0.5
|
||||||
0.700000 0.700000 0.700000 0.550000 # 9pm
|
0.51 0.68 0.85 0.595 0.51 0.85 0.425 # 9pm 0.85 0.4
|
||||||
0.700000 0.700000 0.700000 0.550000 # 10pm
|
0.48 0.64 0.8 0.56 0.48 0.8 0.4 # 10pm 0.8 0.3
|
||||||
0.700000 0.700000 0.700000 0.550000 # 11pm
|
0.45 0.6 0.75 0.525 0.45 0.75 0.375 # 11pm 0.75 0.2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
88
logo.svg
88
logo.svg
@@ -1,88 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
sodipodi:docname="re3_final.svg"
|
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
|
||||||
id="svg8"
|
|
||||||
version="1.1"
|
|
||||||
viewBox="0 0 270.93331 270.93334"
|
|
||||||
height="1024"
|
|
||||||
width="1024"
|
|
||||||
inkscape:export-filename="/home/hazelnot/Design/re3_red.png"
|
|
||||||
inkscape:export-xdpi="96"
|
|
||||||
inkscape:export-ydpi="96">
|
|
||||||
<defs
|
|
||||||
id="defs2" />
|
|
||||||
<sodipodi:namedview
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:window-y="0"
|
|
||||||
inkscape:window-x="0"
|
|
||||||
inkscape:window-height="1359"
|
|
||||||
inkscape:window-width="2560"
|
|
||||||
inkscape:snap-page="true"
|
|
||||||
inkscape:showpageshadow="false"
|
|
||||||
inkscape:pagecheckerboard="false"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:document-rotation="0"
|
|
||||||
inkscape:current-layer="g837"
|
|
||||||
inkscape:document-units="mm"
|
|
||||||
inkscape:cy="544.84615"
|
|
||||||
inkscape:cx="415.73725"
|
|
||||||
inkscape:zoom="0.7"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:pageopacity="0"
|
|
||||||
borderopacity="1"
|
|
||||||
bordercolor="#000000"
|
|
||||||
pagecolor="#606060"
|
|
||||||
id="base"
|
|
||||||
fit-margin-top="0"
|
|
||||||
fit-margin-left="0"
|
|
||||||
fit-margin-right="0"
|
|
||||||
fit-margin-bottom="0"
|
|
||||||
lock-margins="false"
|
|
||||||
units="px" />
|
|
||||||
<metadata
|
|
||||||
id="metadata5">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title></dc:title>
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
id="g837"
|
|
||||||
transform="matrix(2.1130708,0,0,2.1130708,14.956432,63.50059)">
|
|
||||||
<path
|
|
||||||
id="path1450"
|
|
||||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:1.25;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.836;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
|
||||||
d="M 0.91799998,0.91799998 V 54.101316 H 17.960888 v 2.33009 c 0,2.95453 1.347497,6.384348 3.911905,8.332308 2.564408,1.947971 5.514112,2.433445 8.500257,2.433445 h 46.367194 v -14.5464 c 2.171993,1.134845 4.548071,1.450557 6.948413,1.450557 h 17.042893 c 2.98614,0 5.93584,-0.485482 8.50025,-2.433442 2.5644,-1.94796 3.91191,-5.377273 3.91191,-8.331793 V 30.964744 c 0,-1.094128 -0.25094,-2.296243 -0.70487,-3.457153 0.45593,-1.16196 0.70487,-2.363609 0.70487,-3.453019 V 11.81656 c 0,-2.9682265 -1.29681,-6.3966108 -3.85713,-8.3907028 -2.56031,-1.9940909 -5.55104,-2.50785722 -8.55503,-2.50785722 H 83.819398 c -3.003989,0 -5.99213,0.51376632 -8.55245,2.50785722 C 74.832145,3.7645045 74.436551,4.1470248 74.074773,4.5591214 73.713016,4.1470532 73.317379,3.7644843 72.8826,3.4258572 70.322288,1.4317663 67.332073,0.91799998 64.328081,0.91799998 H 47.285195 c -2.976748,0 -5.937909,0.51342982 -8.482687,2.46289872 C 36.275393,1.4370808 33.325985,0.91799998 30.37305,0.91799998 Z"
|
|
||||||
inkscape:label="Border" />
|
|
||||||
<g
|
|
||||||
id="g1475"
|
|
||||||
inkscape:label="Text"
|
|
||||||
style="display:inline"
|
|
||||||
transform="translate(-51.547657,-77.439255)">
|
|
||||||
<path
|
|
||||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:1.25;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:11.136;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
|
||||||
d="m 84.566726,139.06892 c -4.562445,0 -6.843668,-1.73285 -6.843668,-5.19856 v -24.61088 c 0,-0.0877 -0.04387,-0.13161 -0.131609,-0.13161 h -3.22442 v 16.84595 H 60.679694 V 83.92475 h 23.887032 c 4.518575,0 6.777863,1.776721 6.777863,5.330164 v 12.239636 c 0,2.01801 -1.118676,3.15862 -3.356029,3.42183 2.281223,0.30709 3.421834,1.46964 3.421834,3.48764 v 20.07037 c 0,0.0877 0.04387,0.13161 0.131609,0.13161 h 33.823507 v 10.46292 z M 77.723058,94.585079 c 0,-0.08774 -0.04387,-0.131609 -0.131609,-0.131609 h -3.22442 v 6.31723 h 3.22442 c 0.08774,0 0.131609,-0.0439 0.131609,-0.13161 z m 33.955122,0 c 0,-0.08774 -0.0439,-0.131609 -0.13161,-0.131609 h -3.09281 c -0.0877,0 -0.13161,0.04387 -0.13161,0.131609 v 5.856601 h 3.35603 z m -10.1997,31.388741 c -4.562444,0 -6.843666,-1.73285 -6.843666,-5.19855 V 89.254914 c 0,-3.553443 2.281222,-5.330164 6.843666,-5.330164 h 17.04337 c 4.56244,0 6.84366,1.776721 6.84366,5.330164 v 20.991636 h -17.04336 v 5.13275 c 0,0.0877 0.0439,0.13161 0.13161,0.13161 h 3.09281 c 0.0877,0 0.13161,-0.0439 0.13161,-0.13161 v -2.50057 h 13.68733 v 7.89654 c 0,3.4657 -2.28122,5.19855 -6.84366,5.19855 z"
|
|
||||||
id="path1452"
|
|
||||||
transform="translate(-2.6458322)"
|
|
||||||
inkscape:label="re" />
|
|
||||||
<path
|
|
||||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:1.25;font-family:Pricedown;-inkscape-font-specification:Pricedown;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#c60000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:11.136;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
|
||||||
d="m 135.23613,125.97382 c -4.56245,0 -6.84367,-1.73285 -6.84367,-5.19855 v -7.89654 h 13.68733 v 2.50057 c 0,0.0877 0.0439,0.13161 0.13161,0.13161 h 3.09281 c 0.0877,0 0.13161,-0.0439 0.13161,-0.13161 v -6.11982 c 0,-0.0877 -0.0439,-0.13161 -0.13161,-0.13161 h -16.71434 v -8.35717 h 16.71434 c 0.0877,0 0.13161,-0.0439 0.13161,-0.13161 v -6.054011 c 0,-0.08774 -0.0439,-0.131609 -0.13161,-0.131609 h -3.09281 c -0.0877,0 -0.13161,0.04387 -0.13161,0.131609 v 2.434766 h -13.55572 v -7.764931 c 0,-3.553443 2.28122,-5.330164 6.84366,-5.330164 h 16.91176 c 4.56245,0 6.84367,1.776721 6.84367,5.330164 v 12.239636 c 0,2.01801 -1.14061,3.15862 -3.42184,3.42183 2.28123,0.30709 3.42184,1.46964 3.42184,3.48764 v 12.37125 c 0,3.4657 -2.28122,5.19855 -6.84367,5.19855 z"
|
|
||||||
id="path1458"
|
|
||||||
inkscape:label="3" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 9.2 KiB |
BIN
premake5.exe
BIN
premake5.exe
Binary file not shown.
52
premake5.lua
52
premake5.lua
@@ -34,6 +34,11 @@ newoption {
|
|||||||
description = "Build with opus"
|
description = "Build with opus"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newoption {
|
||||||
|
trigger = "lto",
|
||||||
|
description = "Use link time optimization"
|
||||||
|
}
|
||||||
|
|
||||||
if(_OPTIONS["with-librw"]) then
|
if(_OPTIONS["with-librw"]) then
|
||||||
Librw = "vendor/librw"
|
Librw = "vendor/librw"
|
||||||
else
|
else
|
||||||
@@ -58,13 +63,21 @@ function getarch(a)
|
|||||||
return a
|
return a
|
||||||
end
|
end
|
||||||
|
|
||||||
workspace "re3"
|
workspace "reLCS"
|
||||||
language "C++"
|
language "C++"
|
||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
|
startproject "reLCS"
|
||||||
location "build"
|
location "build"
|
||||||
symbols "Full"
|
symbols "Full"
|
||||||
staticruntime "off"
|
staticruntime "off"
|
||||||
|
|
||||||
|
-- for CVECTORHACK
|
||||||
|
configuration { "gmake*" }
|
||||||
|
buildoptions { "-fpermissive" }
|
||||||
|
|
||||||
|
filter { "platforms:macosx*" }
|
||||||
|
buildoptions { "-Wno-address-of-temporary" }
|
||||||
|
|
||||||
if _OPTIONS["with-asan"] then
|
if _OPTIONS["with-asan"] then
|
||||||
buildoptions { "-fsanitize=address -g3 -fno-omit-frame-pointer" }
|
buildoptions { "-fsanitize=address -g3 -fno-omit-frame-pointer" }
|
||||||
linkoptions { "-fsanitize=address" }
|
linkoptions { "-fsanitize=address" }
|
||||||
@@ -72,10 +85,10 @@ workspace "re3"
|
|||||||
|
|
||||||
filter { "system:windows" }
|
filter { "system:windows" }
|
||||||
platforms {
|
platforms {
|
||||||
"win-x86-RW33_d3d8-mss",
|
"win-x86-RW34_d3d8-mss",
|
||||||
"win-x86-librw_d3d9-mss",
|
"win-x86-librw_d3d9-mss",
|
||||||
"win-x86-librw_gl3_glfw-mss",
|
"win-x86-librw_gl3_glfw-mss",
|
||||||
"win-x86-RW33_d3d8-oal",
|
"win-x86-RW34_d3d8-oal",
|
||||||
"win-x86-librw_d3d9-oal",
|
"win-x86-librw_d3d9-oal",
|
||||||
"win-x86-librw_gl3_glfw-oal",
|
"win-x86-librw_gl3_glfw-oal",
|
||||||
"win-amd64-librw_d3d9-oal",
|
"win-amd64-librw_d3d9-oal",
|
||||||
@@ -109,7 +122,10 @@ workspace "re3"
|
|||||||
|
|
||||||
filter "configurations:Release"
|
filter "configurations:Release"
|
||||||
defines { "NDEBUG" }
|
defines { "NDEBUG" }
|
||||||
optimize "On"
|
optimize "Speed"
|
||||||
|
if(_OPTIONS["lto"]) then
|
||||||
|
flags { "LinkTimeOptimization" }
|
||||||
|
end
|
||||||
|
|
||||||
filter { "platforms:win*" }
|
filter { "platforms:win*" }
|
||||||
system "windows"
|
system "windows"
|
||||||
@@ -125,11 +141,9 @@ workspace "re3"
|
|||||||
|
|
||||||
filter { "platforms:*x86*" }
|
filter { "platforms:*x86*" }
|
||||||
architecture "x86"
|
architecture "x86"
|
||||||
floatingpoint "Fast"
|
|
||||||
|
|
||||||
filter { "platforms:*amd64*" }
|
filter { "platforms:*amd64*" }
|
||||||
architecture "amd64"
|
architecture "amd64"
|
||||||
floatingpoint "Fast"
|
|
||||||
|
|
||||||
filter { "platforms:*arm*" }
|
filter { "platforms:*arm*" }
|
||||||
architecture "ARM"
|
architecture "ARM"
|
||||||
@@ -164,11 +178,10 @@ workspace "re3"
|
|||||||
|
|
||||||
filter {}
|
filter {}
|
||||||
|
|
||||||
function setpaths (gamepath, exepath, scriptspath)
|
function setpaths (gamepath, exepath)
|
||||||
scriptspath = scriptspath or ""
|
|
||||||
if (gamepath) then
|
if (gamepath) then
|
||||||
postbuildcommands {
|
postbuildcommands {
|
||||||
'{COPY} "%{cfg.buildtarget.abspath}" "' .. gamepath .. scriptspath .. '%{cfg.buildtarget.name}"'
|
'{COPYFILE} "%{cfg.buildtarget.abspath}" "' .. gamepath .. '%{cfg.buildtarget.name}"'
|
||||||
}
|
}
|
||||||
debugdir (gamepath)
|
debugdir (gamepath)
|
||||||
if (exepath) then
|
if (exepath) then
|
||||||
@@ -178,7 +191,6 @@ workspace "re3"
|
|||||||
debugdir (gamepath .. (dir or ""))
|
debugdir (gamepath .. (dir or ""))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--targetdir ("bin/%{prj.name}/" .. scriptspath)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if(_OPTIONS["with-librw"]) then
|
if(_OPTIONS["with-librw"]) then
|
||||||
@@ -191,11 +203,9 @@ project "librw"
|
|||||||
|
|
||||||
filter { "platforms:*x86*" }
|
filter { "platforms:*x86*" }
|
||||||
architecture "x86"
|
architecture "x86"
|
||||||
floatingpoint "Fast"
|
|
||||||
|
|
||||||
filter { "platforms:*amd64*" }
|
filter { "platforms:*amd64*" }
|
||||||
architecture "amd64"
|
architecture "amd64"
|
||||||
floatingpoint "Fast"
|
|
||||||
|
|
||||||
filter "platforms:win*"
|
filter "platforms:win*"
|
||||||
staticruntime "on"
|
staticruntime "on"
|
||||||
@@ -215,7 +225,7 @@ project "librw"
|
|||||||
filter "platforms:*gl3_glfw*"
|
filter "platforms:*gl3_glfw*"
|
||||||
staticruntime "off"
|
staticruntime "off"
|
||||||
|
|
||||||
filter "platforms:*RW33*"
|
filter "platforms:*RW34*"
|
||||||
flags { "ExcludeFromBuild" }
|
flags { "ExcludeFromBuild" }
|
||||||
filter {}
|
filter {}
|
||||||
end
|
end
|
||||||
@@ -224,9 +234,9 @@ local function addSrcFiles( prefix )
|
|||||||
return prefix .. "/*cpp", prefix .. "/*.h", prefix .. "/*.c", prefix .. "/*.ico", prefix .. "/*.rc"
|
return prefix .. "/*cpp", prefix .. "/*.h", prefix .. "/*.c", prefix .. "/*.ico", prefix .. "/*.rc"
|
||||||
end
|
end
|
||||||
|
|
||||||
project "re3"
|
project "reLCS"
|
||||||
kind "WindowedApp"
|
kind "WindowedApp"
|
||||||
targetname "re3"
|
targetname "reLCS"
|
||||||
targetdir "bin/%{cfg.platform}/%{cfg.buildcfg}"
|
targetdir "bin/%{cfg.platform}/%{cfg.buildcfg}"
|
||||||
|
|
||||||
files { addSrcFiles("src") }
|
files { addSrcFiles("src") }
|
||||||
@@ -239,6 +249,8 @@ project "re3"
|
|||||||
files { addSrcFiles("src/control") }
|
files { addSrcFiles("src/control") }
|
||||||
files { addSrcFiles("src/core") }
|
files { addSrcFiles("src/core") }
|
||||||
files { addSrcFiles("src/entities") }
|
files { addSrcFiles("src/entities") }
|
||||||
|
files { addSrcFiles("src/leeds") }
|
||||||
|
files { addSrcFiles("src/leeds/base") }
|
||||||
files { addSrcFiles("src/math") }
|
files { addSrcFiles("src/math") }
|
||||||
files { addSrcFiles("src/modelinfo") }
|
files { addSrcFiles("src/modelinfo") }
|
||||||
files { addSrcFiles("src/objects") }
|
files { addSrcFiles("src/objects") }
|
||||||
@@ -263,6 +275,8 @@ project "re3"
|
|||||||
includedirs { "src/control" }
|
includedirs { "src/control" }
|
||||||
includedirs { "src/core" }
|
includedirs { "src/core" }
|
||||||
includedirs { "src/entities" }
|
includedirs { "src/entities" }
|
||||||
|
includedirs { "src/leeds" }
|
||||||
|
includedirs { "src/leeds/base" }
|
||||||
includedirs { "src/math" }
|
includedirs { "src/math" }
|
||||||
includedirs { "src/modelinfo" }
|
includedirs { "src/modelinfo" }
|
||||||
includedirs { "src/objects" }
|
includedirs { "src/objects" }
|
||||||
@@ -301,8 +315,8 @@ project "re3"
|
|||||||
defines { "AUDIO_OAL" }
|
defines { "AUDIO_OAL" }
|
||||||
|
|
||||||
filter {}
|
filter {}
|
||||||
if(os.getenv("GTA_III_RE_DIR")) then
|
if(os.getenv("GTA_LCS_RE_DIR")) then
|
||||||
setpaths("$(GTA_III_RE_DIR)/", "%(cfg.buildtarget.name)", "")
|
setpaths("$(GTA_LCS_RE_DIR)/", "%(cfg.buildtarget.name)")
|
||||||
end
|
end
|
||||||
|
|
||||||
filter "platforms:win*"
|
filter "platforms:win*"
|
||||||
@@ -353,10 +367,10 @@ project "re3"
|
|||||||
links { "opusfile" }
|
links { "opusfile" }
|
||||||
end
|
end
|
||||||
|
|
||||||
filter "platforms:*RW33*"
|
filter "platforms:*RW34*"
|
||||||
includedirs { "sdk/rwsdk/include/d3d8" }
|
includedirs { "sdk/rwsdk/include/d3d8" }
|
||||||
libdirs { "sdk/rwsdk/lib/d3d8/release" }
|
libdirs { "sdk/rwsdk/lib/d3d8/release" }
|
||||||
links { "rwcore", "rpworld", "rpmatfx", "rpskin", "rphanim", "rtbmp", "rtquat", "rtcharse" }
|
links { "rwcore", "rpworld", "rpmatfx", "rpskin", "rphanim", "rtbmp", "rtquat", "rtanim", "rtcharse", "rpanisot" }
|
||||||
defines { "RWLIBS" }
|
defines { "RWLIBS" }
|
||||||
linkoptions "/SECTION:_rwcseg,ER!W /MERGE:_rwcseg=.text"
|
linkoptions "/SECTION:_rwcseg,ER!W /MERGE:_rwcseg=.text"
|
||||||
|
|
||||||
|
|||||||
BIN
premake5Linux
BIN
premake5Linux
Binary file not shown.
@@ -1,92 +1,122 @@
|
|||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
if(${RE3_AUDIO} STREQUAL "OAL")
|
file(GLOB_RECURSE ${PROJECT}_SOURCES "*.cpp" "*.h" "*.rc")
|
||||||
find_package(OpenAL REQUIRED)
|
|
||||||
find_package(MPG123 REQUIRED)
|
|
||||||
find_package(SndFile REQUIRED)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(GLOB_RECURSE Sources "*.cpp" "*.h")
|
function(header_directories RETURN_LIST)
|
||||||
|
file(GLOB_RECURSE ALL_SRCS *.h *.cpp *.c)
|
||||||
|
set(RELDIRS)
|
||||||
|
foreach(SRC ${ALL_SRCS})
|
||||||
|
file(RELATIVE_PATH RELSRC "${CMAKE_CURRENT_SOURCE_DIR}" "${SRC}")
|
||||||
|
get_filename_component(RELDIR "${RELSRC}" DIRECTORY)
|
||||||
|
list(APPEND RELDIRS ${RELDIR})
|
||||||
|
endforeach()
|
||||||
|
list(REMOVE_DUPLICATES RELDIRS)
|
||||||
|
set(${RETURN_LIST} ${RELDIRS} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
MACRO(HEADER_DIRECTORIES return_list)
|
header_directories(${PROJECT}_INCLUDES)
|
||||||
FILE(GLOB_RECURSE new_list *.cpp)
|
|
||||||
SET(dir_list "animation"
|
|
||||||
"audio"
|
|
||||||
"collision"
|
|
||||||
"control"
|
|
||||||
"core"
|
|
||||||
"entities"
|
|
||||||
"extras"
|
|
||||||
"fakerw"
|
|
||||||
"math"
|
|
||||||
"modelinfo"
|
|
||||||
"objects"
|
|
||||||
"peds"
|
|
||||||
"render"
|
|
||||||
"rw"
|
|
||||||
"save"
|
|
||||||
"skel"
|
|
||||||
"text"
|
|
||||||
"vehicles"
|
|
||||||
"weapons")
|
|
||||||
FOREACH(file_path ${new_list})
|
|
||||||
GET_FILENAME_COMPONENT(dir_path ${file_path} PATH)
|
|
||||||
SET(dir_list ${dir_list} ${dir_path})
|
|
||||||
ENDFOREACH()
|
|
||||||
LIST(REMOVE_DUPLICATES dir_list)
|
|
||||||
SET(${return_list} ${dir_list})
|
|
||||||
ENDMACRO()
|
|
||||||
|
|
||||||
HEADER_DIRECTORIES(header_list)
|
add_executable(${EXECUTABLE} WIN32
|
||||||
include_directories(${header_list})
|
${${PROJECT}_SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${EXECUTABLE} PRIVATE
|
||||||
|
librw::librw
|
||||||
|
Threads::Threads
|
||||||
|
)
|
||||||
|
|
||||||
add_executable(re3 ${Sources})
|
target_include_directories(${EXECUTABLE}
|
||||||
target_link_libraries(re3 librw)
|
|
||||||
target_link_libraries(re3 Threads::Threads)
|
|
||||||
|
|
||||||
if(${RE3_AUDIO} STREQUAL "OAL")
|
|
||||||
target_link_libraries(re3 ${OPENAL_LIBRARY})
|
|
||||||
target_link_libraries(re3 ${MPG123_LIBRARIES})
|
|
||||||
target_link_libraries(re3 ${SNDFILE_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(re3
|
|
||||||
INTERFACE
|
|
||||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
|
|
||||||
)
|
|
||||||
|
|
||||||
target_compile_definitions(re3
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"$<IF:$<CONFIG:DEBUG>,DEBUG,NDEBUG>"
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
|
||||||
PUBLIC
|
$<BUILD_INTERFACE:${${PROJECT}_INCLUDES}>
|
||||||
"RW_${RE3_PLATFORM}"
|
)
|
||||||
)
|
|
||||||
|
|
||||||
target_compile_definitions(re3 PRIVATE LIBRW=1 AUDIO_OAL=1)
|
target_compile_definitions(${EXECUTABLE}
|
||||||
|
PRIVATE
|
||||||
|
$<IF:$<CONFIG:DEBUG>,DEBUG,NDEBUG>
|
||||||
|
LIBRW
|
||||||
|
CMAKE_NO_AUTOLINK
|
||||||
|
)
|
||||||
|
|
||||||
|
if(LIBRW_PLATFORM_D3D9)
|
||||||
|
target_compile_definitions(${EXECUTABLE}
|
||||||
|
PUBLIC
|
||||||
|
USE_D3D9
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${PROJECT}_AUDIO STREQUAL "OAL")
|
||||||
|
find_package(OpenAL REQUIRED)
|
||||||
|
target_include_directories(${EXECUTABLE} PRIVATE ${OPENAL_INCLUDE_DIR})
|
||||||
|
target_link_libraries(${EXECUTABLE} PRIVATE ${OPENAL_LIBRARY})
|
||||||
|
target_compile_definitions(${EXECUTABLE} PRIVATE ${OPENAL_DEFINITIONS})
|
||||||
|
target_compile_definitions(${EXECUTABLE} PRIVATE AUDIO_OAL)
|
||||||
|
elseif(${PROJECT}_AUDIO STREQUAL "MSS")
|
||||||
|
find_package(MilesSDK REQUIRED)
|
||||||
|
target_compile_definitions(${EXECUTABLE} PRIVATE AUDIO_MSS)
|
||||||
|
target_link_libraries(${EXECUTABLE} PRIVATE MilesSDK::MilesSDK)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(mpg123 REQUIRED)
|
||||||
|
target_link_libraries(${EXECUTABLE} PRIVATE
|
||||||
|
MPG123::libmpg123
|
||||||
|
)
|
||||||
|
if(${PROJECT}_WITH_OPUS)
|
||||||
|
find_package(opusfile REQUIRED)
|
||||||
|
target_link_libraries(${EXECUTABLE} PRIVATE
|
||||||
|
opusfile::opusfile
|
||||||
|
)
|
||||||
|
target_compile_definitions(${EXECUTABLE} PRIVATE AUDIO_OPUS)
|
||||||
|
endif()
|
||||||
|
if(${PROJECT}_WITH_LIBSNDFILE)
|
||||||
|
find_package(SndFile REQUIRED)
|
||||||
|
target_link_libraries(${EXECUTABLE} PRIVATE
|
||||||
|
SndFile::SndFile
|
||||||
|
)
|
||||||
|
target_compile_definitions(${EXECUTABLE} PRIVATE AUDIO_OAL_USE_SNDFILE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_compile_definitions(${EXECUTABLE} PRIVATE )
|
||||||
|
|
||||||
|
option(${PROJECT}_WITH_SANITIZERS "Use UB sanitizers (better crash log)" OFF)
|
||||||
|
option(${PROJECT}_WITH_ASAN "Use Address sanitizer (better crash log)" OFF)
|
||||||
|
|
||||||
|
if(${PROJECT}_WITH_SANITIZERS)
|
||||||
|
target_compile_options(${EXECUTABLE} PUBLIC
|
||||||
|
-fsanitize=undefined,float-divide-by-zero,integer,implicit-conversion,implicit-integer-truncation,implicit-integer-arithmetic-value-change,local-bounds,nullability
|
||||||
|
-g3 -fno-omit-frame-pointer)
|
||||||
|
target_link_options(${EXECUTABLE} PUBLIC -fsanitize=undefined,float-divide-by-zero,integer,implicit-conversion,implicit-integer-truncation,implicit-integer-arithmetic-value-change,local-bounds,nullability)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${PROJECT}_WITH_ASAN)
|
||||||
|
target_compile_options(${EXECUTABLE} PUBLIC -fsanitize=address -g3 -fno-omit-frame-pointer)
|
||||||
|
target_link_options(${EXECUTABLE} PUBLIC -fsanitize=address)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
target_compile_options(re3
|
target_compile_options(${EXECUTABLE}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"-Wall"
|
"-Wall"
|
||||||
)
|
)
|
||||||
if (NOT RE3_PLATFORM_PS2)
|
if (NOT LIBRW_PLATFORM_PS2)
|
||||||
target_compile_options(re3
|
target_compile_options(${EXECUTABLE}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"-Wextra"
|
-fpermissive # for CVECTORHACK
|
||||||
"-Wdouble-promotion"
|
-Wno-address-of-temporary # for CVECTORHACK
|
||||||
"-Wpedantic"
|
-Wextra
|
||||||
)
|
-Wdouble-promotion
|
||||||
|
-Wpedantic
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
target_compile_options(re3
|
target_compile_options(${EXECUTABLE}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
/wd4996 /wd4244
|
/Zc:sizedDealloc-
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(re3
|
set_target_properties(${EXECUTABLE}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
C_STANDARD 11
|
C_STANDARD 11
|
||||||
C_EXTENSIONS OFF
|
C_EXTENSIONS OFF
|
||||||
@@ -94,20 +124,15 @@ set_target_properties(re3
|
|||||||
CXX_STANDARD 11
|
CXX_STANDARD 11
|
||||||
CXX_EXTENSIONS OFF
|
CXX_EXTENSIONS OFF
|
||||||
CXX_STANDARD_REQUIRED ON
|
CXX_STANDARD_REQUIRED ON
|
||||||
PREFIX ""
|
)
|
||||||
)
|
|
||||||
|
|
||||||
if(RE3_INSTALL)
|
|
||||||
target_include_directories(re3
|
|
||||||
INTERFACE
|
|
||||||
$<INSTALL_INTERFACE:${RE3_INSTALL_INCLUDEDIR}>
|
|
||||||
)
|
|
||||||
|
|
||||||
|
if(${PROJECT}_INSTALL)
|
||||||
install(
|
install(
|
||||||
TARGETS re3
|
TARGETS ${EXECUTABLE}
|
||||||
EXPORT re3-targets
|
EXPORT ${EXECUTABLE}-targets
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
RUNTIME DESTINATION "."
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
)
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
if(MSVC)
|
||||||
)
|
install(FILES $<TARGET_PDB_FILE:${EXECUTABLE}> DESTINATION "." OPTIONAL)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,23 +1,32 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#if defined _WIN32 && !defined __MINGW32__
|
#if defined _WIN32 && !defined __MINGW32__
|
||||||
|
#if defined __MWERKS__
|
||||||
|
#include <wctype.h>
|
||||||
|
#else
|
||||||
#include "ctype.h"
|
#include "ctype.h"
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <cwctype>
|
#include <cwctype>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "General.h"
|
#include "General.h"
|
||||||
#include "RwHelper.h"
|
#include "RwHelper.h"
|
||||||
|
#include "ModelIndices.h"
|
||||||
#include "ModelInfo.h"
|
#include "ModelInfo.h"
|
||||||
#include "AnimManager.h"
|
#include "AnimManager.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
#include "AnimBlendAssociation.h"
|
#include "AnimBlendAssociation.h"
|
||||||
#include "AnimBlendAssocGroup.h"
|
#include "AnimBlendAssocGroup.h"
|
||||||
|
#include "KeyGen.h"
|
||||||
|
|
||||||
CAnimBlendAssocGroup::CAnimBlendAssocGroup(void)
|
CAnimBlendAssocGroup::CAnimBlendAssocGroup(void)
|
||||||
{
|
{
|
||||||
|
animBlock = nil;
|
||||||
assocList = nil;
|
assocList = nil;
|
||||||
numAssociations = 0;
|
numAssociations = 0;
|
||||||
|
firstAnimId = 0;
|
||||||
|
groupId = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
CAnimBlendAssocGroup::~CAnimBlendAssocGroup(void)
|
CAnimBlendAssocGroup::~CAnimBlendAssocGroup(void)
|
||||||
@@ -38,7 +47,7 @@ CAnimBlendAssocGroup::DestroyAssociations(void)
|
|||||||
CAnimBlendAssociation*
|
CAnimBlendAssociation*
|
||||||
CAnimBlendAssocGroup::GetAnimation(uint32 id)
|
CAnimBlendAssocGroup::GetAnimation(uint32 id)
|
||||||
{
|
{
|
||||||
return &assocList[id];
|
return &assocList[id - firstAnimId];
|
||||||
}
|
}
|
||||||
|
|
||||||
CAnimBlendAssociation*
|
CAnimBlendAssociation*
|
||||||
@@ -48,6 +57,7 @@ CAnimBlendAssocGroup::GetAnimation(const char *name)
|
|||||||
for(i = 0; i < numAssociations; i++)
|
for(i = 0; i < numAssociations; i++)
|
||||||
if(!CGeneral::faststricmp(assocList[i].hierarchy->name, name))
|
if(!CGeneral::faststricmp(assocList[i].hierarchy->name, name))
|
||||||
return &assocList[i];
|
return &assocList[i];
|
||||||
|
debug("\n\nCan't find the fucking animation %s\n\n\n", name);
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,37 +93,53 @@ strcmpIgnoringDigits(const char *s1, const char *s2)
|
|||||||
if(c1) s1++;
|
if(c1) s1++;
|
||||||
if(c2) s2++;
|
if(c2) s2++;
|
||||||
if(c1 == '\0' && c2 == '\0') return true;
|
if(c1 == '\0' && c2 == '\0') return true;
|
||||||
#if defined _WIN32 && !defined __MINGW32__
|
#ifndef ASCII_STRCMP
|
||||||
if(__ascii_iswdigit(c1) && __ascii_iswdigit(c2))
|
|
||||||
#else
|
|
||||||
if(iswdigit(c1) && iswdigit(c2))
|
if(iswdigit(c1) && iswdigit(c2))
|
||||||
|
#else
|
||||||
|
if(__ascii_iswdigit(c1) && __ascii_iswdigit(c2))
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
#if defined _WIN32 && !defined __MINGW32__
|
#ifndef ASCII_STRCMP
|
||||||
c1 = __ascii_toupper(c1);
|
|
||||||
c2 = __ascii_toupper(c2);
|
|
||||||
#else
|
|
||||||
c1 = toupper(c1);
|
c1 = toupper(c1);
|
||||||
c2 = toupper(c2);
|
c2 = toupper(c2);
|
||||||
|
#else
|
||||||
|
c1 = __ascii_toupper(c1);
|
||||||
|
c2 = __ascii_toupper(c2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(c1 != c2)
|
if(c1 && c2 && c1 != c2)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern const char* csPlayerNames[];
|
||||||
|
extern const char* playerNames[];
|
||||||
|
|
||||||
CBaseModelInfo*
|
CBaseModelInfo*
|
||||||
GetModelFromName(const char *name)
|
GetModelFromName(const char *name)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
CBaseModelInfo *mi;
|
CBaseModelInfo* mi;
|
||||||
|
if (CKeyGen::GetUppercaseKey(name) == CKeyGen::GetUppercaseKey("cstoni_a")) {
|
||||||
|
i = 0;
|
||||||
|
while (csPlayerNames[i][0] != '\0') {
|
||||||
|
if (CModelInfo::GetModelInfo(0)->GetNameHashKey() == CKeyGen::GetUppercaseKey(playerNames[i])) {
|
||||||
|
name = csPlayerNames[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for(i = 0; i < MODELINFOSIZE; i++){
|
uint32 hashKey = CKeyGen::GetUppercaseKey(name);
|
||||||
|
for (i = 0; i < MODELINFOSIZE; i++) {
|
||||||
mi = CModelInfo::GetModelInfo(i);
|
mi = CModelInfo::GetModelInfo(i);
|
||||||
if(mi && mi->GetRwObject() && RwObjectGetType(mi->GetRwObject()) == rpCLUMP &&
|
if (mi && mi->GetRwObject()
|
||||||
strcmpIgnoringDigits(mi->GetName(), name))
|
&& RwObjectGetType(mi->GetRwObject()) == rpCLUMP &&
|
||||||
|
hashKey == mi->GetNameHashKey())
|
||||||
return mi;
|
return mi;
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,8 +149,7 @@ CAnimBlendAssocGroup::CreateAssociations(const char *name)
|
|||||||
int i;
|
int i;
|
||||||
CAnimBlock *animBlock;
|
CAnimBlock *animBlock;
|
||||||
|
|
||||||
if(assocList)
|
DestroyAssociations();
|
||||||
DestroyAssociations();
|
|
||||||
|
|
||||||
animBlock = CAnimManager::GetAnimationBlock(name);
|
animBlock = CAnimManager::GetAnimationBlock(name);
|
||||||
assocList = new CAnimBlendAssociation[animBlock->numAnims];
|
assocList = new CAnimBlendAssociation[animBlock->numAnims];
|
||||||
@@ -133,17 +158,18 @@ CAnimBlendAssocGroup::CreateAssociations(const char *name)
|
|||||||
for(i = 0; i < animBlock->numAnims; i++){
|
for(i = 0; i < animBlock->numAnims; i++){
|
||||||
CAnimBlendHierarchy *anim = CAnimManager::GetAnimation(animBlock->firstIndex + i);
|
CAnimBlendHierarchy *anim = CAnimManager::GetAnimation(animBlock->firstIndex + i);
|
||||||
CBaseModelInfo *model = GetModelFromName(anim->name);
|
CBaseModelInfo *model = GetModelFromName(anim->name);
|
||||||
assert(model);
|
if(model){
|
||||||
printf("Associated anim %s with model %s\n", anim->name, model->GetName());
|
debug("Associated anim %s with model %s\n", anim->name, model->GetModelName());
|
||||||
RpClump *clump = (RpClump*)model->CreateInstance();
|
RpClump *clump = (RpClump*)model->CreateInstance();
|
||||||
#ifdef PED_SKIN
|
RpAnimBlendClumpInit(clump);
|
||||||
if(IsClumpSkinned(clump))
|
assocList[i].Init(clump, anim);
|
||||||
RpClumpForAllAtomics(clump, AtomicRemoveAnimFromSkinCB, nil);
|
if(IsClumpSkinned(clump))
|
||||||
#endif
|
RpClumpForAllAtomics(clump, AtomicRemoveAnimFromSkinCB, nil);
|
||||||
RpAnimBlendClumpInit(clump);
|
RpClumpDestroy(clump);
|
||||||
assocList[i].Init(clump, anim);
|
assocList[i].animId = firstAnimId + i;
|
||||||
RpClumpDestroy(clump);
|
assocList[i].groupId = groupId;
|
||||||
assocList[i].animId = i;
|
}else
|
||||||
|
debug("\n\nCANNOT FIND MODELINFO WITH NAME %s\n\n\n", anim->name);
|
||||||
}
|
}
|
||||||
numAssociations = animBlock->numAnims;
|
numAssociations = animBlock->numAnims;
|
||||||
}
|
}
|
||||||
@@ -153,10 +179,8 @@ void
|
|||||||
CAnimBlendAssocGroup::CreateAssociations(const char *blockName, RpClump *clump, const char **animNames, int numAssocs)
|
CAnimBlendAssocGroup::CreateAssociations(const char *blockName, RpClump *clump, const char **animNames, int numAssocs)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
CAnimBlock *animBlock;
|
|
||||||
|
|
||||||
if(assocList)
|
DestroyAssociations();
|
||||||
DestroyAssociations();
|
|
||||||
|
|
||||||
animBlock = CAnimManager::GetAnimationBlock(blockName);
|
animBlock = CAnimManager::GetAnimationBlock(blockName);
|
||||||
assocList = new CAnimBlendAssociation[numAssocs];
|
assocList = new CAnimBlendAssociation[numAssocs];
|
||||||
@@ -164,7 +188,50 @@ CAnimBlendAssocGroup::CreateAssociations(const char *blockName, RpClump *clump,
|
|||||||
numAssociations = 0;
|
numAssociations = 0;
|
||||||
for(i = 0; i < numAssocs; i++){
|
for(i = 0; i < numAssocs; i++){
|
||||||
assocList[i].Init(clump, CAnimManager::GetAnimation(animNames[i], animBlock));
|
assocList[i].Init(clump, CAnimManager::GetAnimation(animNames[i], animBlock));
|
||||||
assocList[i].animId = i;
|
assocList[i].animId = firstAnimId + i;
|
||||||
|
assocList[i].groupId = groupId;
|
||||||
}
|
}
|
||||||
numAssociations = numAssocs;
|
numAssociations = numAssocs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CAnimBlendAssocGroup::CreateAssociations(const char *blockName, const char *animNames, const char *objectNames, int numChars)
|
||||||
|
{
|
||||||
|
if (!objectNames) {
|
||||||
|
CreateAssociations(blockName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (assocList)
|
||||||
|
DestroyAssociations();
|
||||||
|
|
||||||
|
animBlock = CAnimManager::GetAnimationBlock(blockName);
|
||||||
|
assocList = new CAnimBlendAssociation[animBlock->numAnims];
|
||||||
|
|
||||||
|
numAssociations = 0;
|
||||||
|
if (animBlock->numAnims > 0)
|
||||||
|
{
|
||||||
|
int i, j;
|
||||||
|
for (i = 0; i < animBlock->numAnims; i++) {
|
||||||
|
int animId = -1;
|
||||||
|
for (j = 0; j != animBlock->numAnims; j++)
|
||||||
|
if (strcmp(CAnimManager::GetAnimation(i + animBlock->firstIndex)->name, animNames + numChars * j) == 0)
|
||||||
|
animId = j;
|
||||||
|
|
||||||
|
if (animId != -1) {
|
||||||
|
CBaseModelInfo* minfo = GetModelFromName(objectNames + numChars * animId);
|
||||||
|
if (minfo)
|
||||||
|
{
|
||||||
|
RpClump* clump = (RpClump*)minfo->CreateInstance();
|
||||||
|
RpAnimBlendClumpInit(clump);
|
||||||
|
assocList[numAssociations].Init(clump, CAnimManager::GetAnimation(i + animBlock->firstIndex));
|
||||||
|
if (IsClumpSkinned(clump))
|
||||||
|
RpClumpForAllAtomics(clump, AtomicRemoveAnimFromSkinCB, nil);
|
||||||
|
RpClumpDestroy(clump);
|
||||||
|
assocList[numAssociations].animId = i + numAssociations;
|
||||||
|
assocList[numAssociations++].groupId = groupId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +1,16 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
class CAnimBlendAssociation;
|
class CAnimBlendAssociation;
|
||||||
|
struct CAnimBlock;
|
||||||
|
|
||||||
class CAnimBlendAssocGroup
|
class CAnimBlendAssocGroup
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
CAnimBlock *animBlock;
|
||||||
CAnimBlendAssociation *assocList;
|
CAnimBlendAssociation *assocList;
|
||||||
int32 numAssociations;
|
int32 numAssociations;
|
||||||
|
int32 firstAnimId;
|
||||||
|
int32 groupId; // id of self in ms_aAnimAssocGroups
|
||||||
|
|
||||||
CAnimBlendAssocGroup(void);
|
CAnimBlendAssocGroup(void);
|
||||||
~CAnimBlendAssocGroup(void);
|
~CAnimBlendAssocGroup(void);
|
||||||
@@ -17,4 +21,5 @@ public:
|
|||||||
CAnimBlendAssociation *CopyAnimation(const char *name);
|
CAnimBlendAssociation *CopyAnimation(const char *name);
|
||||||
void CreateAssociations(const char *name);
|
void CreateAssociations(const char *name);
|
||||||
void CreateAssociations(const char *blockName, RpClump *clump, const char **animNames, int numAssocs);
|
void CreateAssociations(const char *blockName, RpClump *clump, const char **animNames, int numAssocs);
|
||||||
|
void CreateAssociations(const char *blockName, const char *animNames, const char *objectNames, int numChars);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
CAnimBlendAssociation::CAnimBlendAssociation(void)
|
CAnimBlendAssociation::CAnimBlendAssociation(void)
|
||||||
{
|
{
|
||||||
|
groupId = -1;
|
||||||
nodes = nil;
|
nodes = nil;
|
||||||
blendAmount = 1.0f;
|
blendAmount = 1.0f;
|
||||||
blendDelta = 0.0f;
|
blendDelta = 0.0f;
|
||||||
@@ -54,8 +55,8 @@ CAnimBlendAssociation::AllocateAnimBlendNodeArray(int n)
|
|||||||
void
|
void
|
||||||
CAnimBlendAssociation::FreeAnimBlendNodeArray(void)
|
CAnimBlendAssociation::FreeAnimBlendNodeArray(void)
|
||||||
{
|
{
|
||||||
assert(nodes != nil);
|
if(nodes)
|
||||||
RwFreeAlign(nodes);
|
RwFreeAlign(nodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -75,7 +76,10 @@ CAnimBlendAssociation::Init(RpClump *clump, CAnimBlendHierarchy *hier)
|
|||||||
// NB: This is where the order of nodes is defined
|
// NB: This is where the order of nodes is defined
|
||||||
for(i = 0; i < hier->numSequences; i++){
|
for(i = 0; i < hier->numSequences; i++){
|
||||||
CAnimBlendSequence *seq = &hier->sequences[i];
|
CAnimBlendSequence *seq = &hier->sequences[i];
|
||||||
frame = RpAnimBlendClumpFindFrame(clump, seq->name);
|
if(seq->boneTag == -1)
|
||||||
|
frame = RpAnimBlendClumpFindFrame(clump, seq->name);
|
||||||
|
else
|
||||||
|
frame = RpAnimBlendClumpFindBone(clump, seq->boneTag);
|
||||||
if(frame && seq->numFrames > 0)
|
if(frame && seq->numFrames > 0)
|
||||||
nodes[frame - clumpData->frames].sequence = seq;
|
nodes[frame - clumpData->frames].sequence = seq;
|
||||||
}
|
}
|
||||||
@@ -90,6 +94,7 @@ CAnimBlendAssociation::Init(CAnimBlendAssociation &assoc)
|
|||||||
numNodes = assoc.numNodes;
|
numNodes = assoc.numNodes;
|
||||||
flags = assoc.flags;
|
flags = assoc.flags;
|
||||||
animId = assoc.animId;
|
animId = assoc.animId;
|
||||||
|
groupId = assoc.groupId;
|
||||||
AllocateAnimBlendNodeArray(numNodes);
|
AllocateAnimBlendNodeArray(numNodes);
|
||||||
for(i = 0; i < numNodes; i++){
|
for(i = 0; i < numNodes; i++){
|
||||||
nodes[i] = assoc.nodes[i];
|
nodes[i] = assoc.nodes[i];
|
||||||
@@ -126,12 +131,25 @@ CAnimBlendAssociation::SetCurrentTime(float time)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(currentTime = time; currentTime >= hierarchy->totalLength; currentTime -= hierarchy->totalLength)
|
for(currentTime = time; currentTime >= hierarchy->totalLength; currentTime -= hierarchy->totalLength)
|
||||||
if(!IsRepeating())
|
if (!IsRepeating()) {
|
||||||
return;
|
currentTime = hierarchy->totalLength;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
CAnimManager::UncompressAnimation(hierarchy);
|
CAnimManager::UncompressAnimation(hierarchy);
|
||||||
for(i = 0; i < numNodes; i++)
|
#ifdef ANIM_COMPRESSION
|
||||||
if(nodes[i].sequence)
|
// strangely PC has this but android doesn't
|
||||||
nodes[i].FindKeyFrame(currentTime);
|
if(hierarchy->keepCompressed){
|
||||||
|
for(i = 0; i < numNodes; i++)
|
||||||
|
if(nodes[i].sequence)
|
||||||
|
nodes[i].SetupKeyFrameCompressed();
|
||||||
|
}else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
for(i = 0; i < numNodes; i++)
|
||||||
|
if(nodes[i].sequence)
|
||||||
|
nodes[i].FindKeyFrame(currentTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -147,13 +165,23 @@ CAnimBlendAssociation::Start(float time)
|
|||||||
SetCurrentTime(time);
|
SetCurrentTime(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CAnimBlendAssociation::UpdateTimeStep(float timeDelta, float relSpeed)
|
||||||
|
{
|
||||||
|
if(IsRunning())
|
||||||
|
timeStep = (flags & ASSOC_MOVEMENT ? relSpeed*hierarchy->totalLength : speed) * timeDelta;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CAnimBlendAssociation::UpdateTime(float timeDelta, float relSpeed)
|
CAnimBlendAssociation::UpdateTime(float timeDelta, float relSpeed)
|
||||||
{
|
{
|
||||||
if(!IsRunning())
|
if(!IsRunning())
|
||||||
return true;
|
return true;
|
||||||
|
if(currentTime >= hierarchy->totalLength){
|
||||||
|
flags &= ~ASSOC_RUNNING;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
timeStep = (flags & ASSOC_MOVEMENT ? relSpeed*hierarchy->totalLength : speed) * timeDelta;
|
|
||||||
currentTime += timeStep;
|
currentTime += timeStep;
|
||||||
|
|
||||||
if(currentTime >= hierarchy->totalLength){
|
if(currentTime >= hierarchy->totalLength){
|
||||||
@@ -163,7 +191,6 @@ CAnimBlendAssociation::UpdateTime(float timeDelta, float relSpeed)
|
|||||||
currentTime -= hierarchy->totalLength;
|
currentTime -= hierarchy->totalLength;
|
||||||
else{
|
else{
|
||||||
currentTime = hierarchy->totalLength;
|
currentTime = hierarchy->totalLength;
|
||||||
flags &= ~ASSOC_RUNNING;
|
|
||||||
if(flags & ASSOC_FADEOUTWHENDONE){
|
if(flags & ASSOC_FADEOUTWHENDONE){
|
||||||
flags |= ASSOC_DELETEFADEDOUT;
|
flags |= ASSOC_DELETEFADEDOUT;
|
||||||
blendDelta = -4.0f;
|
blendDelta = -4.0f;
|
||||||
|
|||||||
@@ -12,12 +12,13 @@ enum {
|
|||||||
ASSOC_PARTIAL = 0x10,
|
ASSOC_PARTIAL = 0x10,
|
||||||
ASSOC_MOVEMENT = 0x20, // ???
|
ASSOC_MOVEMENT = 0x20, // ???
|
||||||
ASSOC_HAS_TRANSLATION = 0x40,
|
ASSOC_HAS_TRANSLATION = 0x40,
|
||||||
ASSOC_WALK = 0x80, // for CPed::PlayFootSteps(void)
|
ASSOC_HAS_X_TRANSLATION = 0x80, // for 2d velocity extraction
|
||||||
ASSOC_IDLE = 0x100, // only used by xpress scratch, see CPed::Chat(void)
|
ASSOC_WALK = 0x100, // for CPed::PlayFootSteps(void)
|
||||||
ASSOC_NOWALK = 0x200, // see CPed::PlayFootSteps(void)
|
ASSOC_IDLE = 0x200, // only xpress scratch has it by default, but game adds it to player's idle animations later
|
||||||
ASSOC_BLOCK = 0x400, // unused in assoc description, blocks other anims from being played
|
ASSOC_NOWALK = 0x400, // see CPed::PlayFootSteps(void)
|
||||||
ASSOC_FRONTAL = 0x800, // anims that we fall to front
|
ASSOC_BLOCK = 0x800, // unused in assoc description, blocks other anims from being played
|
||||||
ASSOC_HAS_X_TRANSLATION = 0x1000, // for 2d velocity extraction
|
ASSOC_FRONTAL = 0x1000, // anims that we fall to front
|
||||||
|
ASSOC_DRIVING = 0x2000, // new in VC
|
||||||
};
|
};
|
||||||
|
|
||||||
// Anim hierarchy associated with a clump
|
// Anim hierarchy associated with a clump
|
||||||
@@ -35,7 +36,8 @@ public:
|
|||||||
|
|
||||||
CAnimBlendLink link;
|
CAnimBlendLink link;
|
||||||
|
|
||||||
int numNodes; // taken from CAnimBlendClumpData::numFrames
|
int16 numNodes; // taken from CAnimBlendClumpData::numFrames
|
||||||
|
int16 groupId; // ID of CAnimBlendAssocGroup this is in
|
||||||
// NB: Order of these depends on order of nodes in Clump this was built from
|
// NB: Order of these depends on order of nodes in Clump this was built from
|
||||||
CAnimBlendNode *nodes;
|
CAnimBlendNode *nodes;
|
||||||
CAnimBlendHierarchy *hierarchy;
|
CAnimBlendHierarchy *hierarchy;
|
||||||
@@ -44,8 +46,8 @@ public:
|
|||||||
float currentTime;
|
float currentTime;
|
||||||
float speed;
|
float speed;
|
||||||
float timeStep;
|
float timeStep;
|
||||||
int32 animId;
|
int16 animId;
|
||||||
int32 flags;
|
int16 flags;
|
||||||
int32 callbackType;
|
int32 callbackType;
|
||||||
void (*callback)(CAnimBlendAssociation*, void*);
|
void (*callback)(CAnimBlendAssociation*, void*);
|
||||||
void *callbackArg;
|
void *callbackArg;
|
||||||
@@ -76,16 +78,16 @@ public:
|
|||||||
void SetCurrentTime(float time);
|
void SetCurrentTime(float time);
|
||||||
void SyncAnimation(CAnimBlendAssociation *other);
|
void SyncAnimation(CAnimBlendAssociation *other);
|
||||||
void Start(float time);
|
void Start(float time);
|
||||||
|
void UpdateTimeStep(float timeDelta, float relSpeed);
|
||||||
bool UpdateTime(float timeDelta, float relSpeed);
|
bool UpdateTime(float timeDelta, float relSpeed);
|
||||||
bool UpdateBlend(float timeDelta);
|
bool UpdateBlend(float timeDelta);
|
||||||
|
|
||||||
void SetRun(void) { flags |= ASSOC_RUNNING; }
|
void SetRun(void) { flags |= ASSOC_RUNNING; }
|
||||||
|
|
||||||
inline float GetTimeLeft() { return hierarchy->totalLength - currentTime; }
|
float GetTimeLeft() { return hierarchy->totalLength - currentTime; }
|
||||||
|
float GetProgress() { return currentTime / hierarchy->totalLength; }
|
||||||
|
|
||||||
static CAnimBlendAssociation *FromLink(CAnimBlendLink *l) {
|
static CAnimBlendAssociation *FromLink(CAnimBlendLink *l) {
|
||||||
return (CAnimBlendAssociation*)((uint8*)l - offsetof(CAnimBlendAssociation, link));
|
return (CAnimBlendAssociation*)((uint8*)l - offsetof(CAnimBlendAssociation, link));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(CAnimBlendAssociation, 0x40);
|
|
||||||
|
|||||||
@@ -3,11 +3,10 @@
|
|||||||
#include "AnimBlendClumpData.h"
|
#include "AnimBlendClumpData.h"
|
||||||
#include "MemoryMgr.h"
|
#include "MemoryMgr.h"
|
||||||
|
|
||||||
|
|
||||||
CAnimBlendClumpData::CAnimBlendClumpData(void)
|
CAnimBlendClumpData::CAnimBlendClumpData(void)
|
||||||
{
|
{
|
||||||
numFrames = 0;
|
numFrames = 0;
|
||||||
velocity = nil;
|
velocity2d = nil;
|
||||||
frames = nil;
|
frames = nil;
|
||||||
link.Init();
|
link.Init();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
#include "AnimBlendList.h"
|
#include "AnimBlendList.h"
|
||||||
|
|
||||||
|
|
||||||
// TODO: put somewhere else
|
|
||||||
struct AnimBlendFrameData
|
struct AnimBlendFrameData
|
||||||
{
|
{
|
||||||
enum {
|
enum {
|
||||||
@@ -11,23 +10,19 @@ struct AnimBlendFrameData
|
|||||||
IGNORE_TRANSLATION = 4,
|
IGNORE_TRANSLATION = 4,
|
||||||
VELOCITY_EXTRACTION = 8,
|
VELOCITY_EXTRACTION = 8,
|
||||||
VELOCITY_EXTRACTION_3D = 0x10,
|
VELOCITY_EXTRACTION_3D = 0x10,
|
||||||
|
UPDATE_KEYFRAMES = 0x20,
|
||||||
|
COMPRESSED = 0x40
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8 flag;
|
uint8 flag;
|
||||||
RwV3d resetPos;
|
RwV3d resetPos;
|
||||||
#ifdef PED_SKIN
|
|
||||||
union {
|
union {
|
||||||
RwFrame *frame;
|
RwFrame *frame;
|
||||||
RpHAnimStdInterpFrame *hanimFrame;
|
RpHAnimStdInterpFrame *hanimFrame;
|
||||||
};
|
};
|
||||||
int32 nodeID;
|
int32 nodeID;
|
||||||
#else
|
|
||||||
RwFrame *frame;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
#ifndef PED_SKIN
|
VALIDATE_SIZE(AnimBlendFrameData, 0x18);
|
||||||
VALIDATE_SIZE(AnimBlendFrameData, 0x14);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
class CAnimBlendClumpData
|
class CAnimBlendClumpData
|
||||||
@@ -35,21 +30,16 @@ class CAnimBlendClumpData
|
|||||||
public:
|
public:
|
||||||
CAnimBlendLink link;
|
CAnimBlendLink link;
|
||||||
int32 numFrames;
|
int32 numFrames;
|
||||||
#ifdef PED_SKIN
|
union {
|
||||||
int32 modelNumber; // doesn't seem to be used
|
CVector2D *velocity2d;
|
||||||
#endif
|
CVector *velocity3d;
|
||||||
CVector *velocity;
|
};
|
||||||
// order of frames is determined by RW hierarchy
|
// order of frames is determined by RW hierarchy
|
||||||
AnimBlendFrameData *frames;
|
AnimBlendFrameData *frames;
|
||||||
|
|
||||||
CAnimBlendClumpData(void);
|
CAnimBlendClumpData(void);
|
||||||
~CAnimBlendClumpData(void);
|
~CAnimBlendClumpData(void);
|
||||||
void SetNumberOfFrames(int n);
|
void SetNumberOfFrames(int n);
|
||||||
#ifdef PED_SKIN
|
|
||||||
void SetNumberOfBones(int n) { SetNumberOfFrames(n); }
|
void SetNumberOfBones(int n) { SetNumberOfFrames(n); }
|
||||||
#endif
|
|
||||||
void ForAllFrames(void (*cb)(AnimBlendFrameData*, void*), void *arg);
|
void ForAllFrames(void (*cb)(AnimBlendFrameData*, void*), void *arg);
|
||||||
};
|
};
|
||||||
#ifndef PED_SKIN
|
|
||||||
VALIDATE_SIZE(CAnimBlendClumpData, 0x14);
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "AnimBlendSequence.h"
|
#include "AnimBlendSequence.h"
|
||||||
#include "AnimBlendHierarchy.h"
|
#include "AnimBlendHierarchy.h"
|
||||||
|
#include "AnimManager.h"
|
||||||
|
|
||||||
CAnimBlendHierarchy::CAnimBlendHierarchy(void)
|
CAnimBlendHierarchy::CAnimBlendHierarchy(void)
|
||||||
{
|
{
|
||||||
@@ -15,9 +16,10 @@ CAnimBlendHierarchy::CAnimBlendHierarchy(void)
|
|||||||
void
|
void
|
||||||
CAnimBlendHierarchy::Shutdown(void)
|
CAnimBlendHierarchy::Shutdown(void)
|
||||||
{
|
{
|
||||||
|
CAnimManager::RemoveFromUncompressedCache(this);
|
||||||
RemoveAnimSequences();
|
RemoveAnimSequences();
|
||||||
|
totalLength = 0.0f;
|
||||||
compressed = 0;
|
compressed = 0;
|
||||||
linkPtr = nil;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -30,13 +32,43 @@ void
|
|||||||
CAnimBlendHierarchy::CalcTotalTime(void)
|
CAnimBlendHierarchy::CalcTotalTime(void)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
totalLength = 0.0f;
|
totalLength = 0.0f;
|
||||||
|
|
||||||
for(i = 0; i < numSequences; i++){
|
for(i = 0; i < numSequences; i++){
|
||||||
float seqTime = 0.0f;
|
#ifdef FIX_BUGS
|
||||||
for(j = 0; j < sequences[i].numFrames; j++)
|
if(sequences[i].numFrames == 0)
|
||||||
seqTime += sequences[i].GetKeyFrame(j)->deltaTime;
|
continue;
|
||||||
totalLength = Max(totalLength, seqTime);
|
#endif
|
||||||
|
|
||||||
|
totalLength = Max(totalLength, sequences[i].GetKeyFrame(sequences[i].numFrames-1)->deltaTime);
|
||||||
|
for(j = sequences[i].numFrames-1; j >= 1; j--){
|
||||||
|
KeyFrame *kf1 = sequences[i].GetKeyFrame(j);
|
||||||
|
KeyFrame *kf2 = sequences[i].GetKeyFrame(j-1);
|
||||||
|
kf1->deltaTime -= kf2->deltaTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CAnimBlendHierarchy::CalcTotalTimeCompressed(void)
|
||||||
|
{
|
||||||
|
int i, j;
|
||||||
|
|
||||||
|
totalLength = 0.0f;
|
||||||
|
|
||||||
|
for(i = 0; i < numSequences; i++){
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
if(sequences[i].numFrames == 0)
|
||||||
|
continue;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
totalLength = Max(totalLength, sequences[i].GetKeyFrameCompressed(sequences[i].numFrames-1)->GetDeltaTime());
|
||||||
|
for(j = sequences[i].numFrames-1; j >= 1; j--){
|
||||||
|
KeyFrameCompressed *kf1 = sequences[i].GetKeyFrameCompressed(j);
|
||||||
|
KeyFrameCompressed *kf2 = sequences[i].GetKeyFrameCompressed(j-1);
|
||||||
|
kf1->deltaTime -= kf2->deltaTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,6 +85,7 @@ void
|
|||||||
CAnimBlendHierarchy::RemoveAnimSequences(void)
|
CAnimBlendHierarchy::RemoveAnimSequences(void)
|
||||||
{
|
{
|
||||||
delete[] sequences;
|
delete[] sequences;
|
||||||
|
sequences = nil;
|
||||||
numSequences = 0;
|
numSequences = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,9 +98,11 @@ CAnimBlendHierarchy::Uncompress(void)
|
|||||||
for(i = 0; i < numSequences; i++)
|
for(i = 0; i < numSequences; i++)
|
||||||
sequences[i].Uncompress();
|
sequences[i].Uncompress();
|
||||||
#endif
|
#endif
|
||||||
if(totalLength == 0.0f)
|
|
||||||
CalcTotalTime();
|
|
||||||
compressed = 0;
|
compressed = 0;
|
||||||
|
if(totalLength == 0.0f){
|
||||||
|
RemoveQuaternionFlips();
|
||||||
|
CalcTotalTime();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ public:
|
|||||||
char name[24];
|
char name[24];
|
||||||
CAnimBlendSequence *sequences;
|
CAnimBlendSequence *sequences;
|
||||||
int16 numSequences;
|
int16 numSequences;
|
||||||
int16 compressed;
|
bool compressed;
|
||||||
|
bool keepCompressed;
|
||||||
float totalLength;
|
float totalLength;
|
||||||
CLink<CAnimBlendHierarchy*> *linkPtr;
|
CLink<CAnimBlendHierarchy*> *linkPtr;
|
||||||
|
|
||||||
@@ -23,11 +24,13 @@ public:
|
|||||||
void Shutdown(void);
|
void Shutdown(void);
|
||||||
void SetName(char *name);
|
void SetName(char *name);
|
||||||
void CalcTotalTime(void);
|
void CalcTotalTime(void);
|
||||||
|
void CalcTotalTimeCompressed(void);
|
||||||
void RemoveQuaternionFlips(void);
|
void RemoveQuaternionFlips(void);
|
||||||
void RemoveAnimSequences(void);
|
void RemoveAnimSequences(void);
|
||||||
void Uncompress(void);
|
void Uncompress(void);
|
||||||
void RemoveUncompressedData(void);
|
void RemoveUncompressedData(void);
|
||||||
void MoveMemory(bool onlyone = false);
|
void MoveMemory(bool onlyone = false);
|
||||||
|
bool IsCompressed() { return !!compressed; };
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(CAnimBlendHierarchy, 0x28);
|
VALIDATE_SIZE(CAnimBlendHierarchy, 0x28);
|
||||||
@@ -45,6 +45,44 @@ CAnimBlendNode::Update(CVector &trans, CQuaternion &rot, float weight)
|
|||||||
return looped;
|
return looped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
CAnimBlendNode::UpdateCompressed(CVector &trans, CQuaternion &rot, float weight)
|
||||||
|
{
|
||||||
|
bool looped = false;
|
||||||
|
|
||||||
|
trans = CVector(0.0f, 0.0f, 0.0f);
|
||||||
|
rot = CQuaternion(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
|
|
||||||
|
if(association->IsRunning()){
|
||||||
|
remainingTime -= association->timeStep;
|
||||||
|
if(remainingTime <= 0.0f)
|
||||||
|
looped = NextKeyFrameCompressed();
|
||||||
|
}
|
||||||
|
|
||||||
|
float blend = association->GetBlendAmount(weight);
|
||||||
|
if(blend > 0.0f){
|
||||||
|
KeyFrameTransCompressed *kfA = (KeyFrameTransCompressed*)sequence->GetKeyFrameCompressed(frameA);
|
||||||
|
KeyFrameTransCompressed *kfB = (KeyFrameTransCompressed*)sequence->GetKeyFrameCompressed(frameB);
|
||||||
|
float t = kfA->deltaTime == 0 ? 0.0f : (kfA->GetDeltaTime() - remainingTime)/kfA->GetDeltaTime();
|
||||||
|
if(sequence->type & CAnimBlendSequence::KF_TRANS){
|
||||||
|
CVector transA, transB;
|
||||||
|
kfA->GetTranslation(&transA);
|
||||||
|
kfB->GetTranslation(&transB);
|
||||||
|
trans = transB + t*(transA - transB);
|
||||||
|
trans *= blend;
|
||||||
|
}
|
||||||
|
if(sequence->type & CAnimBlendSequence::KF_ROT){
|
||||||
|
CQuaternion rotA, rotB;
|
||||||
|
kfA->GetRotation(&rotA);
|
||||||
|
kfB->GetRotation(&rotB);
|
||||||
|
rot.Slerp(rotB, rotA, theta, invSin, t);
|
||||||
|
rot *= blend;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return looped;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CAnimBlendNode::NextKeyFrame(void)
|
CAnimBlendNode::NextKeyFrame(void)
|
||||||
{
|
{
|
||||||
@@ -82,6 +120,43 @@ CAnimBlendNode::NextKeyFrame(void)
|
|||||||
return looped;
|
return looped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
CAnimBlendNode::NextKeyFrameCompressed(void)
|
||||||
|
{
|
||||||
|
bool looped;
|
||||||
|
|
||||||
|
if(sequence->numFrames <= 1)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
looped = false;
|
||||||
|
frameB = frameA;
|
||||||
|
|
||||||
|
// Advance as long as we have to
|
||||||
|
while(remainingTime <= 0.0f){
|
||||||
|
frameA++;
|
||||||
|
|
||||||
|
if(frameA >= sequence->numFrames){
|
||||||
|
// reached end of animation
|
||||||
|
if(!association->IsRepeating()){
|
||||||
|
frameA--;
|
||||||
|
remainingTime = 0.0f;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
looped = true;
|
||||||
|
frameA = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
remainingTime += sequence->GetKeyFrameCompressed(frameA)->GetDeltaTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
frameB = frameA - 1;
|
||||||
|
if(frameB < 0)
|
||||||
|
frameB += sequence->numFrames;
|
||||||
|
|
||||||
|
CalcDeltasCompressed();
|
||||||
|
return looped;
|
||||||
|
}
|
||||||
|
|
||||||
// Set animation to time t
|
// Set animation to time t
|
||||||
bool
|
bool
|
||||||
CAnimBlendNode::FindKeyFrame(float t)
|
CAnimBlendNode::FindKeyFrame(float t)
|
||||||
@@ -92,20 +167,22 @@ CAnimBlendNode::FindKeyFrame(float t)
|
|||||||
frameA = 0;
|
frameA = 0;
|
||||||
frameB = frameA;
|
frameB = frameA;
|
||||||
|
|
||||||
if(sequence->numFrames >= 2){
|
if(sequence->numFrames == 1){
|
||||||
frameA++;
|
remainingTime = 0.0f;
|
||||||
|
}else{
|
||||||
// advance until t is between frameB and frameA
|
// advance until t is between frameB and frameA
|
||||||
while(t > sequence->GetKeyFrame(frameA)->deltaTime){
|
while (t > sequence->GetKeyFrame(++frameA)->deltaTime) {
|
||||||
t -= sequence->GetKeyFrame(frameA)->deltaTime;
|
t -= sequence->GetKeyFrame(frameA)->deltaTime;
|
||||||
frameB = frameA++;
|
if (frameA + 1 >= sequence->numFrames) {
|
||||||
if(frameA >= sequence->numFrames){
|
|
||||||
// reached end of animation
|
// reached end of animation
|
||||||
if(!association->IsRepeating())
|
if (!association->IsRepeating()) {
|
||||||
|
CalcDeltas();
|
||||||
|
remainingTime = 0.0f;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
frameA = 0;
|
frameA = 0;
|
||||||
frameB = 0;
|
|
||||||
}
|
}
|
||||||
|
frameB = frameA;
|
||||||
}
|
}
|
||||||
|
|
||||||
remainingTime = sequence->GetKeyFrame(frameA)->deltaTime - t;
|
remainingTime = sequence->GetKeyFrame(frameA)->deltaTime - t;
|
||||||
@@ -115,6 +192,25 @@ CAnimBlendNode::FindKeyFrame(float t)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
CAnimBlendNode::SetupKeyFrameCompressed(void)
|
||||||
|
{
|
||||||
|
if(sequence->numFrames < 1)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
frameA = 1;
|
||||||
|
frameB = 0;
|
||||||
|
|
||||||
|
if(sequence->numFrames == 1){
|
||||||
|
frameA = 0;
|
||||||
|
remainingTime = 0.0f;
|
||||||
|
}else
|
||||||
|
remainingTime = sequence->GetKeyFrameCompressed(frameA)->GetDeltaTime();
|
||||||
|
|
||||||
|
CalcDeltasCompressed();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CAnimBlendNode::CalcDeltas(void)
|
CAnimBlendNode::CalcDeltas(void)
|
||||||
{
|
{
|
||||||
@@ -129,6 +225,28 @@ CAnimBlendNode::CalcDeltas(void)
|
|||||||
invSin = theta == 0.0f ? 0.0f : 1.0f/Sin(theta);
|
invSin = theta == 0.0f ? 0.0f : 1.0f/Sin(theta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CAnimBlendNode::CalcDeltasCompressed(void)
|
||||||
|
{
|
||||||
|
if((sequence->type & CAnimBlendSequence::KF_ROT) == 0)
|
||||||
|
return;
|
||||||
|
KeyFrameCompressed *kfA = sequence->GetKeyFrameCompressed(frameA);
|
||||||
|
KeyFrameCompressed *kfB = sequence->GetKeyFrameCompressed(frameB);
|
||||||
|
CQuaternion rotA, rotB;
|
||||||
|
kfA->GetRotation(&rotA);
|
||||||
|
kfB->GetRotation(&rotB);
|
||||||
|
float cos = DotProduct(rotA, rotB);
|
||||||
|
if(cos < 0.0f){
|
||||||
|
rotB *= -1.0f;
|
||||||
|
kfB->SetRotation(rotB);
|
||||||
|
}
|
||||||
|
cos = DotProduct(rotA, rotB);
|
||||||
|
if(cos > 1.0f)
|
||||||
|
cos = 1.0f;
|
||||||
|
theta = Acos(cos);
|
||||||
|
invSin = theta == 0.0f ? 0.0f : 1.0f/Sin(theta);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CAnimBlendNode::GetCurrentTranslation(CVector &trans, float weight)
|
CAnimBlendNode::GetCurrentTranslation(CVector &trans, float weight)
|
||||||
{
|
{
|
||||||
@@ -138,7 +256,7 @@ CAnimBlendNode::GetCurrentTranslation(CVector &trans, float weight)
|
|||||||
if(blend > 0.0f){
|
if(blend > 0.0f){
|
||||||
KeyFrameTrans *kfA = (KeyFrameTrans*)sequence->GetKeyFrame(frameA);
|
KeyFrameTrans *kfA = (KeyFrameTrans*)sequence->GetKeyFrame(frameA);
|
||||||
KeyFrameTrans *kfB = (KeyFrameTrans*)sequence->GetKeyFrame(frameB);
|
KeyFrameTrans *kfB = (KeyFrameTrans*)sequence->GetKeyFrame(frameB);
|
||||||
float t = (kfA->deltaTime - remainingTime)/kfA->deltaTime;
|
float t = kfA->deltaTime == 0.0f ? 0.0f : (kfA->deltaTime - remainingTime)/kfA->deltaTime;
|
||||||
if(sequence->type & CAnimBlendSequence::KF_TRANS){
|
if(sequence->type & CAnimBlendSequence::KF_TRANS){
|
||||||
trans = kfB->translation + t*(kfA->translation - kfB->translation);
|
trans = kfB->translation + t*(kfA->translation - kfB->translation);
|
||||||
trans *= blend;
|
trans *= blend;
|
||||||
@@ -146,6 +264,26 @@ CAnimBlendNode::GetCurrentTranslation(CVector &trans, float weight)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CAnimBlendNode::GetCurrentTranslationCompressed(CVector &trans, float weight)
|
||||||
|
{
|
||||||
|
trans = CVector(0.0f, 0.0f, 0.0f);
|
||||||
|
|
||||||
|
float blend = association->GetBlendAmount(weight);
|
||||||
|
if(blend > 0.0f){
|
||||||
|
KeyFrameTransCompressed *kfA = (KeyFrameTransCompressed*)sequence->GetKeyFrameCompressed(frameA);
|
||||||
|
KeyFrameTransCompressed *kfB = (KeyFrameTransCompressed*)sequence->GetKeyFrameCompressed(frameB);
|
||||||
|
float t = kfA->deltaTime == 0 ? 0.0f : (kfA->GetDeltaTime() - remainingTime)/kfA->GetDeltaTime();
|
||||||
|
if(sequence->type & CAnimBlendSequence::KF_TRANS){
|
||||||
|
CVector transA, transB;
|
||||||
|
kfA->GetTranslation(&transA);
|
||||||
|
kfB->GetTranslation(&transB);
|
||||||
|
trans = transB + t*(transA - transB);
|
||||||
|
trans *= blend;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CAnimBlendNode::GetEndTranslation(CVector &trans, float weight)
|
CAnimBlendNode::GetEndTranslation(CVector &trans, float weight)
|
||||||
{
|
{
|
||||||
@@ -158,3 +296,19 @@ CAnimBlendNode::GetEndTranslation(CVector &trans, float weight)
|
|||||||
trans = kf->translation * blend;
|
trans = kf->translation * blend;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CAnimBlendNode::GetEndTranslationCompressed(CVector &trans, float weight)
|
||||||
|
{
|
||||||
|
trans = CVector(0.0f, 0.0f, 0.0f);
|
||||||
|
|
||||||
|
float blend = association->GetBlendAmount(weight);
|
||||||
|
if(blend > 0.0f){
|
||||||
|
KeyFrameTransCompressed *kf = (KeyFrameTransCompressed*)sequence->GetKeyFrameCompressed(sequence->numFrames-1);
|
||||||
|
if(sequence->type & CAnimBlendSequence::KF_TRANS){
|
||||||
|
CVector pos;
|
||||||
|
kf->GetTranslation(&pos);
|
||||||
|
trans = pos * blend;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -20,11 +20,17 @@ public:
|
|||||||
|
|
||||||
void Init(void);
|
void Init(void);
|
||||||
bool Update(CVector &trans, CQuaternion &rot, float weight);
|
bool Update(CVector &trans, CQuaternion &rot, float weight);
|
||||||
|
bool UpdateCompressed(CVector &trans, CQuaternion &rot, float weight);
|
||||||
bool NextKeyFrame(void);
|
bool NextKeyFrame(void);
|
||||||
|
bool NextKeyFrameCompressed(void);
|
||||||
bool FindKeyFrame(float t);
|
bool FindKeyFrame(float t);
|
||||||
|
bool SetupKeyFrameCompressed(void);
|
||||||
void CalcDeltas(void);
|
void CalcDeltas(void);
|
||||||
|
void CalcDeltasCompressed(void);
|
||||||
void GetCurrentTranslation(CVector &trans, float weight);
|
void GetCurrentTranslation(CVector &trans, float weight);
|
||||||
|
void GetCurrentTranslationCompressed(CVector &trans, float weight);
|
||||||
void GetEndTranslation(CVector &trans, float weight);
|
void GetEndTranslation(CVector &trans, float weight);
|
||||||
|
void GetEndTranslationCompressed(CVector &trans, float weight);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,7 @@ CAnimBlendSequence::CAnimBlendSequence(void)
|
|||||||
numFrames = 0;
|
numFrames = 0;
|
||||||
keyFrames = nil;
|
keyFrames = nil;
|
||||||
keyFramesCompressed = nil;
|
keyFramesCompressed = nil;
|
||||||
#ifdef PED_SKIN
|
|
||||||
boneTag = -1;
|
boneTag = -1;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CAnimBlendSequence::~CAnimBlendSequence(void)
|
CAnimBlendSequence::~CAnimBlendSequence(void)
|
||||||
@@ -29,18 +27,21 @@ CAnimBlendSequence::SetName(char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CAnimBlendSequence::SetNumFrames(int numFrames, bool translation)
|
CAnimBlendSequence::SetNumFrames(int numFrames, bool translation, bool compressed)
|
||||||
{
|
{
|
||||||
int sz;
|
|
||||||
|
|
||||||
if(translation){
|
if(translation){
|
||||||
sz = sizeof(KeyFrameTrans);
|
|
||||||
type |= KF_ROT | KF_TRANS;
|
type |= KF_ROT | KF_TRANS;
|
||||||
|
if(compressed)
|
||||||
|
keyFramesCompressed = RwMalloc(sizeof(KeyFrameTrans) * numFrames);
|
||||||
|
else
|
||||||
|
keyFrames = RwMalloc(sizeof(KeyFrameTrans) * numFrames);
|
||||||
}else{
|
}else{
|
||||||
sz = sizeof(KeyFrame);
|
|
||||||
type |= KF_ROT;
|
type |= KF_ROT;
|
||||||
|
if(compressed)
|
||||||
|
keyFramesCompressed = RwMalloc(sizeof(KeyFrame) * numFrames);
|
||||||
|
else
|
||||||
|
keyFrames = RwMalloc(sizeof(KeyFrame) * numFrames);
|
||||||
}
|
}
|
||||||
keyFrames = RwMalloc(sz * numFrames);
|
|
||||||
this->numFrames = numFrames;
|
this->numFrames = numFrames;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,7 +77,7 @@ CAnimBlendSequence::Uncompress(void)
|
|||||||
|
|
||||||
float rotScale = 1.0f/4096.0f;
|
float rotScale = 1.0f/4096.0f;
|
||||||
float timeScale = 1.0f/60.0f;
|
float timeScale = 1.0f/60.0f;
|
||||||
float transScale = 1.0f/128.0f;
|
float transScale = 1.0f/1024.0f;
|
||||||
if(type & KF_TRANS){
|
if(type & KF_TRANS){
|
||||||
void *newKfs = RwMalloc(numFrames * sizeof(KeyFrameTrans));
|
void *newKfs = RwMalloc(numFrames * sizeof(KeyFrameTrans));
|
||||||
KeyFrameTransCompressed *ckf = (KeyFrameTransCompressed*)keyFramesCompressed;
|
KeyFrameTransCompressed *ckf = (KeyFrameTransCompressed*)keyFramesCompressed;
|
||||||
@@ -129,7 +130,7 @@ CAnimBlendSequence::CompressKeyframes(void)
|
|||||||
|
|
||||||
float rotScale = 4096.0f;
|
float rotScale = 4096.0f;
|
||||||
float timeScale = 60.0f;
|
float timeScale = 60.0f;
|
||||||
float transScale = 128.0f;
|
float transScale = 1024.0f;
|
||||||
if(type & KF_TRANS){
|
if(type & KF_TRANS){
|
||||||
void *newKfs = RwMalloc(numFrames * sizeof(KeyFrameTransCompressed));
|
void *newKfs = RwMalloc(numFrames * sizeof(KeyFrameTransCompressed));
|
||||||
KeyFrameTransCompressed *ckf = (KeyFrameTransCompressed*)newKfs;
|
KeyFrameTransCompressed *ckf = (KeyFrameTransCompressed*)newKfs;
|
||||||
@@ -197,4 +198,3 @@ CAnimBlendSequence::MoveMemory(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,38 @@ struct KeyFrameTrans : KeyFrame {
|
|||||||
struct KeyFrameCompressed {
|
struct KeyFrameCompressed {
|
||||||
int16 rot[4]; // 4096
|
int16 rot[4]; // 4096
|
||||||
int16 deltaTime; // 60
|
int16 deltaTime; // 60
|
||||||
|
|
||||||
|
void GetRotation(CQuaternion *quat){
|
||||||
|
float scale = 1.0f/4096.0f;
|
||||||
|
quat->x = rot[0]*scale;
|
||||||
|
quat->y = rot[1]*scale;
|
||||||
|
quat->z = rot[2]*scale;
|
||||||
|
quat->w = rot[3]*scale;
|
||||||
|
}
|
||||||
|
void SetRotation(const CQuaternion &quat){
|
||||||
|
rot[0] = quat.x * 4096.0f;
|
||||||
|
rot[1] = quat.y * 4096.0f;
|
||||||
|
rot[2] = quat.z * 4096.0f;
|
||||||
|
rot[3] = quat.w * 4096.0f;
|
||||||
|
}
|
||||||
|
float GetDeltaTime(void) { return deltaTime/60.0f; }
|
||||||
|
void SetTime(float t) { deltaTime = t*60.0f + 0.5f; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct KeyFrameTransCompressed : KeyFrameCompressed {
|
struct KeyFrameTransCompressed : KeyFrameCompressed {
|
||||||
int16 trans[3]; // 128
|
int16 trans[3]; // 1024
|
||||||
|
|
||||||
|
void GetTranslation(CVector *vec) {
|
||||||
|
float scale = 1.0f/1024.0f;
|
||||||
|
vec->x = trans[0]*scale;
|
||||||
|
vec->y = trans[1]*scale;
|
||||||
|
vec->z = trans[2]*scale;
|
||||||
|
}
|
||||||
|
void SetTranslation(const CVector &vec){
|
||||||
|
trans[0] = vec.x*1024.0f;
|
||||||
|
trans[1] = vec.y*1024.0f;
|
||||||
|
trans[2] = vec.z*1024.0f;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -37,32 +65,31 @@ public:
|
|||||||
int32 type;
|
int32 type;
|
||||||
char name[24];
|
char name[24];
|
||||||
int32 numFrames;
|
int32 numFrames;
|
||||||
#ifdef PED_SKIN
|
|
||||||
int16 boneTag;
|
int16 boneTag;
|
||||||
#endif
|
|
||||||
void *keyFrames;
|
void *keyFrames;
|
||||||
void *keyFramesCompressed;
|
void *keyFramesCompressed;
|
||||||
|
|
||||||
CAnimBlendSequence(void);
|
CAnimBlendSequence(void);
|
||||||
virtual ~CAnimBlendSequence(void);
|
virtual ~CAnimBlendSequence(void);
|
||||||
void SetName(char *name);
|
void SetName(char *name);
|
||||||
void SetNumFrames(int numFrames, bool translation);
|
void SetNumFrames(int numFrames, bool translation, bool compressed);
|
||||||
void RemoveQuaternionFlips(void);
|
void RemoveQuaternionFlips(void);
|
||||||
KeyFrame *GetKeyFrame(int n) {
|
KeyFrame *GetKeyFrame(int n) {
|
||||||
return type & KF_TRANS ?
|
return type & KF_TRANS ?
|
||||||
&((KeyFrameTrans*)keyFrames)[n] :
|
&((KeyFrameTrans*)keyFrames)[n] :
|
||||||
&((KeyFrame*)keyFrames)[n];
|
&((KeyFrame*)keyFrames)[n];
|
||||||
}
|
}
|
||||||
|
KeyFrameCompressed *GetKeyFrameCompressed(int n) {
|
||||||
|
return type & KF_TRANS ?
|
||||||
|
&((KeyFrameTransCompressed*)keyFramesCompressed)[n] :
|
||||||
|
&((KeyFrameCompressed*)keyFramesCompressed)[n];
|
||||||
|
}
|
||||||
bool HasTranslation(void) { return !!(type & KF_TRANS); }
|
bool HasTranslation(void) { return !!(type & KF_TRANS); }
|
||||||
void Uncompress(void);
|
void Uncompress(void);
|
||||||
void CompressKeyframes(void);
|
void CompressKeyframes(void);
|
||||||
void RemoveUncompressedData(void);
|
void RemoveUncompressedData(void);
|
||||||
bool MoveMemory(void);
|
bool MoveMemory(void);
|
||||||
|
|
||||||
#ifdef PED_SKIN
|
|
||||||
void SetBoneTag(int tag) { boneTag = tag; }
|
void SetBoneTag(int tag) { boneTag = tag; }
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
#ifndef PED_SKIN
|
VALIDATE_SIZE(CAnimBlendSequence, 0x30);
|
||||||
VALIDATE_SIZE(CAnimBlendSequence, 0x2C);
|
|
||||||
#endif
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,24 +6,59 @@
|
|||||||
enum AssocGroupId
|
enum AssocGroupId
|
||||||
{
|
{
|
||||||
ASSOCGRP_STD,
|
ASSOCGRP_STD,
|
||||||
|
ASSOCGRP_VAN,
|
||||||
|
ASSOCGRP_COACH,
|
||||||
|
ASSOCGRP_BIKE_STANDARD,
|
||||||
|
ASSOCGRP_BIKE_VESPA,
|
||||||
|
ASSOCGRP_BIKE_HARLEY,
|
||||||
|
ASSOCGRP_BIKE_DIRT,
|
||||||
|
ASSOCGRP_UNARMED,
|
||||||
|
ASSOCGRP_SCREWDRIVER,
|
||||||
|
ASSOCGRP_KNIFE,
|
||||||
|
ASSOCGRP_BASEBALLBAT,
|
||||||
|
ASSOCGRP_GOLFCLUB,
|
||||||
|
ASSOCGRP_CHAINSAW,
|
||||||
|
ASSOCGRP_PYTHON,
|
||||||
|
ASSOCGRP_COLT,
|
||||||
|
ASSOCGRP_SHOTGUN,
|
||||||
|
ASSOCGRP_BUDDY,
|
||||||
|
ASSOCGRP_TEC,
|
||||||
|
ASSOCGRP_UZI,
|
||||||
|
ASSOCGRP_RIFLE,
|
||||||
|
ASSOCGRP_M60,
|
||||||
|
ASSOCGRP_SNIPER,
|
||||||
|
ASSOCGRP_THROW,
|
||||||
|
ASSOCGRP_FLAMETHROWER,
|
||||||
|
ASSOCGRP_ROCKETLAUNCHER,
|
||||||
|
ASSOCGRP_MEDIC,
|
||||||
|
ASSOCGRP_SUNBATHE,
|
||||||
|
ASSOCGRP_PLAYER_IDLE,
|
||||||
|
ASSOCGRP_RIOT,
|
||||||
|
ASSOCGRP_STRIP,
|
||||||
|
ASSOCGRP_LANCE,
|
||||||
ASSOCGRP_PLAYER,
|
ASSOCGRP_PLAYER,
|
||||||
ASSOCGRP_PLAYERROCKET,
|
ASSOCGRP_PLAYERROCKET,
|
||||||
ASSOCGRP_PLAYER1ARMED,
|
ASSOCGRP_PLAYER1ARMED,
|
||||||
ASSOCGRP_PLAYER2ARMED,
|
ASSOCGRP_PLAYER2ARMED,
|
||||||
ASSOCGRP_PLAYERBBBAT,
|
ASSOCGRP_PLAYERBBBAT,
|
||||||
|
ASSOCGRP_AICHAINSAW,
|
||||||
|
ASSOCGRP_PLAYERCHAINSAW,
|
||||||
ASSOCGRP_SHUFFLE,
|
ASSOCGRP_SHUFFLE,
|
||||||
ASSOCGRP_OLD,
|
ASSOCGRP_OLD,
|
||||||
ASSOCGRP_GANG1,
|
ASSOCGRP_GANG1,
|
||||||
ASSOCGRP_GANG2,
|
ASSOCGRP_GANG2,
|
||||||
ASSOCGRP_FAT,
|
ASSOCGRP_FAT,
|
||||||
ASSOCGRP_OLDFAT,
|
ASSOCGRP_OLDFAT,
|
||||||
|
ASSOCGRP_JOGGER,
|
||||||
ASSOCGRP_WOMAN,
|
ASSOCGRP_WOMAN,
|
||||||
ASSOCGRP_WOMANSHOP,
|
ASSOCGRP_WOMANSHOP,
|
||||||
ASSOCGRP_BUSYWOMAN,
|
ASSOCGRP_BUSYWOMAN,
|
||||||
ASSOCGRP_SEXYWOMAN,
|
ASSOCGRP_SEXYWOMAN,
|
||||||
ASSOCGRP_OLDWOMAN,
|
|
||||||
ASSOCGRP_FATWOMAN,
|
ASSOCGRP_FATWOMAN,
|
||||||
|
ASSOCGRP_OLDWOMAN,
|
||||||
|
ASSOCGRP_JOGWOMAN,
|
||||||
ASSOCGRP_PANICCHUNKY,
|
ASSOCGRP_PANICCHUNKY,
|
||||||
|
ASSOCGRP_SKATE,
|
||||||
#ifdef PC_PLAYER_CONTROLS
|
#ifdef PC_PLAYER_CONTROLS
|
||||||
ASSOCGRP_PLAYERBACK,
|
ASSOCGRP_PLAYERBACK,
|
||||||
ASSOCGRP_PLAYERLEFT,
|
ASSOCGRP_PLAYERLEFT,
|
||||||
@@ -33,17 +68,46 @@ enum AssocGroupId
|
|||||||
ASSOCGRP_ROCKETRIGHT,
|
ASSOCGRP_ROCKETRIGHT,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
ASSOCGRP_MPNOTE,
|
||||||
|
ASSOCGRP_CSMISC,
|
||||||
|
ASSOCGRP_DONH2,
|
||||||
|
ASSOCGRP_DONH3,
|
||||||
|
ASSOCGRP_JDT2,
|
||||||
|
ASSOCGRP_JDT4,
|
||||||
|
ASSOCGRP_JDT5,
|
||||||
|
ASSOCGRP_JDT6,
|
||||||
|
ASSOCGRP_MAR1,
|
||||||
|
ASSOCGRP_MAR2,
|
||||||
|
ASSOCGRP_MAR3,
|
||||||
|
ASSOCGRP_SAL1,
|
||||||
|
ASSOCGRP_SAL2,
|
||||||
|
ASSOCGRP_SAL3,
|
||||||
|
ASSOCGRP_SAL4,
|
||||||
|
ASSOCGRP_SAL6,
|
||||||
|
ASSOCGRP_SAL7,
|
||||||
|
ASSOCGRP_VIC2,
|
||||||
|
ASSOCGRP_VIC3,
|
||||||
|
ASSOCGRP_VIC4,
|
||||||
|
ASSOCGRP_VIC6,
|
||||||
|
ASSOCGRP_TOURIST,
|
||||||
|
ASSOCGRP_MAC2,
|
||||||
|
ASSOCGRP_VIC7,
|
||||||
|
|
||||||
NUM_ANIM_ASSOC_GROUPS
|
NUM_ANIM_ASSOC_GROUPS
|
||||||
};
|
};
|
||||||
|
|
||||||
class CAnimBlendAssociation;
|
class CAnimBlendAssociation;
|
||||||
class CAnimBlendAssocGroup;
|
class CAnimBlendAssocGroup;
|
||||||
|
|
||||||
|
#define MAX_ANIMBLOCK_NAME 20
|
||||||
|
|
||||||
// A block of hierarchies
|
// A block of hierarchies
|
||||||
struct CAnimBlock
|
struct CAnimBlock
|
||||||
{
|
{
|
||||||
char name[24];
|
char name[MAX_ANIMBLOCK_NAME];
|
||||||
int32 firstIndex;
|
bool isLoaded;
|
||||||
|
int16 refCount;
|
||||||
|
int32 firstIndex; // first animtion in ms_aAnimations
|
||||||
int32 numAnims;
|
int32 numAnims;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -77,7 +141,16 @@ public:
|
|||||||
static void Initialise(void);
|
static void Initialise(void);
|
||||||
static void Shutdown(void);
|
static void Shutdown(void);
|
||||||
static void UncompressAnimation(CAnimBlendHierarchy *anim);
|
static void UncompressAnimation(CAnimBlendHierarchy *anim);
|
||||||
|
static void RemoveFromUncompressedCache(CAnimBlendHierarchy *hier);
|
||||||
|
static CAnimBlock *GetAnimationBlock(int32 block) { return &ms_aAnimBlocks[block]; }
|
||||||
static CAnimBlock *GetAnimationBlock(const char *name);
|
static CAnimBlock *GetAnimationBlock(const char *name);
|
||||||
|
static int32 GetAnimationBlockIndex(const char *name);
|
||||||
|
static int32 RegisterAnimBlock(const char *name);
|
||||||
|
static int32 GetNumRefsToAnimBlock(int32 block);
|
||||||
|
static void AddAnimBlockRef(int32 block);
|
||||||
|
static void RemoveAnimBlockRefWithoutDelete(int32 block);
|
||||||
|
static void RemoveAnimBlockRef(int32 block);
|
||||||
|
static void RemoveAnimBlock(int32 block);
|
||||||
static CAnimBlendHierarchy *GetAnimation(const char *name, CAnimBlock *animBlock);
|
static CAnimBlendHierarchy *GetAnimation(const char *name, CAnimBlock *animBlock);
|
||||||
static CAnimBlendHierarchy *GetAnimation(int32 n) { return &ms_aAnimations[n]; }
|
static CAnimBlendHierarchy *GetAnimation(int32 n) { return &ms_aAnimations[n]; }
|
||||||
static const char *GetAnimGroupName(AssocGroupId groupId);
|
static const char *GetAnimGroupName(AssocGroupId groupId);
|
||||||
@@ -89,6 +162,8 @@ public:
|
|||||||
static CAnimBlendAssociation *BlendAnimation(RpClump *clump, AssocGroupId groupId, AnimationId animId, float delta);
|
static CAnimBlendAssociation *BlendAnimation(RpClump *clump, AssocGroupId groupId, AnimationId animId, float delta);
|
||||||
static void LoadAnimFiles(void);
|
static void LoadAnimFiles(void);
|
||||||
static void LoadAnimFile(const char *filename);
|
static void LoadAnimFile(const char *filename);
|
||||||
static void LoadAnimFile(int fd, bool compress);
|
static void LoadAnimFile(RwStream *stream, bool compress, char (*uncompressedAnims)[32] = nil);
|
||||||
|
static void CreateAnimAssocGroups(void);
|
||||||
static void RemoveLastAnimFile(void);
|
static void RemoveLastAnimFile(void);
|
||||||
|
static CAnimBlendAssocGroup* GetAnimAssocGroups(void) { return ms_aAnimAssocGroups; }
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -40,52 +40,33 @@ enum AnimationId
|
|||||||
ANIM_HIT_BACK,
|
ANIM_HIT_BACK,
|
||||||
ANIM_HIT_RIGHT,
|
ANIM_HIT_RIGHT,
|
||||||
ANIM_FLOOR_HIT,
|
ANIM_FLOOR_HIT,
|
||||||
#if GTA_VERSION <= GTA3_PS2_160
|
|
||||||
ANIM_HIT_BODY,
|
|
||||||
#endif
|
|
||||||
ANIM_HIT_BODYBLOW,
|
|
||||||
ANIM_HIT_CHEST,
|
|
||||||
ANIM_HIT_HEAD,
|
|
||||||
ANIM_HIT_WALK,
|
|
||||||
ANIM_HIT_WALL,
|
ANIM_HIT_WALL,
|
||||||
ANIM_FLOOR_HIT_F,
|
ANIM_FLOOR_HIT_F,
|
||||||
ANIM_HIT_BEHIND,
|
ANIM_HIT_BEHIND,
|
||||||
ANIM_PUNCH_R,
|
|
||||||
ANIM_KICK_FLOOR,
|
|
||||||
ANIM_WEAPON_BAT_H,
|
|
||||||
ANIM_WEAPON_BAT_V,
|
|
||||||
ANIM_WEAPON_HGUN_BODY,
|
|
||||||
ANIM_WEAPON_AK_BODY,
|
|
||||||
ANIM_WEAPON_PUMP,
|
|
||||||
ANIM_WEAPON_SNIPER,
|
|
||||||
ANIM_WEAPON_THROW,
|
|
||||||
ANIM_WEAPON_THROWU,
|
|
||||||
ANIM_WEAPON_START_THROW,
|
|
||||||
ANIM_BOMBER,
|
|
||||||
ANIM_HGUN_RELOAD,
|
|
||||||
ANIM_AK_RELOAD,
|
|
||||||
#ifdef PC_PLAYER_CONTROLS
|
|
||||||
// maybe wrong define, but unused anyway
|
|
||||||
ANIM_FPS_PUNCH,
|
|
||||||
ANIM_FPS_BAT,
|
|
||||||
ANIM_FPS_UZI,
|
|
||||||
ANIM_FPS_PUMP,
|
|
||||||
ANIM_FPS_AK,
|
|
||||||
ANIM_FPS_M16,
|
|
||||||
ANIM_FPS_ROCKET,
|
|
||||||
#endif
|
|
||||||
ANIM_FIGHT_IDLE,
|
ANIM_FIGHT_IDLE,
|
||||||
ANIM_FIGHT2_IDLE,
|
ANIM_FIGHT2_IDLE,
|
||||||
ANIM_FIGHT_SH_F,
|
ANIM_FIGHT_SH_F,
|
||||||
ANIM_FIGHT_BODYBLOW,
|
|
||||||
ANIM_FIGHT_HEAD,
|
|
||||||
ANIM_FIGHT_KICK,
|
|
||||||
ANIM_FIGHT_KNEE,
|
|
||||||
ANIM_FIGHT_LHOOK,
|
|
||||||
ANIM_FIGHT_PUNCH,
|
|
||||||
ANIM_FIGHT_ROUNDHOUSE,
|
|
||||||
ANIM_FIGHT_LONGKICK,
|
|
||||||
ANIM_FIGHT_PPUNCH,
|
ANIM_FIGHT_PPUNCH,
|
||||||
|
ANIM_L_HOOK,
|
||||||
|
ANIM_R_HOOK,
|
||||||
|
ANIM_UPPERCUT,
|
||||||
|
ANIM_HEADBUTT,
|
||||||
|
ANIM_FRONTKICK,
|
||||||
|
ANIM_ROUNDHOUSE,
|
||||||
|
ANIM_HIT_L_HOOK,
|
||||||
|
ANIM_HIT_R_HOOK,
|
||||||
|
ANIM_HIT_UPPERCUT,
|
||||||
|
ANIM_HIT_HEADBUTT,
|
||||||
|
ANIM_HIT_FRONTKICK,
|
||||||
|
ANIM_HIT_RHOUSE,
|
||||||
|
ANIM_BOMBER,
|
||||||
|
ANIM_PUNCH_R,
|
||||||
|
ANIM_FIGHT_PPUNCH2,
|
||||||
|
ANIM_KICK_FLOOR,
|
||||||
|
|
||||||
|
ANIM_WEAPON_THROWU,
|
||||||
|
ANIM_FIGHT_SH_BACK,
|
||||||
|
|
||||||
ANIM_CAR_JACKED_RHS,
|
ANIM_CAR_JACKED_RHS,
|
||||||
ANIM_CAR_LJACKED_RHS,
|
ANIM_CAR_LJACKED_RHS,
|
||||||
ANIM_CAR_JACKED_LHS,
|
ANIM_CAR_JACKED_LHS,
|
||||||
@@ -104,6 +85,7 @@ enum AnimationId
|
|||||||
ANIM_CAR_CLOSEDOOR_LOW_LHS,
|
ANIM_CAR_CLOSEDOOR_LOW_LHS,
|
||||||
ANIM_CAR_ROLLDOOR,
|
ANIM_CAR_ROLLDOOR,
|
||||||
ANIM_CAR_ROLLDOOR_LOW,
|
ANIM_CAR_ROLLDOOR_LOW,
|
||||||
|
ANIM_CAR_JUMPIN_LHS,
|
||||||
ANIM_CAR_GETOUT_LHS,
|
ANIM_CAR_GETOUT_LHS,
|
||||||
ANIM_CAR_GETOUT_LOW_LHS,
|
ANIM_CAR_GETOUT_LOW_LHS,
|
||||||
ANIM_CAR_CLOSE_LHS,
|
ANIM_CAR_CLOSE_LHS,
|
||||||
@@ -129,29 +111,36 @@ enum AnimationId
|
|||||||
ANIM_DRIVE_LOW_R,
|
ANIM_DRIVE_LOW_R,
|
||||||
ANIM_DRIVEBY_L,
|
ANIM_DRIVEBY_L,
|
||||||
ANIM_DRIVEBY_R,
|
ANIM_DRIVEBY_R,
|
||||||
|
ANIM_DRIVEBY_LOW_L,
|
||||||
|
ANIM_DRIVEBY_LOW_R,
|
||||||
ANIM_CAR_LB,
|
ANIM_CAR_LB,
|
||||||
ANIM_DRIVE_BOAT,
|
ANIM_DRIVE_BOAT,
|
||||||
|
ANIM_DRIVE_BOAT_L,
|
||||||
|
ANIM_DRIVE_BOAT_R,
|
||||||
|
ANIM_BOAT_LB,
|
||||||
|
|
||||||
|
ANIM_BIKE_PICKUP_R,
|
||||||
|
ANIM_BIKE_PICKUP_L,
|
||||||
|
ANIM_BIKE_PULLUP_R,
|
||||||
|
ANIM_BIKE_PULLUP_L,
|
||||||
|
ANIM_BIKE_ELBOW_R,
|
||||||
|
ANIM_BIKE_ELBOW_L,
|
||||||
|
ANIM_BIKE_FALL_OFF,
|
||||||
|
ANIM_BIKE_FALL_R,
|
||||||
|
|
||||||
ANIM_CAR_GETOUT_RHS,
|
ANIM_CAR_GETOUT_RHS,
|
||||||
ANIM_CAR_GETOUT_LOW_RHS,
|
ANIM_CAR_GETOUT_LOW_RHS,
|
||||||
ANIM_CAR_CLOSE_RHS,
|
ANIM_CAR_CLOSE_RHS,
|
||||||
ANIM_CAR_HOOKERTALK,
|
ANIM_CAR_HOOKERTALK,
|
||||||
ANIM_COACH_OPEN_L,
|
|
||||||
ANIM_COACH_OPEN_R,
|
|
||||||
ANIM_COACH_IN_L,
|
|
||||||
ANIM_COACH_IN_R,
|
|
||||||
ANIM_COACH_OUT_L,
|
|
||||||
ANIM_TRAIN_GETIN,
|
ANIM_TRAIN_GETIN,
|
||||||
ANIM_TRAIN_GETOUT,
|
ANIM_TRAIN_GETOUT,
|
||||||
|
|
||||||
ANIM_CAR_CRAWLOUT_RHS,
|
ANIM_CAR_CRAWLOUT_RHS,
|
||||||
ANIM_CAR_CRAWLOUT_RHS2,
|
ANIM_CAR_CRAWLOUT_RHS2,
|
||||||
ANIM_VAN_OPEN_L,
|
ANIM_CAR_ROLLOUT_LHS,
|
||||||
ANIM_VAN_GETIN_L,
|
ANIM_CAR_ROLLOUT_RHS,
|
||||||
ANIM_VAN_CLOSE_L,
|
|
||||||
ANIM_VAN_GETOUT_L,
|
|
||||||
ANIM_VAN_OPEN,
|
|
||||||
ANIM_VAN_GETIN,
|
|
||||||
ANIM_VAN_CLOSE,
|
|
||||||
ANIM_VAN_GETOUT,
|
|
||||||
ANIM_GETUP1,
|
ANIM_GETUP1,
|
||||||
ANIM_GETUP2,
|
ANIM_GETUP2,
|
||||||
ANIM_GETUP3,
|
ANIM_GETUP3,
|
||||||
@@ -163,18 +152,23 @@ enum AnimationId
|
|||||||
ANIM_FALL_GLIDE,
|
ANIM_FALL_GLIDE,
|
||||||
ANIM_FALL_LAND,
|
ANIM_FALL_LAND,
|
||||||
ANIM_FALL_COLLAPSE,
|
ANIM_FALL_COLLAPSE,
|
||||||
|
ANIM_FALL_BACK,
|
||||||
|
ANIM_FALL_FRONT,
|
||||||
|
|
||||||
ANIM_EV_STEP,
|
ANIM_EV_STEP,
|
||||||
ANIM_EV_DIVE,
|
ANIM_EV_DIVE,
|
||||||
|
ANIM_COMMANDO_ROLL,
|
||||||
ANIM_XPRESS_SCRATCH,
|
ANIM_XPRESS_SCRATCH,
|
||||||
ANIM_ROAD_CROSS,
|
ANIM_ROAD_CROSS,
|
||||||
ANIM_TURN_180,
|
ANIM_TURN_180,
|
||||||
ANIM_ARREST_GUN,
|
ANIM_ARREST_GUN,
|
||||||
ANIM_DROWN,
|
ANIM_DROWN,
|
||||||
ANIM_CPR,
|
|
||||||
ANIM_DUCK_DOWN,
|
ANIM_DUCK_DOWN,
|
||||||
ANIM_DUCK_LOW,
|
ANIM_DUCK_LOW,
|
||||||
|
|
||||||
|
ANIM_WEAPON_CROUCH,
|
||||||
|
|
||||||
ANIM_RBLOCK_CSHOOT,
|
ANIM_RBLOCK_CSHOOT,
|
||||||
ANIM_WEAPON_THROWU2,
|
|
||||||
ANIM_HANDSUP,
|
ANIM_HANDSUP,
|
||||||
ANIM_HANDSCOWER,
|
ANIM_HANDSCOWER,
|
||||||
ANIM_FUCKU,
|
ANIM_FUCKU,
|
||||||
@@ -182,5 +176,153 @@ enum AnimationId
|
|||||||
ANIM_PHONE_OUT,
|
ANIM_PHONE_OUT,
|
||||||
ANIM_PHONE_TALK,
|
ANIM_PHONE_TALK,
|
||||||
|
|
||||||
|
ANIM_SEAT_DOWN,
|
||||||
|
ANIM_SEAT_UP,
|
||||||
|
ANIM_SEAT_IDLE,
|
||||||
|
ANIM_SEAT_DOWN2,
|
||||||
|
ANIM_ATM,
|
||||||
|
ANIM_ABSEIL,
|
||||||
|
|
||||||
|
NUM_STD_ANIMS,
|
||||||
|
|
||||||
|
ANIM_VAN_OPEN_L,
|
||||||
|
ANIM_VAN_GETIN_L,
|
||||||
|
ANIM_VAN_CLOSE_L,
|
||||||
|
ANIM_VAN_GETOUT_L,
|
||||||
|
ANIM_VAN_OPEN,
|
||||||
|
ANIM_VAN_GETIN,
|
||||||
|
ANIM_VAN_CLOSE,
|
||||||
|
ANIM_VAN_GETOUT,
|
||||||
|
|
||||||
|
ANIM_COACH_OPEN_L,
|
||||||
|
ANIM_COACH_OPEN_R,
|
||||||
|
ANIM_COACH_IN_L,
|
||||||
|
ANIM_COACH_IN_R,
|
||||||
|
ANIM_COACH_OUT_L,
|
||||||
|
|
||||||
|
ANIM_BIKE_RIDE,
|
||||||
|
ANIM_BIKE_STILL,
|
||||||
|
ANIM_BIKE_LEFT,
|
||||||
|
ANIM_BIKE_RIGHT,
|
||||||
|
ANIM_BIKE_BACK,
|
||||||
|
ANIM_BIKE_FWD,
|
||||||
|
ANIM_BIKE_PUSHES,
|
||||||
|
ANIM_BIKE_JUMPON_R,
|
||||||
|
ANIM_BIKE_JUMPON_L,
|
||||||
|
ANIM_BIKE_KICK,
|
||||||
|
ANIM_BIKE_HIT,
|
||||||
|
ANIM_BIKE_GETOFF_RHS,
|
||||||
|
ANIM_BIKE_GETOFF_LHS,
|
||||||
|
ANIM_BIKE_GETOFF_BACK,
|
||||||
|
ANIM_BIKE_DRIVEBY_RHS,
|
||||||
|
ANIM_BIKE_DRIVEBY_LHS,
|
||||||
|
ANIM_BIKE_DRIVEBY_FT,
|
||||||
|
ANIM_BIKE_PASSENGER,
|
||||||
|
|
||||||
|
ANIM_WEAPON_FIRE,
|
||||||
|
ANIM_WEAPON_CROUCHFIRE,
|
||||||
|
ANIM_WEAPON_RELOAD,
|
||||||
|
ANIM_WEAPON_CROUCHRELOAD,
|
||||||
|
ANIM_WEAPON_SPECIAL,
|
||||||
|
ANIM_MELEE_ATTACK = ANIM_WEAPON_FIRE,
|
||||||
|
ANIM_MELEE_ATTACK_2ND,
|
||||||
|
ANIM_MELEE_ATTACK_START,
|
||||||
|
ANIM_MELEE_IDLE_FIGHTMODE,
|
||||||
|
ANIM_MELEE_ATTACK_FINISH,
|
||||||
|
ANIM_THROWABLE_THROW = ANIM_WEAPON_FIRE,
|
||||||
|
ANIM_THROWABLE_THROWU,
|
||||||
|
ANIM_THROWABLE_START_THROW,
|
||||||
|
ANIM_WEAPON_FIRE_2ND = ANIM_WEAPON_CROUCHFIRE,
|
||||||
|
ANIM_WEAPON_FIRE_3RD = ANIM_WEAPON_SPECIAL,
|
||||||
|
|
||||||
|
ANIM_SUNBATHE,
|
||||||
|
ANIM_SUNBATHE_DOWN,
|
||||||
|
ANIM_SUNBATHE_UP,
|
||||||
|
ANIM_SUNBATHE_ESCAPE,
|
||||||
|
|
||||||
|
ANIM_CPR,
|
||||||
|
|
||||||
|
ANIM_IDLE_STRETCH,
|
||||||
|
ANIM_IDLE_TIME,
|
||||||
|
ANIM_IDLE_SHOULDER,
|
||||||
|
ANIM_IDLE_STRETCH_LEG,
|
||||||
|
|
||||||
|
ANIM_RIOT_ANGRY,
|
||||||
|
ANIM_RIOT_ANGRY_B,
|
||||||
|
ANIM_RIOT_CHANT,
|
||||||
|
ANIM_RIOT_PUNCHES,
|
||||||
|
ANIM_RIOT_SHOUT,
|
||||||
|
ANIM_RIOT_CHALLENGE,
|
||||||
|
ANIM_RIOT_FUKU,
|
||||||
|
|
||||||
|
ANIM_STRIP_A,
|
||||||
|
ANIM_STRIP_B,
|
||||||
|
ANIM_STRIP_C,
|
||||||
|
ANIM_STRIP_D,
|
||||||
|
ANIM_STRIP_E,
|
||||||
|
ANIM_STRIP_F,
|
||||||
|
ANIM_STRIP_G,
|
||||||
|
|
||||||
|
|
||||||
|
ANIM_MPNOTE,
|
||||||
|
ANIM_MPNOTE_LOOP,
|
||||||
|
|
||||||
|
ANIM_IDLE_LOOK,
|
||||||
|
ANIM_IDLE_NO,
|
||||||
|
ANIM_IDLE_YES,
|
||||||
|
ANIM_IDLE_CHAT2,
|
||||||
|
ANIM_IDLE_COUGH,
|
||||||
|
ANIM_IDLE_GIGGLE_FEMALE,
|
||||||
|
ANIM_IDLE_TOUGH_CHAT,
|
||||||
|
ANIM_IDLE_CELL_TALK,
|
||||||
|
|
||||||
|
ANIM_DONH2_CAMERA,
|
||||||
|
ANIM_DONH3_HAPPY,
|
||||||
|
|
||||||
|
ANIM_JDT2_ANXIOUS_TALK,
|
||||||
|
ANIM_JDT2_SHRUG,
|
||||||
|
ANIM_JDT4_DILDO_TALK,
|
||||||
|
ANIM_JDT5_CALM_DOWN,
|
||||||
|
ANIM_JDT5_POINT,
|
||||||
|
ANIM_JDT6_PICKUP,
|
||||||
|
ANIM_JDT6_DOORKNOCK,
|
||||||
|
|
||||||
|
ANIM_MAR1_SKIRT,
|
||||||
|
ANIM_MAR2_CELL_ANSWER,
|
||||||
|
ANIM_MAR2_CELL_END,
|
||||||
|
ANIM_MAR2_CELL_TALK,
|
||||||
|
ANIM_MAR2_FOOT_TAP,
|
||||||
|
ANIM_MAR3_HOOCHY,
|
||||||
|
ANIM_MAR3_NOTE_IDLE,
|
||||||
|
ANIM_MAR3_NOTE_PICK,
|
||||||
|
|
||||||
|
ANIM_SAL1_BIREFCASE_DOWN,
|
||||||
|
ANIM_SAL2_IDLE_SEATED,
|
||||||
|
ANIM_SAL2_SEAT_TO_STAND,
|
||||||
|
ANIM_SAL3_SEATED_TALK,
|
||||||
|
ANIM_SAL3_SEATED_IDLE,
|
||||||
|
ANIM_SAL3_SIT_DOWN,
|
||||||
|
ANIM_SAL4_DUSTDOWN,
|
||||||
|
ANIM_SAL4_GIRLRUN,
|
||||||
|
ANIM_SAL6_ANGRY_SEATED,
|
||||||
|
ANIM_SAL6_IDLE_SEATED,
|
||||||
|
ANIM_SAL7_LOOKOUT,
|
||||||
|
|
||||||
|
ANIM_VIC2_POINT_ANGRY,
|
||||||
|
ANIM_VIC3_WAFT,
|
||||||
|
ANIM_VIC3_PICKUP_ROLL,
|
||||||
|
ANIM_VIC4_CARRY_BOX,
|
||||||
|
ANIM_VIC4_CELL_LOOK,
|
||||||
|
ANIM_VIC4_CRATE_IDLE,
|
||||||
|
ANIM_VIC6_CELL_ANGRY,
|
||||||
|
|
||||||
|
ANIM_TOURIST3,
|
||||||
|
ANIM_TOURIST2,
|
||||||
|
ANIM_TOURIST1,
|
||||||
|
|
||||||
|
ANIM_MAC2_PLEAD,
|
||||||
|
|
||||||
|
ANIM_VIC7_PROD_WITH_FOOT,
|
||||||
|
|
||||||
NUM_ANIMS
|
NUM_ANIMS
|
||||||
};
|
};
|
||||||
@@ -2,26 +2,29 @@
|
|||||||
#include "PedModelInfo.h"
|
#include "PedModelInfo.h"
|
||||||
#include "Bones.h"
|
#include "Bones.h"
|
||||||
|
|
||||||
#ifdef PED_SKIN
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ConvertPedNode2BoneTag(int node)
|
ConvertPedNode2BoneTag(int node)
|
||||||
{
|
{
|
||||||
switch(node){
|
switch(node){
|
||||||
case PED_TORSO: return BONE_waist;
|
case PED_MID: return BONE_spine1;
|
||||||
case PED_MID: return BONE_torso; // this is what Xbox/Mobile use
|
case PED_HEAD: return BONE_head;
|
||||||
// return BONE_mid; // this is what PS2/PC use
|
case PED_UPPERARML: return BONE_l_upperarm;
|
||||||
case PED_HEAD: return BONE_head;
|
case PED_UPPERARMR: return BONE_r_upperarm;
|
||||||
case PED_UPPERARML: return BONE_upperarml;
|
case PED_HANDL: return BONE_l_hand;
|
||||||
case PED_UPPERARMR: return BONE_upperarmr;
|
case PED_HANDR: return BONE_r_hand;
|
||||||
case PED_HANDL: return BONE_Lhand;
|
case PED_UPPERLEGL: return BONE_l_thigh;
|
||||||
case PED_HANDR: return BONE_Rhand;
|
case PED_UPPERLEGR: return BONE_r_thigh;
|
||||||
case PED_UPPERLEGL: return BONE_upperlegl;
|
case PED_FOOTL: return BONE_l_foot;
|
||||||
case PED_UPPERLEGR: return BONE_upperlegr;
|
case PED_FOOTR: return BONE_r_foot;
|
||||||
case PED_FOOTL: return BONE_footl;
|
case PED_LOWERLEGR: return BONE_r_calf;
|
||||||
case PED_FOOTR: return BONE_footr;
|
case PED_LOWERLEGL: return BONE_l_calf;
|
||||||
case PED_LOWERLEGR: return BONE_lowerlegl;
|
case PED_FOREARML: return BONE_l_forearm;
|
||||||
|
case PED_FOREARMR: return BONE_r_forearm;
|
||||||
|
case PED_CLAVICLEL: return BONE_l_clavicle;
|
||||||
|
case PED_CLAVICLER: return BONE_r_clavicle;
|
||||||
|
case PED_NECK: return BONE_neck;
|
||||||
}
|
}
|
||||||
|
assert(0 && "this node has no bone");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,24 +32,28 @@ const char*
|
|||||||
ConvertBoneTag2BoneName(int tag)
|
ConvertBoneTag2BoneName(int tag)
|
||||||
{
|
{
|
||||||
switch(tag){
|
switch(tag){
|
||||||
case BONE_waist: return "Swaist";
|
case BONE_root: return "Root";
|
||||||
case BONE_upperlegr: return "Supperlegr";
|
case BONE_pelvis: return "Pelvis";
|
||||||
case BONE_lowerlegr: return "Slowerlegr";
|
case BONE_spine: return "Spine";
|
||||||
case BONE_footr: return "Sfootr";
|
case BONE_spine1: return "Spine1";
|
||||||
case BONE_upperlegl: return "Supperlegl";
|
case BONE_neck: return "Neck";
|
||||||
case BONE_lowerlegl: return "Slowerlegl";
|
case BONE_head: return "Head";
|
||||||
case BONE_footl: return "Sfootl";
|
case BONE_r_clavicle: return "Bip01 R Clavicle";
|
||||||
case BONE_mid: return "Smid";
|
case BONE_r_upperarm: return "R UpperArm";
|
||||||
case BONE_torso: return "Storso";
|
case BONE_r_forearm: return "R Forearm";
|
||||||
case BONE_head: return "Shead";
|
case BONE_r_hand: return "R Hand";
|
||||||
case BONE_upperarmr: return "Supperarmr";
|
case BONE_r_finger: return "R Fingers";
|
||||||
case BONE_lowerarmr: return "Slowerarmr";
|
case BONE_l_clavicle: return "Bip01 L Clavicle";
|
||||||
case BONE_Rhand: return "SRhand";
|
case BONE_l_upperarm: return "L UpperArm";
|
||||||
case BONE_upperarml: return "Supperarml";
|
case BONE_l_forearm: return "L Forearm";
|
||||||
case BONE_lowerarml: return "Slowerarml";
|
case BONE_l_hand: return "L Hand";
|
||||||
case BONE_Lhand: return "SLhand";
|
case BONE_l_finger: return "L Fingers";
|
||||||
|
case BONE_l_thigh: return "L Thigh";
|
||||||
|
case BONE_l_calf: return "L Calf";
|
||||||
|
case BONE_l_foot: return "L Foot";
|
||||||
|
case BONE_r_thigh: return "R Thigh";
|
||||||
|
case BONE_r_calf: return "R Calf";
|
||||||
|
case BONE_r_foot: return "R Foot";
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -2,22 +2,28 @@
|
|||||||
|
|
||||||
enum BoneTag
|
enum BoneTag
|
||||||
{
|
{
|
||||||
BONE_waist,
|
BONE_root = 0,
|
||||||
BONE_upperlegr,
|
BONE_pelvis = 1,
|
||||||
BONE_lowerlegr,
|
BONE_spine = 2,
|
||||||
BONE_footr,
|
BONE_spine1 = 3,
|
||||||
BONE_upperlegl,
|
BONE_neck = 4,
|
||||||
BONE_lowerlegl,
|
BONE_head = 5,
|
||||||
BONE_footl,
|
BONE_l_clavicle = 31,
|
||||||
BONE_mid,
|
BONE_l_upperarm = 32,
|
||||||
BONE_torso,
|
BONE_l_forearm = 33,
|
||||||
BONE_head,
|
BONE_l_hand = 34,
|
||||||
BONE_upperarmr,
|
BONE_l_finger = 35,
|
||||||
BONE_lowerarmr,
|
BONE_r_clavicle = 21,
|
||||||
BONE_Rhand,
|
BONE_r_upperarm = 22,
|
||||||
BONE_upperarml,
|
BONE_r_forearm = 23,
|
||||||
BONE_lowerarml,
|
BONE_r_hand = 24,
|
||||||
BONE_Lhand,
|
BONE_r_finger = 25,
|
||||||
|
BONE_l_thigh = 41,
|
||||||
|
BONE_l_calf = 42,
|
||||||
|
BONE_l_foot = 43,
|
||||||
|
BONE_r_thigh = 51,
|
||||||
|
BONE_r_calf = 52,
|
||||||
|
BONE_r_foot = 53,
|
||||||
};
|
};
|
||||||
|
|
||||||
int ConvertPedNode2BoneTag(int node);
|
int ConvertPedNode2BoneTag(int node);
|
||||||
|
|||||||
@@ -16,147 +16,60 @@
|
|||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
#include "Wanted.h"
|
#include "Wanted.h"
|
||||||
#include "CutsceneHead.h"
|
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
#include "ModelIndices.h"
|
#include "ModelIndices.h"
|
||||||
#include "TempColModels.h"
|
#include "TempColModels.h"
|
||||||
|
#include "ColStore.h"
|
||||||
|
#include "Radar.h"
|
||||||
|
#include "Pools.h"
|
||||||
|
#include "crossplatform.h"
|
||||||
|
|
||||||
const struct {
|
static bool bModelsRemovedForCutscene;
|
||||||
const char *szTrackName;
|
static int32 NumberOfSavedWeapons;
|
||||||
int iTrackId;
|
static eWeaponType SavedWeaponIDs[TOTAL_WEAPON_SLOTS];
|
||||||
} musicNameIdAssoc[] = {
|
static int32 SavedWeaponAmmo[TOTAL_WEAPON_SLOTS];
|
||||||
{ "JB", STREAMED_SOUND_NEWS_INTRO },
|
|
||||||
{ "BET", STREAMED_SOUND_BANK_INTRO },
|
|
||||||
{ "L1_LG", STREAMED_SOUND_CUTSCENE_LUIGI1_LG },
|
|
||||||
{ "L2_DSB", STREAMED_SOUND_CUTSCENE_LUIGI2_DSB },
|
|
||||||
{ "L3_DM", STREAMED_SOUND_CUTSCENE_LUIGI3_DM },
|
|
||||||
{ "L4_PAP", STREAMED_SOUND_CUTSCENE_LUIGI4_PAP },
|
|
||||||
{ "L5_TFB", STREAMED_SOUND_CUTSCENE_LUIGI5_TFB },
|
|
||||||
{ "J0_DM2", STREAMED_SOUND_CUTSCENE_JOEY0_DM2 },
|
|
||||||
{ "J1_LFL", STREAMED_SOUND_CUTSCENE_JOEY1_LFL },
|
|
||||||
{ "J2_KCL", STREAMED_SOUND_CUTSCENE_JOEY2_KCL },
|
|
||||||
{ "J3_VH", STREAMED_SOUND_CUTSCENE_JOEY3_VH },
|
|
||||||
{ "J4_ETH", STREAMED_SOUND_CUTSCENE_JOEY4_ETH },
|
|
||||||
{ "J5_DST", STREAMED_SOUND_CUTSCENE_JOEY5_DST },
|
|
||||||
{ "J6_TBJ", STREAMED_SOUND_CUTSCENE_JOEY6_TBJ },
|
|
||||||
{ "T1_TOL", STREAMED_SOUND_CUTSCENE_TONI1_TOL },
|
|
||||||
{ "T2_TPU", STREAMED_SOUND_CUTSCENE_TONI2_TPU },
|
|
||||||
{ "T3_MAS", STREAMED_SOUND_CUTSCENE_TONI3_MAS },
|
|
||||||
{ "T4_TAT", STREAMED_SOUND_CUTSCENE_TONI4_TAT },
|
|
||||||
{ "T5_BF", STREAMED_SOUND_CUTSCENE_TONI5_BF },
|
|
||||||
{ "S0_MAS", STREAMED_SOUND_CUTSCENE_SAL0_MAS },
|
|
||||||
{ "S1_PF", STREAMED_SOUND_CUTSCENE_SAL1_PF },
|
|
||||||
{ "S2_CTG", STREAMED_SOUND_CUTSCENE_SAL2_CTG },
|
|
||||||
{ "S3_RTC", STREAMED_SOUND_CUTSCENE_SAL3_RTC },
|
|
||||||
{ "S5_LRQ", STREAMED_SOUND_CUTSCENE_SAL5_LRQ },
|
|
||||||
{ "S4_BDBA", STREAMED_SOUND_CUTSCENE_SAL4_BDBA },
|
|
||||||
{ "S4_BDBB", STREAMED_SOUND_CUTSCENE_SAL4_BDBB },
|
|
||||||
{ "S2_CTG2", STREAMED_SOUND_CUTSCENE_SAL2_CTG2 },
|
|
||||||
{ "S4_BDBD", STREAMED_SOUND_CUTSCENE_SAL4_BDBD },
|
|
||||||
{ "S5_LRQB", STREAMED_SOUND_CUTSCENE_SAL5_LRQB },
|
|
||||||
{ "S5_LRQC", STREAMED_SOUND_CUTSCENE_SAL5_LRQC },
|
|
||||||
{ "A1_SS0", STREAMED_SOUND_CUTSCENE_ASUKA_1_SSO },
|
|
||||||
{ "A2_PP", STREAMED_SOUND_CUTSCENE_ASUKA_2_PP },
|
|
||||||
{ "A3_SS", STREAMED_SOUND_CUTSCENE_ASUKA_3_SS },
|
|
||||||
{ "A4_PDR", STREAMED_SOUND_CUTSCENE_ASUKA_4_PDR },
|
|
||||||
{ "A5_K2FT", STREAMED_SOUND_CUTSCENE_ASUKA_5_K2FT},
|
|
||||||
{ "K1_KBO", STREAMED_SOUND_CUTSCENE_KENJI1_KBO },
|
|
||||||
{ "K2_GIS", STREAMED_SOUND_CUTSCENE_KENJI2_GIS },
|
|
||||||
{ "K3_DS", STREAMED_SOUND_CUTSCENE_KENJI3_DS },
|
|
||||||
{ "K4_SHI", STREAMED_SOUND_CUTSCENE_KENJI4_SHI },
|
|
||||||
{ "K5_SD", STREAMED_SOUND_CUTSCENE_KENJI5_SD },
|
|
||||||
{ "R0_PDR2", STREAMED_SOUND_CUTSCENE_RAY0_PDR2 },
|
|
||||||
{ "R1_SW", STREAMED_SOUND_CUTSCENE_RAY1_SW },
|
|
||||||
{ "R2_AP", STREAMED_SOUND_CUTSCENE_RAY2_AP },
|
|
||||||
{ "R3_ED", STREAMED_SOUND_CUTSCENE_RAY3_ED },
|
|
||||||
{ "R4_GF", STREAMED_SOUND_CUTSCENE_RAY4_GF },
|
|
||||||
{ "R5_PB", STREAMED_SOUND_CUTSCENE_RAY5_PB },
|
|
||||||
{ "R6_MM", STREAMED_SOUND_CUTSCENE_RAY6_MM },
|
|
||||||
{ "D1_STOG", STREAMED_SOUND_CUTSCENE_DONALD1_STOG },
|
|
||||||
{ "D2_KK", STREAMED_SOUND_CUTSCENE_DONALD2_KK },
|
|
||||||
{ "D3_ADO", STREAMED_SOUND_CUTSCENE_DONALD3_ADO },
|
|
||||||
{ "D5_ES", STREAMED_SOUND_CUTSCENE_DONALD5_ES },
|
|
||||||
{ "D7_MLD", STREAMED_SOUND_CUTSCENE_DONALD7_MLD },
|
|
||||||
{ "D4_GTA", STREAMED_SOUND_CUTSCENE_DONALD4_GTA },
|
|
||||||
{ "D4_GTA2", STREAMED_SOUND_CUTSCENE_DONALD4_GTA2 },
|
|
||||||
{ "D6_STS", STREAMED_SOUND_CUTSCENE_DONALD6_STS },
|
|
||||||
{ "A6_BAIT", STREAMED_SOUND_CUTSCENE_ASUKA6_BAIT },
|
|
||||||
{ "A7_ETG", STREAMED_SOUND_CUTSCENE_ASUKA7_ETG },
|
|
||||||
{ "A8_PS", STREAMED_SOUND_CUTSCENE_ASUKA8_PS },
|
|
||||||
{ "A9_ASD", STREAMED_SOUND_CUTSCENE_ASUKA9_ASD },
|
|
||||||
{ "K4_SHI2", STREAMED_SOUND_CUTSCENE_KENJI4_SHI2 },
|
|
||||||
{ "C1_TEX", STREAMED_SOUND_CUTSCENE_CATALINA1_TEX },
|
|
||||||
{ "EL_PH1", STREAMED_SOUND_CUTSCENE_ELBURRO1_PH1 },
|
|
||||||
{ "EL_PH2", STREAMED_SOUND_CUTSCENE_ELBURRO2_PH2 },
|
|
||||||
{ "EL_PH3", STREAMED_SOUND_CUTSCENE_ELBURRO3_PH3 },
|
|
||||||
{ "EL_PH4", STREAMED_SOUND_CUTSCENE_ELBURRO4_PH4 },
|
|
||||||
{ "YD_PH1", STREAMED_SOUND_CUTSCENE_YARDIE_PH1 },
|
|
||||||
{ "YD_PH2", STREAMED_SOUND_CUTSCENE_YARDIE_PH2 },
|
|
||||||
{ "YD_PH3", STREAMED_SOUND_CUTSCENE_YARDIE_PH3 },
|
|
||||||
{ "YD_PH4", STREAMED_SOUND_CUTSCENE_YARDIE_PH4 },
|
|
||||||
{ "HD_PH1", STREAMED_SOUND_CUTSCENE_HOODS_PH1 },
|
|
||||||
{ "HD_PH2", STREAMED_SOUND_CUTSCENE_HOODS_PH2 },
|
|
||||||
{ "HD_PH3", STREAMED_SOUND_CUTSCENE_HOODS_PH3 },
|
|
||||||
{ "HD_PH4", STREAMED_SOUND_CUTSCENE_HOODS_PH4 },
|
|
||||||
{ "HD_PH5", STREAMED_SOUND_CUTSCENE_HOODS_PH5 },
|
|
||||||
{ "MT_PH1", STREAMED_SOUND_CUTSCENE_MARTY_PH1 },
|
|
||||||
{ "MT_PH2", STREAMED_SOUND_CUTSCENE_MARTY_PH2 },
|
|
||||||
{ "MT_PH3", STREAMED_SOUND_CUTSCENE_MARTY_PH3 },
|
|
||||||
{ "MT_PH4", STREAMED_SOUND_CUTSCENE_MARTY_PH4 },
|
|
||||||
{ NULL, 0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
int
|
char CCutsceneMgr::ms_cAppendAnimName[NUMCUTSCENEOBJECTS][NAMELENGTH];
|
||||||
FindCutsceneAudioTrackId(const char *szCutsceneName)
|
char CCutsceneMgr::ms_cAppendObjectName[NUMCUTSCENEOBJECTS][NAMELENGTH];
|
||||||
{
|
int CCutsceneMgr::ms_numAppendObjectNames;
|
||||||
for (int i = 0; musicNameIdAssoc[i].szTrackName; i++) {
|
|
||||||
if (!CGeneral::faststricmp(musicNameIdAssoc[i].szTrackName, szCutsceneName))
|
|
||||||
return musicNameIdAssoc[i].iTrackId;
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CCutsceneMgr::ms_running;
|
|
||||||
bool CCutsceneMgr::ms_cutsceneProcessing;
|
|
||||||
CDirectory *CCutsceneMgr::ms_pCutsceneDir;
|
CDirectory *CCutsceneMgr::ms_pCutsceneDir;
|
||||||
CCutsceneObject *CCutsceneMgr::ms_pCutsceneObjects[NUMCUTSCENEOBJECTS];
|
|
||||||
int32 CCutsceneMgr::ms_numCutsceneObjs;
|
|
||||||
bool CCutsceneMgr::ms_loaded;
|
bool CCutsceneMgr::ms_loaded;
|
||||||
bool CCutsceneMgr::ms_animLoaded;
|
bool CCutsceneMgr::ms_hasFileInfo;
|
||||||
|
bool CCutsceneMgr::ms_wasCutsceneSkipped;
|
||||||
bool CCutsceneMgr::ms_useLodMultiplier;
|
bool CCutsceneMgr::ms_useLodMultiplier;
|
||||||
char CCutsceneMgr::ms_cutsceneName[CUTSCENENAMESIZE];
|
bool CCutsceneMgr::ms_cutsceneProcessing;
|
||||||
CAnimBlendAssocGroup CCutsceneMgr::ms_cutsceneAssociations;
|
bool CCutsceneMgr::ms_running;
|
||||||
CVector CCutsceneMgr::ms_cutsceneOffset;
|
bool CCutsceneMgr::ms_animLoaded;
|
||||||
float CCutsceneMgr::ms_cutsceneTimer;
|
|
||||||
uint32 CCutsceneMgr::ms_cutsceneLoadStatus;
|
uint32 CCutsceneMgr::ms_cutsceneLoadStatus;
|
||||||
|
|
||||||
RpAtomic *
|
|
||||||
CalculateBoundingSphereRadiusCB(RpAtomic *atomic, void *data)
|
|
||||||
{
|
|
||||||
float radius = RpAtomicGetBoundingSphere(atomic)->radius;
|
|
||||||
RwV3d center = RpAtomicGetBoundingSphere(atomic)->center;
|
|
||||||
|
|
||||||
for (RwFrame *frame = RpAtomicGetFrame(atomic); RwFrameGetParent(frame); frame = RwFrameGetParent(frame))
|
|
||||||
RwV3dTransformPoints(¢er, ¢er, 1, RwFrameGetMatrix(frame));
|
|
||||||
|
|
||||||
float size = RwV3dLength(¢er) + radius;
|
|
||||||
if (size > *(float *)data)
|
|
||||||
*(float *)data = size;
|
|
||||||
return atomic;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CCutsceneMgr::Initialise(void)
|
CCutsceneMgr::Initialise(void *dir)
|
||||||
{
|
{
|
||||||
ms_numCutsceneObjs = 0;
|
ms_cutsceneLoadStatus = CUTSCENE_NOT_LOADED;
|
||||||
ms_loaded = false;
|
|
||||||
ms_running = false;
|
ms_running = false;
|
||||||
ms_animLoaded = false;
|
ms_animLoaded = false;
|
||||||
ms_cutsceneProcessing = false;
|
ms_cutsceneProcessing = false;
|
||||||
ms_useLodMultiplier = false;
|
ms_useLodMultiplier = false;
|
||||||
|
ms_wasCutsceneSkipped = false;
|
||||||
|
ms_hasFileInfo = false;
|
||||||
|
//ms_numCutsceneObjs = 0;
|
||||||
|
//ms_loaded = false;
|
||||||
|
if (gMakeResources) {
|
||||||
|
ms_pCutsceneDir = new CDirectory(CUTSCENEDIRSIZE);
|
||||||
|
ms_pCutsceneDir->ReadDirFile("ANIM\\CUTS.DIR");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ms_pCutsceneDir = (CDirectory*)dir;
|
||||||
|
|
||||||
ms_pCutsceneDir = new CDirectory(CUTSCENEDIRSIZE);
|
//numUncompressedAnims = 0;
|
||||||
ms_pCutsceneDir->ReadDirFile("ANIM\\CUTS.DIR");
|
//uncompressedAnims[0][0] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCutsceneMgr::Write(base::cRelocatableChunkWriter& writer)
|
||||||
|
{
|
||||||
|
writer.AllocateRaw(ms_pCutsceneDir, sizeof(*ms_pCutsceneDir), 4, false, true);
|
||||||
|
writer.AllocateRaw(ms_pCutsceneDir->entries, sizeof(CDirectory::DirectoryInfo) * ms_pCutsceneDir->numEntries, 4, false, true);
|
||||||
|
writer.AddPatch(ms_pCutsceneDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -168,257 +81,157 @@ CCutsceneMgr::Shutdown(void)
|
|||||||
void
|
void
|
||||||
CCutsceneMgr::LoadCutsceneData(const char *szCutsceneName)
|
CCutsceneMgr::LoadCutsceneData(const char *szCutsceneName)
|
||||||
{
|
{
|
||||||
int file;
|
LoadCutsceneData_overlay(szCutsceneName);
|
||||||
uint32 size;
|
|
||||||
uint32 offset;
|
|
||||||
CPlayerPed *pPlayerPed;
|
|
||||||
|
|
||||||
ms_cutsceneProcessing = true;
|
|
||||||
if (!strcasecmp(szCutsceneName, "jb"))
|
|
||||||
ms_useLodMultiplier = true;
|
|
||||||
CTimer::Stop();
|
|
||||||
|
|
||||||
ms_pCutsceneDir->numEntries = 0;
|
|
||||||
ms_pCutsceneDir->ReadDirFile("ANIM\\CUTS.DIR");
|
|
||||||
|
|
||||||
CStreaming::RemoveUnusedModelsInLoadedList();
|
|
||||||
CGame::DrasticTidyUpMemory(true);
|
|
||||||
|
|
||||||
strcpy(ms_cutsceneName, szCutsceneName);
|
|
||||||
file = CFileMgr::OpenFile("ANIM\\CUTS.IMG", "rb");
|
|
||||||
|
|
||||||
// Load animations
|
|
||||||
sprintf(gString, "%s.IFP", szCutsceneName);
|
|
||||||
if (ms_pCutsceneDir->FindItem(gString, offset, size)) {
|
|
||||||
CStreaming::MakeSpaceFor(size << 11);
|
|
||||||
CStreaming::ImGonnaUseStreamingMemory();
|
|
||||||
CFileMgr::Seek(file, offset << 11, SEEK_SET);
|
|
||||||
CAnimManager::LoadAnimFile(file, false);
|
|
||||||
ms_cutsceneAssociations.CreateAssociations(szCutsceneName);
|
|
||||||
CStreaming::IHaveUsedStreamingMemory();
|
|
||||||
ms_animLoaded = true;
|
|
||||||
} else {
|
|
||||||
ms_animLoaded = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load camera data
|
|
||||||
sprintf(gString, "%s.DAT", szCutsceneName);
|
|
||||||
if (ms_pCutsceneDir->FindItem(gString, offset, size)) {
|
|
||||||
CFileMgr::Seek(file, offset << 11, SEEK_SET);
|
|
||||||
TheCamera.LoadPathSplines(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
CFileMgr::CloseFile(file);
|
|
||||||
|
|
||||||
if (CGeneral::faststricmp(ms_cutsceneName, "end")) {
|
|
||||||
DMAudio.ChangeMusicMode(MUSICMODE_CUTSCENE);
|
|
||||||
int trackId = FindCutsceneAudioTrackId(szCutsceneName);
|
|
||||||
if (trackId != -1) {
|
|
||||||
printf("Start preload audio %s\n", szCutsceneName);
|
|
||||||
DMAudio.PreloadCutSceneMusic(trackId);
|
|
||||||
printf("End preload audio %s\n", szCutsceneName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ms_cutsceneTimer = 0.0f;
|
|
||||||
ms_loaded = true;
|
|
||||||
ms_cutsceneOffset = CVector(0.0f, 0.0f, 0.0f);
|
|
||||||
|
|
||||||
pPlayerPed = FindPlayerPed();
|
|
||||||
CTimer::Update();
|
|
||||||
|
|
||||||
pPlayerPed->m_pWanted->ClearQdCrimes();
|
|
||||||
pPlayerPed->bIsVisible = false;
|
|
||||||
pPlayerPed->m_fCurrentStamina = pPlayerPed->m_fMaxStamina;
|
|
||||||
CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_CUTSCENE);
|
|
||||||
CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CCutsceneMgr::SetHeadAnim(const char *animName, CObject *pObject)
|
|
||||||
{
|
|
||||||
CCutsceneHead *pCutsceneHead = (CCutsceneHead*)pObject;
|
|
||||||
char szAnim[CUTSCENENAMESIZE * 2];
|
|
||||||
|
|
||||||
sprintf(szAnim, "%s_%s", ms_cutsceneName, animName);
|
|
||||||
pCutsceneHead->PlayAnimation(szAnim);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CCutsceneMgr::FinishCutscene()
|
|
||||||
{
|
|
||||||
CCutsceneMgr::ms_cutsceneTimer = TheCamera.GetCutSceneFinishTime() * 0.001f;
|
|
||||||
TheCamera.FinishCutscene();
|
|
||||||
|
|
||||||
FindPlayerPed()->bIsVisible = true;
|
|
||||||
CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CCutsceneMgr::SetupCutsceneToStart(void)
|
|
||||||
{
|
|
||||||
TheCamera.SetCamCutSceneOffSet(ms_cutsceneOffset);
|
|
||||||
TheCamera.TakeControlWithSpline(JUMP_CUT);
|
|
||||||
TheCamera.SetWideScreenOn();
|
|
||||||
|
|
||||||
ms_cutsceneOffset.z++;
|
|
||||||
|
|
||||||
for (int i = ms_numCutsceneObjs - 1; i >= 0; i--) {
|
|
||||||
assert(RwObjectGetType(ms_pCutsceneObjects[i]->m_rwObject) == rpCLUMP);
|
|
||||||
if (CAnimBlendAssociation *pAnimBlendAssoc = RpAnimBlendClumpGetFirstAssociation((RpClump*)ms_pCutsceneObjects[i]->m_rwObject)) {
|
|
||||||
assert(pAnimBlendAssoc->hierarchy->sequences[0].HasTranslation());
|
|
||||||
ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset + ((KeyFrameTrans*)pAnimBlendAssoc->hierarchy->sequences[0].GetKeyFrame(0))->translation);
|
|
||||||
CWorld::Add(ms_pCutsceneObjects[i]);
|
|
||||||
pAnimBlendAssoc->SetRun();
|
|
||||||
} else {
|
|
||||||
ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CTimer::Update();
|
|
||||||
CTimer::Update();
|
|
||||||
ms_running = true;
|
|
||||||
ms_cutsceneTimer = 0.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CCutsceneMgr::SetCutsceneAnim(const char *animName, CObject *pObject)
|
|
||||||
{
|
|
||||||
CAnimBlendAssociation *pNewAnim;
|
|
||||||
CAnimBlendClumpData *pAnimBlendClumpData;
|
|
||||||
|
|
||||||
assert(RwObjectGetType(pObject->m_rwObject) == rpCLUMP);
|
|
||||||
RpAnimBlendClumpRemoveAllAssociations((RpClump*)pObject->m_rwObject);
|
|
||||||
|
|
||||||
pNewAnim = ms_cutsceneAssociations.CopyAnimation(animName);
|
|
||||||
pNewAnim->SetCurrentTime(0.0f);
|
|
||||||
pNewAnim->flags |= ASSOC_HAS_TRANSLATION;
|
|
||||||
pNewAnim->flags &= ~ASSOC_RUNNING;
|
|
||||||
|
|
||||||
pAnimBlendClumpData = *RPANIMBLENDCLUMPDATA(pObject->m_rwObject);
|
|
||||||
pAnimBlendClumpData->link.Prepend(&pNewAnim->link);
|
|
||||||
}
|
|
||||||
|
|
||||||
CCutsceneHead *
|
|
||||||
CCutsceneMgr::AddCutsceneHead(CObject *pObject, int modelId)
|
|
||||||
{
|
|
||||||
CCutsceneHead *pHead = new CCutsceneHead(pObject);
|
|
||||||
pHead->SetModelIndex(modelId);
|
|
||||||
CWorld::Add(pHead);
|
|
||||||
ms_pCutsceneObjects[ms_numCutsceneObjs++] = pHead;
|
|
||||||
return pHead;
|
|
||||||
}
|
|
||||||
|
|
||||||
CCutsceneObject *
|
|
||||||
CCutsceneMgr::CreateCutsceneObject(int modelId)
|
|
||||||
{
|
|
||||||
CBaseModelInfo *pModelInfo;
|
|
||||||
CColModel *pColModel;
|
|
||||||
float radius;
|
|
||||||
RpClump *clump;
|
|
||||||
CCutsceneObject *pCutsceneObject;
|
|
||||||
|
|
||||||
if (modelId >= MI_CUTOBJ01 && modelId <= MI_CUTOBJ05) {
|
|
||||||
pModelInfo = CModelInfo::GetModelInfo(modelId);
|
|
||||||
pColModel = &CTempColModels::ms_colModelCutObj[modelId - MI_CUTOBJ01];
|
|
||||||
radius = 0.0f;
|
|
||||||
|
|
||||||
pModelInfo->SetColModel(pColModel);
|
|
||||||
clump = (RpClump*)pModelInfo->GetRwObject();
|
|
||||||
assert(RwObjectGetType((RwObject*)clump) == rpCLUMP);
|
|
||||||
RpClumpForAllAtomics(clump, CalculateBoundingSphereRadiusCB, &radius);
|
|
||||||
|
|
||||||
pColModel->boundingSphere.radius = radius;
|
|
||||||
pColModel->boundingBox.min = CVector(-radius, -radius, -radius);
|
|
||||||
pColModel->boundingBox.max = CVector(radius, radius, radius);
|
|
||||||
}
|
|
||||||
|
|
||||||
pCutsceneObject = new CCutsceneObject();
|
|
||||||
pCutsceneObject->SetModelIndex(modelId);
|
|
||||||
ms_pCutsceneObjects[ms_numCutsceneObjs++] = pCutsceneObject;
|
|
||||||
return pCutsceneObject;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CCutsceneMgr::DeleteCutsceneData(void)
|
CCutsceneMgr::DeleteCutsceneData(void)
|
||||||
{
|
{
|
||||||
if (!ms_loaded) return;
|
DeleteCutsceneData_overlay();
|
||||||
|
if (bModelsRemovedForCutscene)
|
||||||
|
LoadEverythingBecauseCutsceneDeletedAllOfIt();
|
||||||
|
}
|
||||||
|
|
||||||
ms_cutsceneProcessing = false;
|
void
|
||||||
ms_useLodMultiplier = false;
|
CCutsceneMgr::RemoveEverythingBecauseCutsceneDoesntFitInMemory()
|
||||||
|
{
|
||||||
|
//CStreaming::ms_disableStreaming = true;
|
||||||
|
CWorld::ClearExcitingStuffFromArea(FindPlayerCoors(), 120.0f, true);
|
||||||
|
CColStore::RemoveAllCollision();
|
||||||
|
CWorld::bProcessCutsceneOnly = true;
|
||||||
|
/*ms_cutsceneProcessing = true;
|
||||||
|
|
||||||
for (--ms_numCutsceneObjs; ms_numCutsceneObjs >= 0; ms_numCutsceneObjs--) {
|
for (int i = CPools::GetPedPool()->GetSize() - 1; i >= 0; i--) {
|
||||||
CWorld::Remove(ms_pCutsceneObjects[ms_numCutsceneObjs]);
|
CPed *pPed = CPools::GetPedPool()->GetSlot(i);
|
||||||
ms_pCutsceneObjects[ms_numCutsceneObjs]->DeleteRwObject();
|
if (pPed) {
|
||||||
delete ms_pCutsceneObjects[ms_numCutsceneObjs];
|
if (!pPed->IsPlayer() && pPed->CanBeDeleted()) {
|
||||||
ms_pCutsceneObjects[ms_numCutsceneObjs] = nil;
|
CWorld::Remove(pPed);
|
||||||
|
delete pPed;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ms_numCutsceneObjs = 0;
|
|
||||||
|
|
||||||
if (ms_animLoaded)
|
for (int i = CPools::GetVehiclePool()->GetSize() - 1; i >= 0; i--) {
|
||||||
CAnimManager::RemoveLastAnimFile();
|
CVehicle *pVehicle = CPools::GetVehiclePool()->GetSlot(i);
|
||||||
|
if (pVehicle) {
|
||||||
ms_animLoaded = false;
|
if (pVehicle->CanBeDeleted()) {
|
||||||
TheCamera.RestoreWithJumpCut();
|
CWorld::Remove(pVehicle);
|
||||||
TheCamera.SetWideScreenOff();
|
delete pVehicle;
|
||||||
ms_running = false;
|
}
|
||||||
ms_loaded = false;
|
}
|
||||||
|
|
||||||
FindPlayerPed()->bIsVisible = true;
|
|
||||||
CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_CUTSCENE);
|
|
||||||
CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(false);
|
|
||||||
|
|
||||||
if (CGeneral::faststricmp(ms_cutsceneName, "end")) {
|
|
||||||
DMAudio.StopCutSceneMusic();
|
|
||||||
if (CGeneral::faststricmp(ms_cutsceneName, "bet"))
|
|
||||||
DMAudio.ChangeMusicMode(MUSICMODE_GAME);
|
|
||||||
}
|
}
|
||||||
CTimer::Stop();
|
CWorld::bProcessCutsceneOnly = true;
|
||||||
CGame::DrasticTidyUpMemory(TheCamera.GetScreenFadeStatus() == FADE_2);
|
//bIsEverythingRemovedFromTheWorldForTheBiggestFuckoffCutsceneEver = true;*/
|
||||||
CTimer::Update();
|
CStreaming::RemoveCurrentZonesModels();
|
||||||
|
while (CStreaming::RemoveLoadedVehicle());
|
||||||
|
CRadar::RemoveRadarSections();
|
||||||
|
CStreaming::SetModelIsDeletable(MI_MALE01);
|
||||||
|
CStreaming::SetModelTxdIsDeletable(MI_MALE01);
|
||||||
|
CStreaming::SetModelIsDeletable(MI_COLT45);
|
||||||
|
CStreaming::SetModelTxdIsDeletable(MI_COLT45);
|
||||||
|
CStreaming::SetModelIsDeletable(MI_NIGHTSTICK);
|
||||||
|
CStreaming::SetModelTxdIsDeletable(MI_NIGHTSTICK);
|
||||||
|
CStreaming::SetModelIsDeletable(MI_MISSILE);
|
||||||
|
CStreaming::SetModelTxdIsDeletable(MI_MISSILE);
|
||||||
|
|
||||||
|
/*for (int i = CPools::GetDummyPool()->GetSize() - 1; i >= 0; i--) {
|
||||||
|
CDummy* pDummy = CPools::GetDummyPool()->GetSlot(i);
|
||||||
|
if (pDummy)
|
||||||
|
pDummy->DeleteRwObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = CPools::GetObjectPool()->GetSize() - 1; i >= 0; i--) {
|
||||||
|
CObject* pObject = CPools::GetObjectPool()->GetSlot(i);
|
||||||
|
if (pObject)
|
||||||
|
pObject->DeleteRwObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = CPools::GetBuildingPool()->GetSize() - 1; i >= 0; i--) {
|
||||||
|
CBuilding* pBuilding = CPools::GetBuildingPool()->GetSlot(i);
|
||||||
|
if (pBuilding && pBuilding->m_rwObject != nil && pBuilding->bIsBIGBuilding && pBuilding->bStreamBIGBuilding) {
|
||||||
|
if (pBuilding->bIsBIGBuilding)
|
||||||
|
CStreaming::RequestModel(pBuilding->GetModelIndex(), 0);
|
||||||
|
if (!pBuilding->bImBeingRendered)
|
||||||
|
pBuilding->DeleteRwObject();
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
CPlayerPed *pPlayerPed = FindPlayerPed();
|
||||||
|
pPlayerPed->RemoveWeaponAnims(0, -1000.0f);
|
||||||
|
NumberOfSavedWeapons = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < TOTAL_WEAPON_SLOTS; i++) {
|
||||||
|
if (pPlayerPed->m_weapons[i].m_eWeaponType != WEAPONTYPE_UNARMED) {
|
||||||
|
SavedWeaponIDs[NumberOfSavedWeapons] = pPlayerPed->m_weapons[i].m_eWeaponType;
|
||||||
|
SavedWeaponAmmo[NumberOfSavedWeapons] = pPlayerPed->m_weapons[i].m_nAmmoTotal;
|
||||||
|
NumberOfSavedWeapons++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pPlayerPed->ClearWeapons();
|
||||||
|
bModelsRemovedForCutscene = true;
|
||||||
|
//CGame::DrasticTidyUpMemory(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CCutsceneMgr::LoadEverythingBecauseCutsceneDeletedAllOfIt()
|
||||||
|
{
|
||||||
|
bModelsRemovedForCutscene = false;
|
||||||
|
CStreaming::LoadInitialPeds();
|
||||||
|
CStreaming::LoadInitialWeapons();
|
||||||
|
//CStreaming::LoadInitialVehicles();
|
||||||
|
|
||||||
|
CPlayerPed *pPlayerPed = FindPlayerPed();
|
||||||
|
for (int i = 0; i < NumberOfSavedWeapons; i++) {
|
||||||
|
int32 weaponModelId = CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModelId;
|
||||||
|
uint8 flags = CStreaming::ms_aInfoForModel[weaponModelId].m_flags;
|
||||||
|
CStreaming::RequestModel(weaponModelId, STREAMFLAGS_DONT_REMOVE);
|
||||||
|
CStreaming::LoadAllRequestedModels(false);
|
||||||
|
if (CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModel2Id != -1) {
|
||||||
|
CStreaming::RequestModel(CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModel2Id, 0);
|
||||||
|
CStreaming::LoadAllRequestedModels(false);
|
||||||
|
}
|
||||||
|
if (!(flags & STREAMFLAGS_DONT_REMOVE))
|
||||||
|
CStreaming::SetModelIsDeletable(weaponModelId);
|
||||||
|
pPlayerPed->GiveWeapon(SavedWeaponIDs[i], SavedWeaponAmmo[i], true);
|
||||||
|
}
|
||||||
|
NumberOfSavedWeapons = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CCutsceneMgr::Update(void)
|
CCutsceneMgr::Update(void)
|
||||||
{
|
{
|
||||||
enum {
|
if (ms_cutsceneLoadStatus != CUTSCENE_NOT_LOADED)
|
||||||
CUTSCENE_LOADING_0 = 0,
|
Update_overlay();
|
||||||
CUTSCENE_LOADING_AUDIO,
|
|
||||||
CUTSCENE_LOADING_2,
|
|
||||||
CUTSCENE_LOADING_3,
|
|
||||||
CUTSCENE_LOADING_4
|
|
||||||
};
|
|
||||||
|
|
||||||
switch (ms_cutsceneLoadStatus) {
|
|
||||||
case CUTSCENE_LOADING_AUDIO:
|
|
||||||
SetupCutsceneToStart();
|
|
||||||
if (CGeneral::faststricmp(ms_cutsceneName, "end"))
|
|
||||||
DMAudio.PlayPreloadedCutSceneMusic();
|
|
||||||
ms_cutsceneLoadStatus++;
|
|
||||||
break;
|
|
||||||
case CUTSCENE_LOADING_2:
|
|
||||||
case CUTSCENE_LOADING_3:
|
|
||||||
ms_cutsceneLoadStatus++;
|
|
||||||
break;
|
|
||||||
case CUTSCENE_LOADING_4:
|
|
||||||
ms_cutsceneLoadStatus = CUTSCENE_LOADING_0;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ms_running) return;
|
|
||||||
|
|
||||||
ms_cutsceneTimer += CTimer::GetTimeStepNonClippedInSeconds();
|
|
||||||
if (CGeneral::faststricmp(ms_cutsceneName, "end") && TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FLYBY && ms_cutsceneLoadStatus == CUTSCENE_LOADING_0) {
|
|
||||||
if (CPad::GetPad(0)->GetCrossJustDown()
|
|
||||||
|| (CGame::playingIntro && CPad::GetPad(0)->GetStartJustDown())
|
|
||||||
|| CPad::GetPad(0)->GetLeftMouseJustDown()
|
|
||||||
|| CPad::GetPad(0)->GetEnterJustDown()
|
|
||||||
|| CPad::GetPad(0)->GetCharJustDown(' '))
|
|
||||||
FinishCutscene();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CCutsceneMgr::HasCutsceneFinished(void) { return TheCamera.GetPositionAlongSpline() == 1.0f; }
|
void
|
||||||
|
CCutsceneMgr::LoadAnimationUncompressed(char const* name)
|
||||||
|
{
|
||||||
|
strcpy(ms_aUncompressedCutsceneAnims[ms_numUncompressedCutsceneAnims], name);
|
||||||
|
|
||||||
|
// Because that's how CAnimManager knows the end of array
|
||||||
|
++ms_numUncompressedCutsceneAnims;
|
||||||
|
assert(ms_numUncompressedCutsceneAnims < ARRAY_SIZE(ms_aUncompressedCutsceneAnims));
|
||||||
|
ms_aUncompressedCutsceneAnims[ms_numUncompressedCutsceneAnims][0] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
CCutsceneMgr::IsCutsceneSkipButtonBeingPressed()
|
||||||
|
{
|
||||||
|
return (CPad::GetPad(0)->GetCrossJustDown()
|
||||||
|
|| CPad::GetPad(0)->GetLeftMouseJustDown()
|
||||||
|
|| CPad::GetPad(0)->GetEnterJustDown()
|
||||||
|
|| CPad::GetPad(0)->GetCharJustDown(' '));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CCutsceneMgr::AppendToNextCutscene(const char *object, const char *anim)
|
||||||
|
{
|
||||||
|
strcpy(ms_cAppendObjectName[ms_numAppendObjectNames], object);
|
||||||
|
strlwr(ms_cAppendObjectName[ms_numAppendObjectNames]);
|
||||||
|
strcpy(ms_cAppendAnimName[ms_numAppendObjectNames], anim);
|
||||||
|
strlwr(ms_cAppendAnimName[ms_numAppendObjectNames]);
|
||||||
|
ms_numAppendObjectNames++;
|
||||||
|
}
|
||||||
@@ -1,14 +1,69 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "CutsceneObject.h"
|
#include "CutsceneObject.h"
|
||||||
|
|
||||||
#define CUTSCENENAMESIZE 8
|
|
||||||
|
|
||||||
class CDirectory;
|
class CDirectory;
|
||||||
class CAnimBlendAssocGroup;
|
class CAnimBlendAssocGroup;
|
||||||
class CCutsceneHead;
|
class CCutsceneHead;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
CUTSCENE_NOT_LOADED = 0,
|
||||||
|
CUTSCENE_LOADING,
|
||||||
|
CUTSCENE_LOADED,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
CUTSCENE_PLAYING_0 = 0,
|
||||||
|
CUTSCENE_STARTED,
|
||||||
|
CUTSCENE_PLAYING_2,
|
||||||
|
CUTSCENE_PLAYING_3,
|
||||||
|
CUTSCENE_PLAYING_4,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
NAMELENGTH = 32,
|
||||||
|
NUM_CUTS_PARTICLE_EFFECTS = 8,
|
||||||
|
NUM_CUTS_MAX_TEXTS = 64,
|
||||||
|
NUM_CUTS_UNCOMPRESSED_ANIMS = 8,
|
||||||
|
TEXT_KEY_SIZE = 8,
|
||||||
|
CUTSCENENAMESIZE = 8
|
||||||
|
};
|
||||||
|
|
||||||
|
struct sToHideItem
|
||||||
|
{
|
||||||
|
float x, y, z;
|
||||||
|
char name[NAMELENGTH];
|
||||||
|
};
|
||||||
|
|
||||||
|
// TODO: figure out from SA
|
||||||
|
// this is unused in LCS anyway
|
||||||
|
struct sParticleEffect
|
||||||
|
{
|
||||||
|
char name[NAMELENGTH];
|
||||||
|
bool bPlayed; // ??
|
||||||
|
int iTime;
|
||||||
|
int unk1;
|
||||||
|
int unk2;
|
||||||
|
char name2[NAMELENGTH];
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
float z;
|
||||||
|
float unkX;
|
||||||
|
float unkY;
|
||||||
|
float unkZ;
|
||||||
|
bool unk10;
|
||||||
|
bool unk11;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct sAttachInfo
|
||||||
|
{
|
||||||
|
int attachToId, objectId, boneId;
|
||||||
|
};
|
||||||
|
|
||||||
class CCutsceneMgr
|
class CCutsceneMgr
|
||||||
{
|
{
|
||||||
|
|
||||||
static bool ms_running;
|
static bool ms_running;
|
||||||
static CCutsceneObject *ms_pCutsceneObjects[NUMCUTSCENEOBJECTS];
|
static CCutsceneObject *ms_pCutsceneObjects[NUMCUTSCENEOBJECTS];
|
||||||
|
|
||||||
@@ -21,31 +76,104 @@ class CCutsceneMgr
|
|||||||
static CAnimBlendAssocGroup ms_cutsceneAssociations;
|
static CAnimBlendAssocGroup ms_cutsceneAssociations;
|
||||||
static CVector ms_cutsceneOffset;
|
static CVector ms_cutsceneOffset;
|
||||||
static float ms_cutsceneTimer;
|
static float ms_cutsceneTimer;
|
||||||
|
static bool ms_wasCutsceneSkipped;
|
||||||
static bool ms_cutsceneProcessing;
|
static bool ms_cutsceneProcessing;
|
||||||
|
static bool ms_useCutsceneShadows;
|
||||||
|
static bool ms_hasFileInfo;
|
||||||
|
static int ms_numLoadObjectNames;
|
||||||
|
|
||||||
|
static char ms_cAppendAnimName[NUMCUTSCENEOBJECTS][NAMELENGTH];
|
||||||
|
static char ms_cAppendObjectName[NUMCUTSCENEOBJECTS][NAMELENGTH];
|
||||||
|
static int ms_numAppendObjectNames;
|
||||||
public:
|
public:
|
||||||
static CDirectory *ms_pCutsceneDir;
|
static CDirectory *ms_pCutsceneDir;
|
||||||
static uint32 ms_cutsceneLoadStatus;
|
static uint32 ms_cutsceneLoadStatus;
|
||||||
|
|
||||||
|
static bool mCutsceneSkipFading;
|
||||||
|
static int mCutsceneSkipFadeTime;
|
||||||
|
|
||||||
|
static float m_fPrevCarDensity;
|
||||||
|
static float m_fPrevPedDensity;
|
||||||
|
|
||||||
|
static bool m_PrevExtraColourOn;
|
||||||
|
static uint32 m_PrevExtraColour;
|
||||||
|
|
||||||
|
static uint32 ms_iNumParticleEffects;
|
||||||
|
static sParticleEffect ms_pParticleEffects[NUM_CUTS_PARTICLE_EFFECTS];
|
||||||
|
|
||||||
|
static sToHideItem ms_crToHideItems[NUMCUTSCENEOBJECTS];
|
||||||
|
static uint32 ms_iNumHiddenEntities;
|
||||||
|
static CEntity *ms_pHiddenEntities[NUMCUTSCENEOBJECTS];
|
||||||
|
|
||||||
|
static int ms_numAttachObjectToBones;
|
||||||
|
static bool ms_bRepeatObject[NUMCUTSCENEOBJECTS];
|
||||||
|
|
||||||
|
static sAttachInfo ms_iAttachObjectToBone[NUMCUTSCENEOBJECTS];
|
||||||
|
|
||||||
|
static uint32 ms_numUncompressedCutsceneAnims;
|
||||||
|
|
||||||
|
static char ms_aUncompressedCutsceneAnims[NUM_CUTS_UNCOMPRESSED_ANIMS][NAMELENGTH];
|
||||||
|
|
||||||
|
static uint32 ms_iTextDuration[NUM_CUTS_MAX_TEXTS];
|
||||||
|
static uint32 ms_iTextStartTime[NUM_CUTS_MAX_TEXTS];
|
||||||
|
static char ms_cTextOutput[NUM_CUTS_MAX_TEXTS][TEXT_KEY_SIZE];
|
||||||
|
|
||||||
|
static uint32 ms_currTextOutput;
|
||||||
|
static uint32 ms_numTextOutput;
|
||||||
|
static uint32 ms_iModelIndex[NUMCUTSCENEOBJECTS];
|
||||||
|
|
||||||
|
static char ms_cLoadAnimName[NUMCUTSCENEOBJECTS][NAMELENGTH];
|
||||||
|
static char ms_cLoadObjectName[NUMCUTSCENEOBJECTS][NAMELENGTH];
|
||||||
|
|
||||||
|
static uint32 ms_cutscenePlayStatus;
|
||||||
|
|
||||||
|
static void StartCutscene();
|
||||||
static void StartCutsceneProcessing() { ms_cutsceneProcessing = true; }
|
static void StartCutsceneProcessing() { ms_cutsceneProcessing = true; }
|
||||||
static bool IsRunning(void) { return ms_running; }
|
static bool IsRunning(void) { return ms_running; }
|
||||||
static bool HasLoaded(void) { return ms_loaded; }
|
static bool HasLoaded(void) { return ms_loaded; }
|
||||||
static bool IsCutsceneProcessing(void) { return ms_cutsceneProcessing; }
|
static bool IsCutsceneProcessing(void) { return ms_cutsceneProcessing; }
|
||||||
|
static bool WasCutsceneSkipped(void) { return ms_wasCutsceneSkipped; }
|
||||||
static bool UseLodMultiplier(void) { return ms_useLodMultiplier; }
|
static bool UseLodMultiplier(void) { return ms_useLodMultiplier; }
|
||||||
static CCutsceneObject* GetCutsceneObject(int id) { return ms_pCutsceneObjects[id]; }
|
static CCutsceneObject* GetCutsceneObject(int id) { return ms_pCutsceneObjects[id]; }
|
||||||
static int GetCutsceneTimeInMilleseconds(void) { return 1000.0f * ms_cutsceneTimer; }
|
static uint32 GetCutsceneTimeInMilleseconds(void);
|
||||||
static char *GetCutsceneName(void) { return ms_cutsceneName; }
|
static char *GetCutsceneName(void) { return ms_cutsceneName; }
|
||||||
static void SetCutsceneOffset(const CVector& vec) { ms_cutsceneOffset = vec; }
|
static void SetCutsceneOffset(const CVector& vec) { ms_cutsceneOffset = vec; }
|
||||||
static bool HasCutsceneFinished(void);
|
static bool HasCutsceneFinished(void);
|
||||||
|
|
||||||
static void Initialise(void);
|
static void Initialise(void *dir = nil);
|
||||||
static void Shutdown(void);
|
static void Shutdown(void);
|
||||||
static void LoadCutsceneData(const char *szCutsceneName);
|
static void LoadCutsceneData(const char *szCutsceneName);
|
||||||
static void FinishCutscene(void);
|
static void FinishCutscene(void);
|
||||||
static void SetHeadAnim(const char *animName, CObject *pObject);
|
|
||||||
static void SetupCutsceneToStart(void);
|
static void SetupCutsceneToStart(void);
|
||||||
static void SetCutsceneAnim(const char *animName, CObject *pObject);
|
static void SetCutsceneAnim(const char *animName, CObject *pObject);
|
||||||
static CCutsceneHead *AddCutsceneHead(CObject *pObject, int modelId);
|
static void SetCutsceneAnimToLoop(const char *animName);
|
||||||
|
static CCutsceneHead *SetHeadAnim(const char*, CObject *pObject);
|
||||||
static CCutsceneObject *CreateCutsceneObject(int modelId);
|
static CCutsceneObject *CreateCutsceneObject(int modelId);
|
||||||
static void DeleteCutsceneData(void);
|
static void DeleteCutsceneData(void);
|
||||||
|
static void LoadAnimationUncompressed(char const*);
|
||||||
static void Update(void);
|
static void Update(void);
|
||||||
|
|
||||||
|
static void AttachObjectToParent(CObject *pObject, CEntity *pAttachTo);
|
||||||
|
static void AttachObjectToFrame(CObject *pObject, CEntity *pAttachTo, const char *frame);
|
||||||
|
static void AttachObjectToBone(CObject *pObject, CObject *pAttachTo, int frame);
|
||||||
|
static void RemoveEverythingBecauseCutsceneDoesntFitInMemory();
|
||||||
|
static void LoadEverythingBecauseCutsceneDeletedAllOfIt();
|
||||||
|
static void DisableCutsceneShadows() { ms_useCutsceneShadows = false; }
|
||||||
|
|
||||||
|
|
||||||
|
static void LoadCutsceneData_overlay(const char* szCutsceneName);
|
||||||
|
static bool LoadCutsceneData_postload(bool b = false);
|
||||||
|
static void Update_overlay(void);
|
||||||
|
static void DeleteCutsceneData_overlay(void);
|
||||||
|
|
||||||
|
static bool IsCutsceneSkipButtonBeingPressed();
|
||||||
|
static void AppendToNextCutscene(const char *object, const char *anim);
|
||||||
|
|
||||||
|
static void LoadCutsceneData_preload();
|
||||||
|
static void LoadCutsceneData_loading();
|
||||||
|
static void HideRequestedObjects();
|
||||||
|
|
||||||
|
static bool PresubBodge();
|
||||||
|
|
||||||
|
static void Write(base::cRelocatableChunkWriter& writer);
|
||||||
};
|
};
|
||||||
|
|||||||
1030
src/animation/CutsceneMgr_overlay.cpp
Normal file
1030
src/animation/CutsceneMgr_overlay.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -17,6 +17,8 @@ void FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg);
|
|||||||
void FrameUpdateCallBackWithVelocityExtractionSkinned(AnimBlendFrameData *frame, void *arg);
|
void FrameUpdateCallBackWithVelocityExtractionSkinned(AnimBlendFrameData *frame, void *arg);
|
||||||
void FrameUpdateCallBackWith3dVelocityExtractionSkinned(AnimBlendFrameData *frame, void *arg);
|
void FrameUpdateCallBackWith3dVelocityExtractionSkinned(AnimBlendFrameData *frame, void *arg);
|
||||||
|
|
||||||
|
void FrameUpdateCallBackNonSkinnedCompressed(AnimBlendFrameData *frame, void *arg);
|
||||||
|
void FrameUpdateCallBackSkinnedCompressed(AnimBlendFrameData *frame, void *arg);
|
||||||
|
|
||||||
void
|
void
|
||||||
FrameUpdateCallBackNonSkinned(AnimBlendFrameData *frame, void *arg)
|
FrameUpdateCallBackNonSkinned(AnimBlendFrameData *frame, void *arg)
|
||||||
@@ -29,7 +31,7 @@ FrameUpdateCallBackNonSkinned(AnimBlendFrameData *frame, void *arg)
|
|||||||
AnimBlendFrameUpdateData *updateData = (AnimBlendFrameUpdateData*)arg;
|
AnimBlendFrameUpdateData *updateData = (AnimBlendFrameUpdateData*)arg;
|
||||||
|
|
||||||
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION &&
|
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION &&
|
||||||
gpAnimBlendClump->velocity){
|
gpAnimBlendClump->velocity2d){
|
||||||
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION_3D)
|
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION_3D)
|
||||||
FrameUpdateCallBackWith3dVelocityExtractionNonSkinned(frame, arg);
|
FrameUpdateCallBackWith3dVelocityExtractionNonSkinned(frame, arg);
|
||||||
else
|
else
|
||||||
@@ -138,11 +140,11 @@ FrameUpdateCallBackWithVelocityExtractionNonSkinned(AnimBlendFrameData *frame, v
|
|||||||
}
|
}
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
||||||
gpAnimBlendClump->velocity->x = transx - curx;
|
gpAnimBlendClump->velocity2d->x = transx - curx;
|
||||||
gpAnimBlendClump->velocity->y = transy - cury;
|
gpAnimBlendClump->velocity2d->y = transy - cury;
|
||||||
if(looped){
|
if(looped){
|
||||||
gpAnimBlendClump->velocity->x += endx;
|
gpAnimBlendClump->velocity2d->x += endx;
|
||||||
gpAnimBlendClump->velocity->y += endy;
|
gpAnimBlendClump->velocity2d->y += endy;
|
||||||
}
|
}
|
||||||
mat->pos.x = pos.x - transx;
|
mat->pos.x = pos.x - transx;
|
||||||
mat->pos.y = pos.y - transy;
|
mat->pos.y = pos.y - transy;
|
||||||
@@ -218,9 +220,9 @@ FrameUpdateCallBackWith3dVelocityExtractionNonSkinned(AnimBlendFrameData *frame,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
||||||
*gpAnimBlendClump->velocity = trans - cur;
|
*gpAnimBlendClump->velocity3d = trans - cur;
|
||||||
if(looped)
|
if(looped)
|
||||||
*gpAnimBlendClump->velocity += end;
|
*gpAnimBlendClump->velocity3d += end;
|
||||||
mat->pos.x = (pos - trans).x + frame->resetPos.x;
|
mat->pos.x = (pos - trans).x + frame->resetPos.x;
|
||||||
mat->pos.y = (pos - trans).y + frame->resetPos.y;
|
mat->pos.y = (pos - trans).y + frame->resetPos.y;
|
||||||
mat->pos.z = (pos - trans).z + frame->resetPos.z;
|
mat->pos.z = (pos - trans).z + frame->resetPos.z;
|
||||||
@@ -228,12 +230,11 @@ FrameUpdateCallBackWith3dVelocityExtractionNonSkinned(AnimBlendFrameData *frame,
|
|||||||
RwMatrixUpdate(mat);
|
RwMatrixUpdate(mat);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PED_SKIN
|
|
||||||
|
|
||||||
void
|
void
|
||||||
FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg)
|
FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg)
|
||||||
{
|
{
|
||||||
CVector vec, pos(0.0f, 0.0f, 0.0f);
|
CVector vec, pos(0.0f, 0.0f, 0.0f);
|
||||||
|
float transBlendAmount = 0.0f;
|
||||||
CQuaternion q, rot(0.0f, 0.0f, 0.0f, 0.0f);
|
CQuaternion q, rot(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
float totalBlendAmount = 0.0f;
|
float totalBlendAmount = 0.0f;
|
||||||
RpHAnimStdInterpFrame *xform = frame->hanimFrame;
|
RpHAnimStdInterpFrame *xform = frame->hanimFrame;
|
||||||
@@ -241,7 +242,7 @@ FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg)
|
|||||||
AnimBlendFrameUpdateData *updateData = (AnimBlendFrameUpdateData*)arg;
|
AnimBlendFrameUpdateData *updateData = (AnimBlendFrameUpdateData*)arg;
|
||||||
|
|
||||||
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION &&
|
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION &&
|
||||||
gpAnimBlendClump->velocity){
|
gpAnimBlendClump->velocity2d){
|
||||||
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION_3D)
|
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION_3D)
|
||||||
FrameUpdateCallBackWith3dVelocityExtractionSkinned(frame, arg);
|
FrameUpdateCallBackWith3dVelocityExtractionSkinned(frame, arg);
|
||||||
else
|
else
|
||||||
@@ -257,13 +258,13 @@ FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg)
|
|||||||
for(node = updateData->nodes; *node; node++){
|
for(node = updateData->nodes; *node; node++){
|
||||||
if((*node)->sequence){
|
if((*node)->sequence){
|
||||||
(*node)->Update(vec, q, 1.0f-totalBlendAmount);
|
(*node)->Update(vec, q, 1.0f-totalBlendAmount);
|
||||||
if((*node)->sequence->HasTranslation())
|
if((*node)->sequence->HasTranslation()){
|
||||||
pos += vec;
|
pos += vec;
|
||||||
#ifdef FIX_BUGS
|
transBlendAmount += (*node)->association->blendAmount;
|
||||||
|
}
|
||||||
if(DotProduct(rot, q) < 0.0f)
|
if(DotProduct(rot, q) < 0.0f)
|
||||||
rot -= q;
|
rot -= q;
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
rot += q;
|
rot += q;
|
||||||
}
|
}
|
||||||
++*node;
|
++*node;
|
||||||
@@ -278,12 +279,12 @@ FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
||||||
xform->t.x = pos.x;
|
xform->t.x = transBlendAmount*pos.x;
|
||||||
xform->t.y = pos.y;
|
xform->t.y = transBlendAmount*pos.y;
|
||||||
xform->t.z = pos.z;
|
xform->t.z = transBlendAmount*pos.z;
|
||||||
xform->t.x += frame->resetPos.x;
|
xform->t.x += (1.0f-transBlendAmount)*frame->resetPos.x;
|
||||||
xform->t.y += frame->resetPos.y;
|
xform->t.y += (1.0f-transBlendAmount)*frame->resetPos.y;
|
||||||
xform->t.z += frame->resetPos.z;
|
xform->t.z += (1.0f-transBlendAmount)*frame->resetPos.z;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,11 +320,9 @@ FrameUpdateCallBackWithVelocityExtractionSkinned(AnimBlendFrameData *frame, void
|
|||||||
for(node = updateData->nodes; *node; node++){
|
for(node = updateData->nodes; *node; node++){
|
||||||
if((*node)->sequence){
|
if((*node)->sequence){
|
||||||
bool nodelooped = (*node)->Update(vec, q, 1.0f-totalBlendAmount);
|
bool nodelooped = (*node)->Update(vec, q, 1.0f-totalBlendAmount);
|
||||||
#ifdef FIX_BUGS
|
|
||||||
if(DotProduct(rot, q) < 0.0f)
|
if(DotProduct(rot, q) < 0.0f)
|
||||||
rot -= q;
|
rot -= q;
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
rot += q;
|
rot += q;
|
||||||
if((*node)->sequence->HasTranslation()){
|
if((*node)->sequence->HasTranslation()){
|
||||||
pos += vec;
|
pos += vec;
|
||||||
@@ -353,11 +352,11 @@ FrameUpdateCallBackWithVelocityExtractionSkinned(AnimBlendFrameData *frame, void
|
|||||||
}
|
}
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
||||||
gpAnimBlendClump->velocity->x = transx - curx;
|
gpAnimBlendClump->velocity2d->x = transx - curx;
|
||||||
gpAnimBlendClump->velocity->y = transy - cury;
|
gpAnimBlendClump->velocity2d->y = transy - cury;
|
||||||
if(looped){
|
if(looped){
|
||||||
gpAnimBlendClump->velocity->x += endx;
|
gpAnimBlendClump->velocity2d->x += endx;
|
||||||
gpAnimBlendClump->velocity->y += endy;
|
gpAnimBlendClump->velocity2d->y += endy;
|
||||||
}
|
}
|
||||||
xform->t.x = pos.x - transx;
|
xform->t.x = pos.x - transx;
|
||||||
xform->t.y = pos.y - transy;
|
xform->t.y = pos.y - transy;
|
||||||
@@ -433,13 +432,237 @@ FrameUpdateCallBackWith3dVelocityExtractionSkinned(AnimBlendFrameData *frame, vo
|
|||||||
}
|
}
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
||||||
*gpAnimBlendClump->velocity = trans - cur;
|
*gpAnimBlendClump->velocity3d = trans - cur;
|
||||||
if(looped)
|
if(looped)
|
||||||
*gpAnimBlendClump->velocity += end;
|
*gpAnimBlendClump->velocity3d += end;
|
||||||
xform->t.x = (pos - trans).x + frame->resetPos.x;
|
xform->t.x = (pos - trans).x + frame->resetPos.x;
|
||||||
xform->t.y = (pos - trans).y + frame->resetPos.y;
|
xform->t.y = (pos - trans).y + frame->resetPos.y;
|
||||||
xform->t.z = (pos - trans).z + frame->resetPos.z;
|
xform->t.z = (pos - trans).z + frame->resetPos.z;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
FrameUpdateCallBackOffscreen(AnimBlendFrameData *frame, void *arg)
|
||||||
|
{
|
||||||
|
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION && gpAnimBlendClump->velocity2d)
|
||||||
|
FrameUpdateCallBackWithVelocityExtractionSkinned(frame, arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
FrameUpdateCallBackNonSkinnedCompressed(AnimBlendFrameData *frame, void *arg)
|
||||||
|
{
|
||||||
|
CVector vec, pos(0.0f, 0.0f, 0.0f);
|
||||||
|
CQuaternion q, rot(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
|
float totalBlendAmount = 0.0f;
|
||||||
|
CVector trans(0.0f, 0.0f, 0.0f);
|
||||||
|
CVector cur(0.0f, 0.0f, 0.0f);
|
||||||
|
CVector end(0.0f, 0.0f, 0.0f);
|
||||||
|
bool looped = false;
|
||||||
|
RwMatrix *mat = RwFrameGetMatrix(frame->frame);
|
||||||
|
CAnimBlendNode **node;
|
||||||
|
AnimBlendFrameUpdateData *updateData = (AnimBlendFrameUpdateData*)arg;
|
||||||
|
|
||||||
|
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION &&
|
||||||
|
gpAnimBlendClump->velocity2d){
|
||||||
|
if(updateData->foobar)
|
||||||
|
for(node = updateData->nodes; *node; node++)
|
||||||
|
if((*node)->sequence && (*node)->association->IsPartial())
|
||||||
|
totalBlendAmount += (*node)->association->blendAmount;
|
||||||
|
|
||||||
|
for(node = updateData->nodes; *node; node++)
|
||||||
|
if((*node)->sequence && (*node)->sequence->HasTranslation()){
|
||||||
|
if((*node)->association->HasTranslation()){
|
||||||
|
(*node)->GetCurrentTranslationCompressed(vec, 1.0f-totalBlendAmount);
|
||||||
|
cur += vec;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(node = updateData->nodes; *node; node++){
|
||||||
|
if((*node)->sequence){
|
||||||
|
bool nodelooped = (*node)->UpdateCompressed(vec, q, 1.0f-totalBlendAmount);
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
if(DotProduct(rot, q) < 0.0f)
|
||||||
|
rot -= q;
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
|
rot += q;
|
||||||
|
if((*node)->sequence->HasTranslation()){
|
||||||
|
pos += vec;
|
||||||
|
if((*node)->association->HasTranslation()){
|
||||||
|
trans += vec;
|
||||||
|
looped |= nodelooped;
|
||||||
|
if(nodelooped){
|
||||||
|
(*node)->GetEndTranslationCompressed(vec, 1.0f-totalBlendAmount);
|
||||||
|
end += vec;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
++*node;
|
||||||
|
}
|
||||||
|
|
||||||
|
if((frame->flag & AnimBlendFrameData::IGNORE_ROTATION) == 0){
|
||||||
|
RwMatrixSetIdentity(mat);
|
||||||
|
rot.Normalise();
|
||||||
|
rot.Get(mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
||||||
|
*gpAnimBlendClump->velocity3d = trans - cur;
|
||||||
|
if(looped)
|
||||||
|
*gpAnimBlendClump->velocity3d += end;
|
||||||
|
mat->pos.x = (pos - trans).x + frame->resetPos.x;
|
||||||
|
mat->pos.y = (pos - trans).y + frame->resetPos.y;
|
||||||
|
mat->pos.z = (pos - trans).z + frame->resetPos.z;
|
||||||
|
}
|
||||||
|
RwMatrixUpdate(mat);
|
||||||
|
}else{
|
||||||
|
if(updateData->foobar)
|
||||||
|
for(node = updateData->nodes; *node; node++)
|
||||||
|
if((*node)->sequence && (*node)->association->IsPartial())
|
||||||
|
totalBlendAmount += (*node)->association->blendAmount;
|
||||||
|
|
||||||
|
for(node = updateData->nodes; *node; node++){
|
||||||
|
if((*node)->sequence){
|
||||||
|
(*node)->UpdateCompressed(vec, q, 1.0f-totalBlendAmount);
|
||||||
|
if((*node)->sequence->HasTranslation())
|
||||||
|
pos += vec;
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
if(DotProduct(rot, q) < 0.0f)
|
||||||
|
rot -= q;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
rot += q;
|
||||||
|
}
|
||||||
|
++*node;
|
||||||
|
}
|
||||||
|
|
||||||
|
if((frame->flag & AnimBlendFrameData::IGNORE_ROTATION) == 0){
|
||||||
|
RwMatrixSetIdentity(mat);
|
||||||
|
rot.Normalise();
|
||||||
|
rot.Get(mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
||||||
|
mat->pos.x = pos.x;
|
||||||
|
mat->pos.y = pos.y;
|
||||||
|
mat->pos.z = pos.z;
|
||||||
|
mat->pos.x += frame->resetPos.x;
|
||||||
|
mat->pos.y += frame->resetPos.y;
|
||||||
|
mat->pos.z += frame->resetPos.z;
|
||||||
|
}
|
||||||
|
RwMatrixUpdate(mat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
FrameUpdateCallBackSkinnedCompressed(AnimBlendFrameData *frame, void *arg)
|
||||||
|
{
|
||||||
|
CVector vec, pos(0.0f, 0.0f, 0.0f);
|
||||||
|
CQuaternion q, rot(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
|
float totalBlendAmount = 0.0f;
|
||||||
|
CVector trans(0.0f, 0.0f, 0.0f);
|
||||||
|
CVector cur(0.0f, 0.0f, 0.0f);
|
||||||
|
CVector end(0.0f, 0.0f, 0.0f);
|
||||||
|
bool looped = false;
|
||||||
|
RpHAnimStdInterpFrame *xform = frame->hanimFrame;
|
||||||
|
CAnimBlendNode **node;
|
||||||
|
AnimBlendFrameUpdateData *updateData = (AnimBlendFrameUpdateData*)arg;
|
||||||
|
|
||||||
|
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION &&
|
||||||
|
gpAnimBlendClump->velocity2d){
|
||||||
|
if(updateData->foobar)
|
||||||
|
for(node = updateData->nodes; *node; node++)
|
||||||
|
if((*node)->sequence && (*node)->association->IsPartial())
|
||||||
|
totalBlendAmount += (*node)->association->blendAmount;
|
||||||
|
|
||||||
|
for(node = updateData->nodes; *node; node++)
|
||||||
|
if((*node)->sequence && (*node)->sequence->HasTranslation()){
|
||||||
|
if((*node)->association->HasTranslation()){
|
||||||
|
(*node)->GetCurrentTranslationCompressed(vec, 1.0f-totalBlendAmount);
|
||||||
|
cur += vec;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(node = updateData->nodes; *node; node++){
|
||||||
|
if((*node)->sequence){
|
||||||
|
bool nodelooped = (*node)->UpdateCompressed(vec, q, 1.0f-totalBlendAmount);
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
if(DotProduct(rot, q) < 0.0f)
|
||||||
|
rot -= q;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
rot += q;
|
||||||
|
if((*node)->sequence->HasTranslation()){
|
||||||
|
pos += vec;
|
||||||
|
if((*node)->association->HasTranslation()){
|
||||||
|
trans += vec;
|
||||||
|
looped |= nodelooped;
|
||||||
|
if(nodelooped){
|
||||||
|
(*node)->GetEndTranslationCompressed(vec, 1.0f-totalBlendAmount);
|
||||||
|
end += vec;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
++*node;
|
||||||
|
}
|
||||||
|
|
||||||
|
if((frame->flag & AnimBlendFrameData::IGNORE_ROTATION) == 0){
|
||||||
|
rot.Normalise();
|
||||||
|
xform->q.imag.x = rot.x;
|
||||||
|
xform->q.imag.y = rot.y;
|
||||||
|
xform->q.imag.z = rot.z;
|
||||||
|
xform->q.real = rot.w;
|
||||||
|
}
|
||||||
|
|
||||||
|
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
||||||
|
*gpAnimBlendClump->velocity3d = trans - cur;
|
||||||
|
if(looped)
|
||||||
|
*gpAnimBlendClump->velocity3d += end;
|
||||||
|
xform->t.x = (pos - trans).x + frame->resetPos.x;
|
||||||
|
xform->t.y = (pos - trans).y + frame->resetPos.y;
|
||||||
|
xform->t.z = (pos - trans).z + frame->resetPos.z;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
float transBlendAmount = 0.0f;
|
||||||
|
|
||||||
|
if(updateData->foobar)
|
||||||
|
for(node = updateData->nodes; *node; node++)
|
||||||
|
if((*node)->sequence && (*node)->association->IsPartial())
|
||||||
|
totalBlendAmount += (*node)->association->blendAmount;
|
||||||
|
|
||||||
|
for(node = updateData->nodes; *node; node++){
|
||||||
|
if((*node)->sequence){
|
||||||
|
(*node)->UpdateCompressed(vec, q, 1.0f-totalBlendAmount);
|
||||||
|
if((*node)->sequence->HasTranslation()){
|
||||||
|
pos += vec;
|
||||||
|
transBlendAmount += (*node)->association->blendAmount;
|
||||||
|
}
|
||||||
|
if(DotProduct(rot, q) < 0.0f)
|
||||||
|
rot -= q;
|
||||||
|
else
|
||||||
|
rot += q;
|
||||||
|
}
|
||||||
|
++*node;
|
||||||
|
}
|
||||||
|
|
||||||
|
if((frame->flag & AnimBlendFrameData::IGNORE_ROTATION) == 0){
|
||||||
|
rot.Normalise();
|
||||||
|
xform->q.imag.x = rot.x;
|
||||||
|
xform->q.imag.y = rot.y;
|
||||||
|
xform->q.imag.z = rot.z;
|
||||||
|
xform->q.real = rot.w;
|
||||||
|
}
|
||||||
|
|
||||||
|
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
||||||
|
xform->t.x = transBlendAmount*pos.x;
|
||||||
|
xform->t.y = transBlendAmount*pos.y;
|
||||||
|
xform->t.z = transBlendAmount*pos.z;
|
||||||
|
xform->t.x += (1.0f-transBlendAmount)*frame->resetPos.x;
|
||||||
|
xform->t.y += (1.0f-transBlendAmount)*frame->resetPos.y;
|
||||||
|
xform->t.z += (1.0f-transBlendAmount)*frame->resetPos.z;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -10,9 +10,7 @@
|
|||||||
#include "AnimBlendAssociation.h"
|
#include "AnimBlendAssociation.h"
|
||||||
#include "AnimManager.h"
|
#include "AnimManager.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
#ifdef PED_SKIN
|
|
||||||
#include "PedModelInfo.h"
|
#include "PedModelInfo.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
RwInt32 ClumpOffset;
|
RwInt32 ClumpOffset;
|
||||||
|
|
||||||
@@ -142,7 +140,6 @@ FrameInitCBskin(AnimBlendFrameData *frameData, void*)
|
|||||||
frameData->flag = 0;
|
frameData->flag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PED_SKIN
|
|
||||||
void
|
void
|
||||||
RpAnimBlendClumpInitSkinned(RpClump *clump)
|
RpAnimBlendClumpInitSkinned(RpClump *clump)
|
||||||
{
|
{
|
||||||
@@ -156,7 +153,7 @@ RpAnimBlendClumpInitSkinned(RpClump *clump)
|
|||||||
|
|
||||||
RpAnimBlendAllocateData(clump);
|
RpAnimBlendAllocateData(clump);
|
||||||
clumpData = *RPANIMBLENDCLUMPDATA(clump);
|
clumpData = *RPANIMBLENDCLUMPDATA(clump);
|
||||||
atomic = IsClumpSkinned(clump);
|
atomic = GetFirstAtomic(clump);
|
||||||
assert(atomic);
|
assert(atomic);
|
||||||
skin = RpSkinGeometryGetSkin(RpAtomicGetGeometry(atomic));
|
skin = RpSkinGeometryGetSkin(RpAtomicGetGeometry(atomic));
|
||||||
assert(skin);
|
assert(skin);
|
||||||
@@ -171,12 +168,15 @@ RpAnimBlendClumpInitSkinned(RpClump *clump)
|
|||||||
for(i = 0; i < numBones; i++){
|
for(i = 0; i < numBones; i++){
|
||||||
frames[i].nodeID = HIERNODEID(hier, i);
|
frames[i].nodeID = HIERNODEID(hier, i);
|
||||||
frames[i].resetPos = boneTab[i];
|
frames[i].resetPos = boneTab[i];
|
||||||
|
#ifdef LIBRW
|
||||||
frames[i].hanimFrame = (RpHAnimStdInterpFrame*)rpHANIMHIERARCHYGETINTERPFRAME(hier, i);
|
frames[i].hanimFrame = (RpHAnimStdInterpFrame*)rpHANIMHIERARCHYGETINTERPFRAME(hier, i);
|
||||||
|
#else
|
||||||
|
frames[i].hanimFrame = (RpHAnimStdInterpFrame*)rtANIMGETINTERPFRAME(hier->currentAnim, i);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
clumpData->ForAllFrames(FrameInitCBskin, nil);
|
clumpData->ForAllFrames(FrameInitCBskin, nil);
|
||||||
clumpData->frames[0].flag |= AnimBlendFrameData::VELOCITY_EXTRACTION;
|
clumpData->frames[0].flag |= AnimBlendFrameData::VELOCITY_EXTRACTION;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RpAnimBlendClumpInitNotSkinned(RpClump *clump)
|
RpAnimBlendClumpInitNotSkinned(RpClump *clump)
|
||||||
@@ -200,11 +200,9 @@ RpAnimBlendClumpInitNotSkinned(RpClump *clump)
|
|||||||
void
|
void
|
||||||
RpAnimBlendClumpInit(RpClump *clump)
|
RpAnimBlendClumpInit(RpClump *clump)
|
||||||
{
|
{
|
||||||
#ifdef PED_SKIN
|
|
||||||
if(IsClumpSkinned(clump))
|
if(IsClumpSkinned(clump))
|
||||||
RpAnimBlendClumpInitSkinned(clump);
|
RpAnimBlendClumpInitSkinned(clump);
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
RpAnimBlendClumpInitNotSkinned(clump);
|
RpAnimBlendClumpInitNotSkinned(clump);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,7 +362,6 @@ FillFrameArrayCBnonskin(AnimBlendFrameData *frame, void *arg)
|
|||||||
frames[CVisibilityPlugins::GetFrameHierarchyId(frame->frame)] = frame;
|
frames[CVisibilityPlugins::GetFrameHierarchyId(frame->frame)] = frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PED_SKIN
|
|
||||||
void
|
void
|
||||||
RpAnimBlendClumpFillFrameArraySkin(RpClump *clump, AnimBlendFrameData **frames)
|
RpAnimBlendClumpFillFrameArraySkin(RpClump *clump, AnimBlendFrameData **frames)
|
||||||
{
|
{
|
||||||
@@ -374,22 +371,18 @@ RpAnimBlendClumpFillFrameArraySkin(RpClump *clump, AnimBlendFrameData **frames)
|
|||||||
for(i = PED_MID; i < PED_NODE_MAX; i++)
|
for(i = PED_MID; i < PED_NODE_MAX; i++)
|
||||||
frames[i] = &clumpData->frames[RpHAnimIDGetIndex(hier, ConvertPedNode2BoneTag(i))];
|
frames[i] = &clumpData->frames[RpHAnimIDGetIndex(hier, ConvertPedNode2BoneTag(i))];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RpAnimBlendClumpFillFrameArray(RpClump *clump, AnimBlendFrameData **frames)
|
RpAnimBlendClumpFillFrameArray(RpClump *clump, AnimBlendFrameData **frames)
|
||||||
{
|
{
|
||||||
#ifdef PED_SKIN
|
|
||||||
if(IsClumpSkinned(clump))
|
if(IsClumpSkinned(clump))
|
||||||
RpAnimBlendClumpFillFrameArraySkin(clump, frames);
|
RpAnimBlendClumpFillFrameArraySkin(clump, frames);
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FillFrameArrayCBnonskin, frames);
|
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FillFrameArrayCBnonskin, frames);
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimBlendFrameData *pFrameDataFound;
|
AnimBlendFrameData *pFrameDataFound;
|
||||||
|
|
||||||
// FrameFindCallBack on PS2
|
|
||||||
void
|
void
|
||||||
FrameFindByNameCBnonskin(AnimBlendFrameData *frame, void *arg)
|
FrameFindByNameCBnonskin(AnimBlendFrameData *frame, void *arg)
|
||||||
{
|
{
|
||||||
@@ -398,7 +391,6 @@ FrameFindByNameCBnonskin(AnimBlendFrameData *frame, void *arg)
|
|||||||
pFrameDataFound = frame;
|
pFrameDataFound = frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PED_SKIN
|
|
||||||
void
|
void
|
||||||
FrameFindByNameCBskin(AnimBlendFrameData *frame, void *arg)
|
FrameFindByNameCBskin(AnimBlendFrameData *frame, void *arg)
|
||||||
{
|
{
|
||||||
@@ -406,25 +398,58 @@ FrameFindByNameCBskin(AnimBlendFrameData *frame, void *arg)
|
|||||||
if(name && CGeneral::faststricmp(name, (char*)arg) == 0)
|
if(name && CGeneral::faststricmp(name, (char*)arg) == 0)
|
||||||
pFrameDataFound = frame;
|
pFrameDataFound = frame;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
void
|
||||||
|
FrameFindByBoneCB(AnimBlendFrameData *frame, void *arg)
|
||||||
|
{
|
||||||
|
if(frame->nodeID == (int32)(uintptr)arg)
|
||||||
|
pFrameDataFound = frame;
|
||||||
|
}
|
||||||
|
|
||||||
AnimBlendFrameData*
|
AnimBlendFrameData*
|
||||||
RpAnimBlendClumpFindFrame(RpClump *clump, const char *name)
|
RpAnimBlendClumpFindFrame(RpClump *clump, const char *name)
|
||||||
{
|
{
|
||||||
pFrameDataFound = nil;
|
pFrameDataFound = nil;
|
||||||
#ifdef PED_SKIN
|
|
||||||
if(IsClumpSkinned(clump))
|
if(IsClumpSkinned(clump))
|
||||||
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FrameFindByNameCBskin, (void*)name);
|
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FrameFindByNameCBskin, (void*)name);
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FrameFindByNameCBnonskin, (void*)name);
|
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FrameFindByNameCBnonskin, (void*)name);
|
||||||
return pFrameDataFound;
|
return pFrameDataFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AnimBlendFrameData*
|
||||||
|
RpAnimBlendClumpFindBone(RpClump *clump, uint32 boneTag)
|
||||||
|
{
|
||||||
|
pFrameDataFound = nil;
|
||||||
|
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FrameFindByBoneCB, (void*)boneTag);
|
||||||
|
return pFrameDataFound;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RpAnimBlendClumpUpdateAnimations(RpClump *clump, float timeDelta)
|
RpAnimBlendNodeUpdateKeyframes(AnimBlendFrameData *frames, AnimBlendFrameUpdateData *updateData, int32 numNodes)
|
||||||
|
{
|
||||||
|
CAnimBlendNode **node;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for(node = updateData->nodes; *node; node++){
|
||||||
|
CAnimBlendAssociation *a = (*node)->association;
|
||||||
|
for(i = 0; i < numNodes; i++)
|
||||||
|
if((frames[i].flag & AnimBlendFrameData::VELOCITY_EXTRACTION) == 0 ||
|
||||||
|
gpAnimBlendClump->velocity2d == nil){
|
||||||
|
if((*node)[i].sequence)
|
||||||
|
(*node)[i].FindKeyFrame(a->currentTime - a->timeStep);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO:
|
||||||
|
// CAnimBlendClumpData::LoadFramesIntoSPR
|
||||||
|
// CAnimBlendClumpData::ForAllFramesInSPR
|
||||||
|
void
|
||||||
|
RpAnimBlendClumpUpdateAnimations(RpClump *clump, float timeDelta, bool doRender)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
CAnimBlendAssociation *assoc;
|
||||||
AnimBlendFrameUpdateData updateData;
|
AnimBlendFrameUpdateData updateData;
|
||||||
float totalLength = 0.0f;
|
float totalLength = 0.0f;
|
||||||
float totalBlend = 0.0f;
|
float totalBlend = 0.0f;
|
||||||
@@ -440,30 +465,53 @@ RpAnimBlendClumpUpdateAnimations(RpClump *clump, float timeDelta)
|
|||||||
updateData.foobar = 0;
|
updateData.foobar = 0;
|
||||||
for(link = clumpData->link.next; link; link = next){
|
for(link = clumpData->link.next; link; link = next){
|
||||||
next = link->next;
|
next = link->next;
|
||||||
CAnimBlendAssociation *assoc = CAnimBlendAssociation::FromLink(link);
|
assoc = CAnimBlendAssociation::FromLink(link);
|
||||||
if(assoc->UpdateBlend(timeDelta)){
|
if(assoc->UpdateBlend(timeDelta)){
|
||||||
CAnimManager::UncompressAnimation(assoc->hierarchy);
|
if(assoc->hierarchy->sequences){
|
||||||
updateData.nodes[i++] = assoc->GetNode(0);
|
CAnimManager::UncompressAnimation(assoc->hierarchy);
|
||||||
if(assoc->flags & ASSOC_MOVEMENT){
|
if(i < 11)
|
||||||
totalLength += assoc->hierarchy->totalLength/assoc->speed * assoc->blendAmount;
|
updateData.nodes[i++] = assoc->GetNode(0);
|
||||||
totalBlend += assoc->blendAmount;
|
if(assoc->flags & ASSOC_MOVEMENT){
|
||||||
|
totalLength += assoc->hierarchy->totalLength/assoc->speed * assoc->blendAmount;
|
||||||
|
totalBlend += assoc->blendAmount;
|
||||||
|
}else
|
||||||
|
updateData.foobar = 1;
|
||||||
}else
|
}else
|
||||||
updateData.foobar = 1;
|
debug("anim %s is not loaded\n", assoc->hierarchy->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateData.nodes[i] = nil;
|
|
||||||
|
|
||||||
#ifdef PED_SKIN
|
|
||||||
if(IsClumpSkinned(clump))
|
|
||||||
clumpData->ForAllFrames(FrameUpdateCallBackSkinned, &updateData);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
clumpData->ForAllFrames(FrameUpdateCallBackNonSkinned, &updateData);
|
|
||||||
|
|
||||||
for(link = clumpData->link.next; link; link = link->next){
|
for(link = clumpData->link.next; link; link = link->next){
|
||||||
CAnimBlendAssociation *assoc = CAnimBlendAssociation::FromLink(link);
|
assoc = CAnimBlendAssociation::FromLink(link);
|
||||||
float relSpeed = totalLength == 0.0f ? 1.0f : totalBlend/totalLength;
|
assoc->UpdateTimeStep(timeDelta, totalLength == 0.0f ? 1.0f : totalBlend/totalLength);
|
||||||
assoc->UpdateTime(timeDelta, relSpeed);
|
}
|
||||||
|
|
||||||
|
updateData.nodes[i] = nil;
|
||||||
|
|
||||||
|
#ifdef ANIM_COMPRESSION
|
||||||
|
if(clumpData->frames[0].flag & AnimBlendFrameData::COMPRESSED){
|
||||||
|
if(IsClumpSkinned(clump))
|
||||||
|
clumpData->ForAllFrames(FrameUpdateCallBackSkinnedCompressed, &updateData);
|
||||||
|
else
|
||||||
|
clumpData->ForAllFrames(FrameUpdateCallBackNonSkinnedCompressed, &updateData);
|
||||||
|
}else
|
||||||
|
#endif
|
||||||
|
if(doRender){
|
||||||
|
if(clumpData->frames[0].flag & AnimBlendFrameData::UPDATE_KEYFRAMES)
|
||||||
|
RpAnimBlendNodeUpdateKeyframes(clumpData->frames, &updateData, clumpData->numFrames);
|
||||||
|
if(IsClumpSkinned(clump))
|
||||||
|
clumpData->ForAllFrames(FrameUpdateCallBackSkinned, &updateData);
|
||||||
|
else
|
||||||
|
clumpData->ForAllFrames(FrameUpdateCallBackNonSkinned, &updateData);
|
||||||
|
clumpData->frames[0].flag &= ~AnimBlendFrameData::UPDATE_KEYFRAMES;
|
||||||
|
}else{
|
||||||
|
clumpData->ForAllFrames(FrameUpdateCallBackOffscreen, &updateData);
|
||||||
|
clumpData->frames[0].flag |= AnimBlendFrameData::UPDATE_KEYFRAMES;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(link = clumpData->link.next; link; link = link->next){
|
||||||
|
assoc = CAnimBlendAssociation::FromLink(link);
|
||||||
|
assoc->UpdateTime(timeDelta, totalLength == 0.0f ? 1.0f : totalBlend/totalLength);
|
||||||
}
|
}
|
||||||
RwFrameUpdateObjects(RpClumpGetFrame(clump));
|
RwFrameUpdateObjects(RpClumpGetFrame(clump));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ void RpAnimBlendClumpInit(RpClump *clump);
|
|||||||
bool RpAnimBlendClumpIsInitialized(RpClump *clump);
|
bool RpAnimBlendClumpIsInitialized(RpClump *clump);
|
||||||
void RpAnimBlendClumpFillFrameArray(RpClump* clump, AnimBlendFrameData** frames);
|
void RpAnimBlendClumpFillFrameArray(RpClump* clump, AnimBlendFrameData** frames);
|
||||||
AnimBlendFrameData *RpAnimBlendClumpFindFrame(RpClump *clump, const char *name);
|
AnimBlendFrameData *RpAnimBlendClumpFindFrame(RpClump *clump, const char *name);
|
||||||
|
AnimBlendFrameData *RpAnimBlendClumpFindBone(RpClump *clump, uint32 boneTag);
|
||||||
void FillFrameArrayCallBack(AnimBlendFrameData *frame, void *arg);
|
void FillFrameArrayCallBack(AnimBlendFrameData *frame, void *arg);
|
||||||
CAnimBlendAssociation *RpAnimBlendClumpGetAssociation(RpClump *clump, uint32 id);
|
CAnimBlendAssociation *RpAnimBlendClumpGetAssociation(RpClump *clump, uint32 id);
|
||||||
CAnimBlendAssociation *RpAnimBlendClumpGetMainAssociation(RpClump *clump, CAnimBlendAssociation **assocRet, float *blendRet);
|
CAnimBlendAssociation *RpAnimBlendClumpGetMainAssociation(RpClump *clump, CAnimBlendAssociation **assocRet, float *blendRet);
|
||||||
@@ -34,9 +35,14 @@ CAnimBlendAssociation *RpAnimBlendClumpGetMainAssociation_N(RpClump *clump, int
|
|||||||
CAnimBlendAssociation *RpAnimBlendClumpGetMainPartialAssociation_N(RpClump *clump, int n);
|
CAnimBlendAssociation *RpAnimBlendClumpGetMainPartialAssociation_N(RpClump *clump, int n);
|
||||||
CAnimBlendAssociation *RpAnimBlendClumpGetFirstAssociation(RpClump *clump, uint32 mask);
|
CAnimBlendAssociation *RpAnimBlendClumpGetFirstAssociation(RpClump *clump, uint32 mask);
|
||||||
CAnimBlendAssociation *RpAnimBlendClumpGetFirstAssociation(RpClump *clump);
|
CAnimBlendAssociation *RpAnimBlendClumpGetFirstAssociation(RpClump *clump);
|
||||||
void RpAnimBlendClumpUpdateAnimations(RpClump* clump, float timeDelta);
|
void RpAnimBlendNodeUpdateKeyframes(AnimBlendFrameData *frames, AnimBlendFrameUpdateData *updateData, int32 numNodes);
|
||||||
|
void RpAnimBlendClumpUpdateAnimations(RpClump* clump, float timeDelta, bool doRender = true);
|
||||||
|
|
||||||
|
|
||||||
extern CAnimBlendClumpData *gpAnimBlendClump;
|
extern CAnimBlendClumpData *gpAnimBlendClump;
|
||||||
void FrameUpdateCallBackNonSkinned(AnimBlendFrameData *frame, void *arg);
|
void FrameUpdateCallBackNonSkinned(AnimBlendFrameData *frame, void *arg);
|
||||||
void FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg);
|
void FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg);
|
||||||
|
void FrameUpdateCallBackOffscreen(AnimBlendFrameData *frame, void *arg);
|
||||||
|
|
||||||
|
void FrameUpdateCallBackNonSkinnedCompressed(AnimBlendFrameData *frame, void *arg);
|
||||||
|
void FrameUpdateCallBackSkinnedCompressed(AnimBlendFrameData *frame, void *arg);
|
||||||
|
|||||||
@@ -71,31 +71,33 @@ cAudioManager::GetCollisionOneShotRatio(int32 a, float b) const
|
|||||||
case SURFACE_TARMAC:
|
case SURFACE_TARMAC:
|
||||||
case SURFACE_PAVEMENT:
|
case SURFACE_PAVEMENT:
|
||||||
case SURFACE_STEEP_CLIFF:
|
case SURFACE_STEEP_CLIFF:
|
||||||
case SURFACE_TRANSPARENT_STONE: result = GetCollisionRatio(b, 10.f, 60.f, 50.f); break;
|
case SURFACE_TRANSPARENT_STONE:
|
||||||
|
case SURFACE_CONCRETE_BEACH: result = GetCollisionRatio(b, 10.f, 60.f, 50.f); break;
|
||||||
case SURFACE_GRASS:
|
case SURFACE_GRASS:
|
||||||
|
case SURFACE_GRAVEL:
|
||||||
|
case SURFACE_MUD_DRY:
|
||||||
case SURFACE_CARDBOARDBOX: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
|
case SURFACE_CARDBOARDBOX: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
|
||||||
case SURFACE_GRAVEL: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
|
|
||||||
case SURFACE_MUD_DRY: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
|
|
||||||
case SURFACE_CAR: result = GetCollisionRatio(b, 6.f, 50.f, 44.f); break;
|
case SURFACE_CAR: result = GetCollisionRatio(b, 6.f, 50.f, 44.f); break;
|
||||||
case SURFACE_GLASS: result = GetCollisionRatio(b, 0.1f, 10.f, 9.9f); break;
|
case SURFACE_GLASS:
|
||||||
|
case SURFACE_METAL_CHAIN_FENCE: result = GetCollisionRatio(b, 0.1f, 10.f, 9.9f); break;
|
||||||
case SURFACE_TRANSPARENT_CLOTH:
|
case SURFACE_TRANSPARENT_CLOTH:
|
||||||
case SURFACE_THICK_METAL_PLATE: result = GetCollisionRatio(b, 30.f, 130.f, 100.f); break;
|
case SURFACE_THICK_METAL_PLATE: result = GetCollisionRatio(b, 30.f, 130.f, 100.f); break;
|
||||||
case SURFACE_GARAGE_DOOR: result = GetCollisionRatio(b, 20.f, 100.f, 80.f); break;
|
case SURFACE_GARAGE_DOOR: result = GetCollisionRatio(b, 20.f, 100.f, 80.f); break;
|
||||||
case SURFACE_CAR_PANEL: result = GetCollisionRatio(b, 0.f, 4.f, 4.f); break;
|
case SURFACE_CAR_PANEL: result = GetCollisionRatio(b, 0.f, 4.f, 4.f); break;
|
||||||
case SURFACE_SCAFFOLD_POLE:
|
case SURFACE_SCAFFOLD_POLE:
|
||||||
case SURFACE_METAL_GATE: result = GetCollisionRatio(b, 1.f, 10.f, 9.f); break;
|
case SURFACE_METAL_GATE:
|
||||||
case SURFACE_LAMP_POST: result = GetCollisionRatio(b, 1.f, 10.f, 9.f); break;
|
case SURFACE_LAMP_POST: result = GetCollisionRatio(b, 1.f, 10.f, 9.f); break;
|
||||||
case SURFACE_FIRE_HYDRANT: result = GetCollisionRatio(b, 1.f, 15.f, 14.f); break;
|
case SURFACE_FIRE_HYDRANT: result = GetCollisionRatio(b, 1.f, 15.f, 14.f); break;
|
||||||
case SURFACE_GIRDER: result = GetCollisionRatio(b, 8.f, 50.f, 42.f); break;
|
case SURFACE_GIRDER: result = GetCollisionRatio(b, 8.f, 50.f, 42.f); break;
|
||||||
case SURFACE_METAL_CHAIN_FENCE: result = GetCollisionRatio(b, 0.1f, 10.f, 9.9f); break;
|
|
||||||
case SURFACE_PED: result = GetCollisionRatio(b, 0.f, 20.f, 20.f); break;
|
case SURFACE_PED: result = GetCollisionRatio(b, 0.f, 20.f, 20.f); break;
|
||||||
case SURFACE_SAND: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break;
|
case SURFACE_SAND:
|
||||||
case SURFACE_WATER: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break;
|
case SURFACE_WATER:
|
||||||
|
case SURFACE_RUBBER:
|
||||||
|
case SURFACE_WHEELBASE:
|
||||||
|
case SURFACE_SAND_BEACH: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break;
|
||||||
case SURFACE_WOOD_CRATES: result = GetCollisionRatio(b, 1.f, 4.f, 3.f); break;
|
case SURFACE_WOOD_CRATES: result = GetCollisionRatio(b, 1.f, 4.f, 3.f); break;
|
||||||
case SURFACE_WOOD_BENCH: result = GetCollisionRatio(b, 0.1f, 5.f, 4.9f); break;
|
case SURFACE_WOOD_BENCH: result = GetCollisionRatio(b, 0.1f, 5.f, 4.9f); break;
|
||||||
case SURFACE_WOOD_SOLID: result = GetCollisionRatio(b, 0.1f, 40.f, 39.9f); break;
|
case SURFACE_WOOD_SOLID: result = GetCollisionRatio(b, 0.1f, 40.f, 39.9f); break;
|
||||||
case SURFACE_RUBBER:
|
|
||||||
case SURFACE_WHEELBASE: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break;
|
|
||||||
case SURFACE_PLASTIC: result = GetCollisionRatio(b, 0.1f, 4.f, 3.9f); break;
|
case SURFACE_PLASTIC: result = GetCollisionRatio(b, 0.1f, 4.f, 3.9f); break;
|
||||||
case SURFACE_HEDGE: result = GetCollisionRatio(b, 0.f, 0.5f, 0.5f); break;
|
case SURFACE_HEDGE: result = GetCollisionRatio(b, 0.f, 0.5f, 0.5f); break;
|
||||||
case SURFACE_CONTAINER: result = GetCollisionRatio(b, 4.f, 40.f, 36.f); break;
|
case SURFACE_CONTAINER: result = GetCollisionRatio(b, 4.f, 40.f, 36.f); break;
|
||||||
@@ -135,8 +137,8 @@ cAudioManager::SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollisio
|
|||||||
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
|
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
|
||||||
m_sQueueSample.m_nFrequency = 6050.f * ratio + 16000;
|
m_sQueueSample.m_nFrequency = 6050.f * ratio + 16000;
|
||||||
vol = 30.f * ratio;
|
vol = 30.f * ratio;
|
||||||
} else if(surface1 == SURFACE_GRAVEL || surface2 == SURFACE_GRAVEL || surface1 == SURFACE_MUD_DRY ||
|
} else if(surface1 == SURFACE_GRAVEL || surface2 == SURFACE_GRAVEL || surface1 == SURFACE_MUD_DRY || surface2 == SURFACE_MUD_DRY ||
|
||||||
surface2 == SURFACE_MUD_DRY || surface1 == SURFACE_SAND || surface2 == SURFACE_SAND) {
|
surface1 == SURFACE_SAND || surface2 == SURFACE_SAND || surface1 == SURFACE_SAND_BEACH || surface2 == SURFACE_SAND_BEACH) {
|
||||||
ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f);
|
ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f);
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_GRAVEL_SKID;
|
m_sQueueSample.m_nSampleIndex = SFX_GRAVEL_SKID;
|
||||||
m_sQueueSample.m_nFrequency = 6000.f * ratio + 10000;
|
m_sQueueSample.m_nFrequency = 6000.f * ratio + 10000;
|
||||||
@@ -156,12 +158,12 @@ cAudioManager::SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollisio
|
|||||||
void
|
void
|
||||||
cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter)
|
cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter)
|
||||||
{
|
{
|
||||||
|
bool distCalculated = false;
|
||||||
if(col.m_fIntensity2 > 0.0016f) {
|
if(col.m_fIntensity2 > 0.0016f) {
|
||||||
uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col);
|
uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col);
|
||||||
if(emittingVol) {
|
if(emittingVol) {
|
||||||
m_sQueueSample.m_fDistance = Sqrt(col.m_fDistance);
|
CalculateDistance(distCalculated, m_sQueueSample.m_fDistance);
|
||||||
m_sQueueSample.m_nVolume =
|
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, CollisionSoundIntensity, m_sQueueSample.m_fDistance);
|
||||||
ComputeVolume(emittingVol, CollisionSoundIntensity, m_sQueueSample.m_fDistance);
|
|
||||||
if(m_sQueueSample.m_nVolume) {
|
if(m_sQueueSample.m_nVolume) {
|
||||||
m_sQueueSample.m_nCounter = counter;
|
m_sQueueSample.m_nCounter = counter;
|
||||||
m_sQueueSample.m_vecPos = col.m_vecPosition;
|
m_sQueueSample.m_vecPos = col.m_vecPosition;
|
||||||
@@ -217,7 +219,9 @@ static const int32 gOneShotCol[] = {SFX_COL_TARMAC_1,
|
|||||||
SFX_TYRE_BUMP,
|
SFX_TYRE_BUMP,
|
||||||
SFX_COL_CARDBOARD_1,
|
SFX_COL_CARDBOARD_1,
|
||||||
SFX_COL_TARMAC_1,
|
SFX_COL_TARMAC_1,
|
||||||
SFX_COL_GATE};
|
SFX_COL_GATE,
|
||||||
|
SFX_COL_SAND_1,
|
||||||
|
SFX_COL_TARMAC_1 };
|
||||||
|
|
||||||
void
|
void
|
||||||
cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
|
cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
|
||||||
@@ -266,7 +270,7 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
|
|||||||
m_sQueueSample.m_nSampleIndex += m_anRandomTable[3] % 4;
|
m_sQueueSample.m_nSampleIndex += m_anRandomTable[3] % 4;
|
||||||
break;
|
break;
|
||||||
case SFX_COL_PED_1:
|
case SFX_COL_PED_1:
|
||||||
m_sQueueSample.m_nSampleIndex += m_anRandomTable[4] % 5;
|
m_sQueueSample.m_nSampleIndex += m_anRandomTable[4] % 2;
|
||||||
break;
|
break;
|
||||||
case SFX_COL_WOOD_CRATES_1:
|
case SFX_COL_WOOD_CRATES_1:
|
||||||
m_sQueueSample.m_nSampleIndex += m_anRandomTable[4] % 4;
|
m_sQueueSample.m_nSampleIndex += m_anRandomTable[4] % 4;
|
||||||
|
|||||||
@@ -35,4 +35,4 @@ public:
|
|||||||
void AddCollisionToRequestedQueue();
|
void AddCollisionToRequestedQueue();
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(cAudioCollisionManager, 852);
|
VALIDATE_SIZE(cAudioCollisionManager, 0x354);
|
||||||
|
|||||||
11893
src/audio/AudioLogic.cpp
11893
src/audio/AudioLogic.cpp
File diff suppressed because it is too large
Load Diff
@@ -10,19 +10,24 @@
|
|||||||
#include "sampman.h"
|
#include "sampman.h"
|
||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
|
#include "ZoneCull.h"
|
||||||
|
|
||||||
cAudioManager AudioManager;
|
cAudioManager AudioManager;
|
||||||
|
|
||||||
const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples);
|
const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples);
|
||||||
const int policeChannel = channels + 1;
|
const int policeChannel = channels + 1;
|
||||||
const int allChannels = channels + 2;
|
const int allChannels = channels + 2;
|
||||||
|
|
||||||
|
#define SPEED_OF_SOUND 343.f
|
||||||
|
#define TIME_SPENT 40
|
||||||
|
|
||||||
cAudioManager::cAudioManager()
|
cAudioManager::cAudioManager()
|
||||||
{
|
{
|
||||||
m_bIsInitialised = false;
|
m_bIsInitialised = false;
|
||||||
field_1 = 1;
|
m_bReverb = true;
|
||||||
m_fSpeedOfSound = 6.86f;
|
field_6 = 0;
|
||||||
m_nTimeSpent = 50;
|
m_fSpeedOfSound = SPEED_OF_SOUND / TIME_SPENT;
|
||||||
|
m_nTimeSpent = TIME_SPENT;
|
||||||
m_nActiveSamples = NUM_SOUNDS_SAMPLES_SLOTS;
|
m_nActiveSamples = NUM_SOUNDS_SAMPLES_SLOTS;
|
||||||
m_nActiveSampleQueue = 1;
|
m_nActiveSampleQueue = 1;
|
||||||
ClearRequestedQueue();
|
ClearRequestedQueue();
|
||||||
@@ -169,11 +174,11 @@ cAudioManager::SetEntityStatus(int32 id, uint8 status)
|
|||||||
void
|
void
|
||||||
cAudioManager::PlayOneShot(int32 index, uint16 sound, float vol)
|
cAudioManager::PlayOneShot(int32 index, uint16 sound, float vol)
|
||||||
{
|
{
|
||||||
static const uint8 OneShotPriority[] = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 3, 5, 2, 2, 1, 1, 3, 1, 3, 3, 1, 1, 1, 4, 4, 3, 1, 1,
|
static const uint8 OneShotPriority[] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, 2, 5, 5, 3, 5, 2, 2, 1, 1, 3, 1, 3, 3, 1, 1, 1, 1, 4, 4, 4, 3, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 3, 2, 2, 2, 2, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 3, 4, 2, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0,
|
||||||
1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 3, 1, 1, 1, 9,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 3, 1, 1, 1, 9, 0, 0, 0, 1, 2, 2, 0, 0, 2, 3, 3, 3, 5, 1, 1,
|
||||||
2, 2, 0, 0, 0, 0, 3, 3, 5, 1, 1, 1, 1, 3, 4, 7, 6, 6, 6, 6, 1, 3, 4, 3, 4, 2, 1, 3, 5, 4, 6, 6, 1, 3,
|
1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 7, 1, 4, 3, 4, 2, 2, 2, 3, 1, 2, 1, 3, 5, 3, 4, 6, 4, 6, 3, 0, 0, 0, 0, 0,
|
||||||
1, 1, 1, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 0, 0, 0, 0, 0, 3, 3, 1, 0 };
|
||||||
|
|
||||||
if (m_bIsInitialised) {
|
if (m_bIsInitialised) {
|
||||||
if (index >= 0 && index < NUM_AUDIOENTITIES) {
|
if (index >= 0 && index < NUM_AUDIOENTITIES) {
|
||||||
@@ -216,6 +221,12 @@ cAudioManager::PlayOneShot(int32 index, uint16 sound, float vol)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cAudioManager::SetMP3BoostVolume(uint8 volume) const
|
||||||
|
{
|
||||||
|
SampleManager.SetMP3BoostVolume(volume);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cAudioManager::SetEffectsMasterVolume(uint8 volume) const
|
cAudioManager::SetEffectsMasterVolume(uint8 volume) const
|
||||||
{
|
{
|
||||||
@@ -263,11 +274,13 @@ cAudioManager::ResetTimers(uint32 time)
|
|||||||
m_nActiveSampleQueue = 0;
|
m_nActiveSampleQueue = 0;
|
||||||
}
|
}
|
||||||
ClearActiveSamples();
|
ClearActiveSamples();
|
||||||
ClearMissionAudio();
|
ClearMissionAudio(0);
|
||||||
|
ClearMissionAudio(1);
|
||||||
SampleManager.StopChannel(policeChannel);
|
SampleManager.StopChannel(policeChannel);
|
||||||
SampleManager.SetEffectsFadeVolume(0);
|
SampleManager.SetEffectsFadeVolume(0);
|
||||||
SampleManager.SetMusicFadeVolume(0);
|
SampleManager.SetMusicFadeVolume(0);
|
||||||
MusicManager.ResetMusicAfterReload();
|
MusicManager.ResetMusicAfterReload();
|
||||||
|
m_bIsPlayerShutUp = false;
|
||||||
#ifdef AUDIO_OAL
|
#ifdef AUDIO_OAL
|
||||||
SampleManager.Service();
|
SampleManager.Service();
|
||||||
#endif
|
#endif
|
||||||
@@ -286,7 +299,7 @@ cAudioManager::DestroyAllGameCreatedEntities()
|
|||||||
case AUDIOTYPE_PHYSICAL:
|
case AUDIOTYPE_PHYSICAL:
|
||||||
case AUDIOTYPE_EXPLOSION:
|
case AUDIOTYPE_EXPLOSION:
|
||||||
case AUDIOTYPE_WEATHER:
|
case AUDIOTYPE_WEATHER:
|
||||||
case AUDIOTYPE_CRANE:
|
//case AUDIOTYPE_CRANE:
|
||||||
case AUDIOTYPE_GARAGE:
|
case AUDIOTYPE_GARAGE:
|
||||||
case AUDIOTYPE_FIREHYDRANT:
|
case AUDIOTYPE_FIREHYDRANT:
|
||||||
DestroyEntity(i);
|
DestroyEntity(i);
|
||||||
@@ -340,6 +353,15 @@ cAudioManager::GetCurrent3DProviderIndex() const
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int8
|
||||||
|
cAudioManager::AutoDetect3DProviders() const
|
||||||
|
{
|
||||||
|
if (m_bIsInitialised)
|
||||||
|
return SampleManager.AutoDetect3DProviders();
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
int8
|
int8
|
||||||
cAudioManager::SetCurrent3DProvider(uint8 which)
|
cAudioManager::SetCurrent3DProvider(uint8 which)
|
||||||
{
|
{
|
||||||
@@ -409,9 +431,7 @@ cAudioManager::CheckForAnAudioFileOnCD() const
|
|||||||
uint8
|
uint8
|
||||||
cAudioManager::GetCDAudioDriveLetter() const
|
cAudioManager::GetCDAudioDriveLetter() const
|
||||||
{
|
{
|
||||||
if (m_bIsInitialised)
|
if(m_bIsInitialised) return SampleManager.GetCDAudioDriveLetter();
|
||||||
return SampleManager.GetCDAudioDriveLetter();
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,7 +462,7 @@ cAudioManager::ServiceSoundEffects()
|
|||||||
ClearActiveSamples();
|
ClearActiveSamples();
|
||||||
}
|
}
|
||||||
m_nActiveSampleQueue = m_nActiveSampleQueue == 1 ? 0 : 1;
|
m_nActiveSampleQueue = m_nActiveSampleQueue == 1 ? 0 : 1;
|
||||||
ProcessReverb();
|
if(m_bReverb) ProcessReverb();
|
||||||
ProcessSpecial();
|
ProcessSpecial();
|
||||||
ClearRequestedQueue();
|
ClearRequestedQueue();
|
||||||
InterrogateAudioEntities();
|
InterrogateAudioEntities();
|
||||||
@@ -471,12 +491,18 @@ uint8
|
|||||||
cAudioManager::ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const
|
cAudioManager::ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const
|
||||||
{
|
{
|
||||||
float newSoundIntensity;
|
float newSoundIntensity;
|
||||||
|
float newEmittingVolume;
|
||||||
|
|
||||||
if (soundIntensity <= 0.0f)
|
if (soundIntensity <= 0.0f)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
newSoundIntensity = soundIntensity / 5.0f;
|
newSoundIntensity = soundIntensity / 5.0f;
|
||||||
if (newSoundIntensity <= distance)
|
if (newSoundIntensity > distance)
|
||||||
emittingVolume = sq((soundIntensity - newSoundIntensity - (distance - newSoundIntensity)) / (soundIntensity - newSoundIntensity)) * emittingVolume;
|
return emittingVolume;
|
||||||
return emittingVolume;
|
|
||||||
|
newEmittingVolume = emittingVolume * SQR((soundIntensity - newSoundIntensity - (distance - newSoundIntensity))
|
||||||
|
/ (soundIntensity - newSoundIntensity));
|
||||||
|
return Min(127u, newEmittingVolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -488,17 +514,16 @@ cAudioManager::TranslateEntity(Const CVector *in, CVector *out) const
|
|||||||
int32
|
int32
|
||||||
cAudioManager::ComputePan(float dist, CVector *vec)
|
cAudioManager::ComputePan(float dist, CVector *vec)
|
||||||
{
|
{
|
||||||
const uint8 PanTable[64] = {0, 3, 8, 12, 16, 19, 22, 24, 26, 28, 30, 31, 33, 34, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 49, 50, 51, 52, 53, 53,
|
const uint8 PanTable[64] = { 0, 3, 8, 12, 16, 19, 22, 24, 26, 28, 30, 31, 33, 34, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 49, 50, 51, 52, 53, 53,
|
||||||
54, 55, 55, 56, 56, 57, 57, 58, 58, 58, 59, 59, 59, 60, 60, 61, 61, 61, 61, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63};
|
54, 55, 55, 56, 56, 57, 57, 58, 58, 58, 59, 59, 59, 60, 60, 61, 61, 61, 61, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63};
|
||||||
|
int32 index = Min(63, Abs(int32(vec->x / (dist / 64.f))));
|
||||||
int32 index = Min(63, Abs(vec->x / (dist / 64.f)));
|
|
||||||
|
|
||||||
if (vec->x > 0.f)
|
if (vec->x > 0.f)
|
||||||
return Max(20, 63 - PanTable[index]);
|
return Max(20, 63 - PanTable[index]);
|
||||||
return Min(107, PanTable[index] + 63);
|
return Min(107, PanTable[index] + 63);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
uint32
|
||||||
cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const
|
cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const
|
||||||
{
|
{
|
||||||
uint32 newFreq = oldFreq;
|
uint32 newFreq = oldFreq;
|
||||||
@@ -507,11 +532,7 @@ cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1,
|
|||||||
if (dist != 0.0f) {
|
if (dist != 0.0f) {
|
||||||
float speedOfSource = (dist / m_nTimeSpent) * speedMultiplier;
|
float speedOfSource = (dist / m_nTimeSpent) * speedMultiplier;
|
||||||
if (m_fSpeedOfSound > Abs(speedOfSource)) {
|
if (m_fSpeedOfSound > Abs(speedOfSource)) {
|
||||||
if (speedOfSource < 0.0f) {
|
speedOfSource = clamp2(speedOfSource, 0.0f, 1.5f);
|
||||||
speedOfSource = Max(speedOfSource, -1.5f);
|
|
||||||
} else {
|
|
||||||
speedOfSource = Min(speedOfSource, 1.5f);
|
|
||||||
}
|
|
||||||
newFreq = (oldFreq * m_fSpeedOfSound) / (speedOfSource + m_fSpeedOfSound);
|
newFreq = (oldFreq * m_fSpeedOfSound) / (speedOfSource + m_fSpeedOfSound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -569,7 +590,7 @@ cAudioManager::AddSampleToRequestedQueue()
|
|||||||
}
|
}
|
||||||
m_sQueueSample.m_nCalculatedVolume = calculatedVolume;
|
m_sQueueSample.m_nCalculatedVolume = calculatedVolume;
|
||||||
m_sQueueSample.m_bLoopEnded = false;
|
m_sQueueSample.m_bLoopEnded = false;
|
||||||
if (m_sQueueSample.m_bIs2D) {
|
if (m_sQueueSample.m_bIs2D || CCullZones::InRoomForAudio()) {
|
||||||
m_sQueueSample.m_bRequireReflection = false;
|
m_sQueueSample.m_bRequireReflection = false;
|
||||||
m_sQueueSample.m_nLoopsRemaining = 0;
|
m_sQueueSample.m_nLoopsRemaining = 0;
|
||||||
}
|
}
|
||||||
@@ -581,6 +602,9 @@ cAudioManager::AddSampleToRequestedQueue()
|
|||||||
}
|
}
|
||||||
m_sQueueSample.m_bRequireReflection = false;
|
m_sQueueSample.m_bRequireReflection = false;
|
||||||
|
|
||||||
|
if ( m_bReverb && m_sQueueSample.m_bIs2D )
|
||||||
|
m_sQueueSample.field_4C = 30;
|
||||||
|
|
||||||
if (!m_bDynamicAcousticModelingStatus)
|
if (!m_bDynamicAcousticModelingStatus)
|
||||||
m_sQueueSample.m_bReverbFlag = false;
|
m_sQueueSample.m_bReverbFlag = false;
|
||||||
|
|
||||||
@@ -611,26 +635,52 @@ cAudioManager::AddDetailsToRequestedOrderList(uint8 sample)
|
|||||||
void
|
void
|
||||||
cAudioManager::AddReflectionsToRequestedQueue()
|
cAudioManager::AddReflectionsToRequestedQueue()
|
||||||
{
|
{
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
uint32 oldFreq = 0;
|
||||||
|
#else
|
||||||
|
uint32 oldFreq;
|
||||||
|
#endif
|
||||||
float reflectionDistance;
|
float reflectionDistance;
|
||||||
int32 noise;
|
int32 noise;
|
||||||
uint8 emittingVolume = (m_sQueueSample.m_nVolume / 2) + (m_sQueueSample.m_nVolume / 8);
|
uint8 emittingVolume;
|
||||||
|
|
||||||
|
uint32 oldCounter = m_sQueueSample.m_nCounter;
|
||||||
|
float oldDist = m_sQueueSample.m_fDistance;
|
||||||
|
CVector oldPos = m_sQueueSample.m_vecPos;
|
||||||
|
if ( CTimer::GetIsSlowMotionActive() ) {
|
||||||
|
emittingVolume = m_sQueueSample.m_nVolume;
|
||||||
|
oldFreq = m_sQueueSample.m_nFrequency;
|
||||||
|
} else {
|
||||||
|
emittingVolume = (9 * m_sQueueSample.m_nVolume) / 16;
|
||||||
|
}
|
||||||
|
m_sQueueSample.m_fSoundIntensity /= 2.f;
|
||||||
|
|
||||||
|
int halfOldFreq = oldFreq >> 1;
|
||||||
|
|
||||||
for (uint32 i = 0; i < ARRAY_SIZE(m_afReflectionsDistances); i++) {
|
for (uint32 i = 0; i < ARRAY_SIZE(m_afReflectionsDistances); i++) {
|
||||||
|
if ( CTimer::GetIsSlowMotionActive() )
|
||||||
|
m_afReflectionsDistances[i] = GetRandomNumberInRange(i % 4, 0, 2) * 100.f / 8.f;
|
||||||
|
|
||||||
reflectionDistance = m_afReflectionsDistances[i];
|
reflectionDistance = m_afReflectionsDistances[i];
|
||||||
if (reflectionDistance > 0.0f && reflectionDistance < 100.f && reflectionDistance < m_sQueueSample.m_fSoundIntensity) {
|
if (reflectionDistance > 0.0f && reflectionDistance < 100.f && reflectionDistance < m_sQueueSample.m_fSoundIntensity) {
|
||||||
m_sQueueSample.m_nLoopsRemaining = (reflectionDistance * 500.f / 1029.f);
|
m_sQueueSample.m_nLoopsRemaining = CTimer::GetIsSlowMotionActive() ? (reflectionDistance * 800.f / 1029.f) : (reflectionDistance * 500.f / 1029.f);
|
||||||
if (m_sQueueSample.m_nLoopsRemaining > 5) {
|
if (m_sQueueSample.m_nLoopsRemaining > 3) {
|
||||||
m_sQueueSample.m_fDistance = m_afReflectionsDistances[i];
|
m_sQueueSample.m_fDistance = m_afReflectionsDistances[i];
|
||||||
m_sQueueSample.m_nEmittingVolume = emittingVolume;
|
m_sQueueSample.m_nEmittingVolume = emittingVolume;
|
||||||
m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
|
m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
|
||||||
|
|
||||||
if (m_sQueueSample.m_nVolume > emittingVolume / 16) {
|
if (m_sQueueSample.m_nVolume > emittingVolume / 16) {
|
||||||
m_sQueueSample.m_nCounter += (i + 1) * 256;
|
m_sQueueSample.m_nCounter = oldCounter + (i + 1) * 256;
|
||||||
if (m_sQueueSample.m_nLoopCount) {
|
if (m_sQueueSample.m_nLoopCount) {
|
||||||
noise = RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
|
if ( CTimer::GetIsSlowMotionActive() ) {
|
||||||
if (noise <= 0)
|
m_sQueueSample.m_nFrequency = halfOldFreq + ((halfOldFreq * i) / ARRAY_SIZE(m_afReflectionsDistances));
|
||||||
m_sQueueSample.m_nFrequency += noise;
|
} else {
|
||||||
else
|
noise = RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
|
||||||
m_sQueueSample.m_nFrequency -= noise;
|
if (noise <= 0)
|
||||||
|
m_sQueueSample.m_nFrequency += noise;
|
||||||
|
else
|
||||||
|
m_sQueueSample.m_nFrequency -= noise;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
m_sQueueSample.m_nReleasingVolumeModificator += 20;
|
m_sQueueSample.m_nReleasingVolumeModificator += 20;
|
||||||
m_sQueueSample.m_vecPos = m_avecReflectionsPos[i];
|
m_sQueueSample.m_vecPos = m_avecReflectionsPos[i];
|
||||||
@@ -639,50 +689,84 @@ cAudioManager::AddReflectionsToRequestedQueue()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
m_sQueueSample.m_vecPos = oldPos;
|
||||||
|
m_sQueueSample.m_fDistance = oldDist;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cAudioManager::UpdateReflections()
|
cAudioManager::UpdateReflections()
|
||||||
{
|
{
|
||||||
const CVector &camPos = TheCamera.GetPosition();
|
CVector camPos = TheCamera.GetPosition();
|
||||||
CColPoint colpoint;
|
CColPoint colpoint;
|
||||||
CEntity *ent;
|
CEntity *ent;
|
||||||
|
|
||||||
if (m_FrameCounter % 8 == 0) {
|
if (m_FrameCounter % 8 == 0) {
|
||||||
m_avecReflectionsPos[0] = camPos;
|
m_avecReflectionsPos[0] = camPos;
|
||||||
m_avecReflectionsPos[0].y += 50.f;
|
m_avecReflectionsPos[0].y += 100.f;
|
||||||
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[0], colpoint, ent, true, false, false, true, false, true, true))
|
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[0], colpoint, ent, true, false, false, true, false, true, true))
|
||||||
m_afReflectionsDistances[0] = Distance(camPos, colpoint.point);
|
m_afReflectionsDistances[0] = Distance(camPos, colpoint.point);
|
||||||
else
|
else
|
||||||
m_afReflectionsDistances[0] = 50.0f;
|
m_afReflectionsDistances[0] = 100.0f;
|
||||||
|
|
||||||
} else if ((m_FrameCounter + 1) % 8 == 0) {
|
} else if ((m_FrameCounter + 1) % 8 == 0) {
|
||||||
m_avecReflectionsPos[1] = camPos;
|
m_avecReflectionsPos[1] = camPos;
|
||||||
m_avecReflectionsPos[1].y -= 50.0f;
|
m_avecReflectionsPos[1].y -= 100.0f;
|
||||||
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[1], colpoint, ent, true, false, false, true, false, true, true))
|
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[1], colpoint, ent, true, false, false, true, false, true, true))
|
||||||
m_afReflectionsDistances[1] = Distance(camPos, colpoint.point);
|
m_afReflectionsDistances[1] = Distance(camPos, colpoint.point);
|
||||||
else
|
else
|
||||||
m_afReflectionsDistances[1] = 50.0f;
|
m_afReflectionsDistances[1] = 100.0f;
|
||||||
|
|
||||||
} else if ((m_FrameCounter + 2) % 8 == 0) {
|
} else if ((m_FrameCounter + 2) % 8 == 0) {
|
||||||
m_avecReflectionsPos[2] = camPos;
|
m_avecReflectionsPos[2] = camPos;
|
||||||
m_avecReflectionsPos[2].x -= 50.0f;
|
m_avecReflectionsPos[2].x -= 100.0f;
|
||||||
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[2], colpoint, ent, true, false, false, true, false, true, true))
|
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[2], colpoint, ent, true, false, false, true, false, true, true))
|
||||||
m_afReflectionsDistances[2] = Distance(camPos, colpoint.point);
|
m_afReflectionsDistances[2] = Distance(camPos, colpoint.point);
|
||||||
else
|
else
|
||||||
m_afReflectionsDistances[2] = 50.0f;
|
m_afReflectionsDistances[2] = 100.0f;
|
||||||
|
|
||||||
} else if ((m_FrameCounter + 3) % 8 == 0) {
|
} else if ((m_FrameCounter + 3) % 8 == 0) {
|
||||||
m_avecReflectionsPos[3] = camPos;
|
m_avecReflectionsPos[3] = camPos;
|
||||||
m_avecReflectionsPos[3].x += 50.0f;
|
m_avecReflectionsPos[3].x += 100.0f;
|
||||||
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[3], colpoint, ent, true, false, false, true, false, true, true))
|
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[3], colpoint, ent, true, false, false, true, false, true, true))
|
||||||
m_afReflectionsDistances[3] = Distance(camPos, colpoint.point);
|
m_afReflectionsDistances[3] = Distance(camPos, colpoint.point);
|
||||||
else
|
else
|
||||||
m_afReflectionsDistances[3] = 50.0f;
|
m_afReflectionsDistances[3] = 100.0f;
|
||||||
|
|
||||||
} else if ((m_FrameCounter + 4) % 8 == 0) {
|
} else if ((m_FrameCounter + 4) % 8 == 0) {
|
||||||
|
camPos.y += 1.0f;
|
||||||
m_avecReflectionsPos[4] = camPos;
|
m_avecReflectionsPos[4] = camPos;
|
||||||
m_avecReflectionsPos[4].z += 50.0f;
|
m_avecReflectionsPos[4].z += 100.0f;
|
||||||
if (CWorld::ProcessVerticalLine(camPos, m_avecReflectionsPos[4].z, colpoint, ent, true, false, false, false, true, false, nil))
|
if (CWorld::ProcessVerticalLine(camPos, m_avecReflectionsPos[4].z, colpoint, ent, true, false, false, false, true, false, nil))
|
||||||
m_afReflectionsDistances[4] = colpoint.point.z - camPos.z;
|
m_afReflectionsDistances[4] = colpoint.point.z - camPos.z;
|
||||||
else
|
else
|
||||||
m_afReflectionsDistances[4] = 50.0f;
|
m_afReflectionsDistances[4] = 100.0f;
|
||||||
|
|
||||||
|
} else if ((m_FrameCounter + 5) % 8 == 0) {
|
||||||
|
camPos.y -= 1.0f;
|
||||||
|
m_avecReflectionsPos[5] = camPos;
|
||||||
|
m_avecReflectionsPos[5].z += 100.0f;
|
||||||
|
if (CWorld::ProcessVerticalLine(camPos, m_avecReflectionsPos[5].z, colpoint, ent, true, false, false, false, true, false, nil))
|
||||||
|
m_afReflectionsDistances[5] = colpoint.point.z - camPos.z;
|
||||||
|
else
|
||||||
|
m_afReflectionsDistances[5] = 100.0f;
|
||||||
|
|
||||||
|
} else if ((m_FrameCounter + 6) % 8 == 0) {
|
||||||
|
camPos.x -= 1.0f;
|
||||||
|
m_avecReflectionsPos[6] = camPos;
|
||||||
|
m_avecReflectionsPos[6].z += 100.0f;
|
||||||
|
if (CWorld::ProcessVerticalLine(camPos, m_avecReflectionsPos[6].z, colpoint, ent, true, false, false, false, true, false, nil))
|
||||||
|
m_afReflectionsDistances[6] = colpoint.point.z - camPos.z;
|
||||||
|
else
|
||||||
|
m_afReflectionsDistances[6] = 100.0f;
|
||||||
|
|
||||||
|
} else if ((m_FrameCounter + 7) % 8 == 0) {
|
||||||
|
camPos.x += 1.0f;
|
||||||
|
m_avecReflectionsPos[7] = camPos;
|
||||||
|
m_avecReflectionsPos[7].z += 100.0f;
|
||||||
|
if (CWorld::ProcessVerticalLine(camPos, m_avecReflectionsPos[7].z, colpoint, ent, true, false, false, false, true, false, nil))
|
||||||
|
m_afReflectionsDistances[7] = colpoint.point.z - camPos.z;
|
||||||
|
else
|
||||||
|
m_afReflectionsDistances[7] = 100.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -727,7 +811,7 @@ cAudioManager::AddReleasingSounds()
|
|||||||
if (sample.m_nReleasingVolumeModificator < 20)
|
if (sample.m_nReleasingVolumeModificator < 20)
|
||||||
++sample.m_nReleasingVolumeModificator;
|
++sample.m_nReleasingVolumeModificator;
|
||||||
}
|
}
|
||||||
sample.m_bReleasingSoundFlag = 0;
|
sample.m_bReleasingSoundFlag = false;
|
||||||
}
|
}
|
||||||
memcpy(&m_sQueueSample, &sample, sizeof(tSound));
|
memcpy(&m_sQueueSample, &sample, sizeof(tSound));
|
||||||
AddSampleToRequestedQueue();
|
AddSampleToRequestedQueue();
|
||||||
@@ -738,39 +822,41 @@ cAudioManager::AddReleasingSounds()
|
|||||||
void
|
void
|
||||||
cAudioManager::ProcessActiveQueues()
|
cAudioManager::ProcessActiveQueues()
|
||||||
{
|
{
|
||||||
bool flag;
|
|
||||||
float position2;
|
|
||||||
float position1;
|
|
||||||
|
|
||||||
uint32 v28;
|
|
||||||
uint32 v29;
|
|
||||||
|
|
||||||
float x;
|
|
||||||
float usedX;
|
|
||||||
float usedY;
|
|
||||||
float usedZ;
|
|
||||||
|
|
||||||
uint8 vol;
|
|
||||||
uint8 emittingVol;
|
|
||||||
CVector position;
|
CVector position;
|
||||||
|
uint32 freqDivided;
|
||||||
|
uint32 loopCount;
|
||||||
|
uint8 emittingVol;
|
||||||
|
uint8 vol;
|
||||||
|
uint8 offset;
|
||||||
|
float x;
|
||||||
|
bool flag;
|
||||||
|
bool missionState;
|
||||||
|
|
||||||
for (int32 i = 0; i < m_nActiveSamples; i++) {
|
for (int32 i = 0; i < m_nActiveSamples; i++) {
|
||||||
m_asSamples[m_nActiveSampleQueue][i].m_bIsProcessed = false;
|
m_asSamples[m_nActiveSampleQueue][i].m_bIsProcessed = false;
|
||||||
m_asActiveSamples[i].m_bIsProcessed = false;
|
m_asActiveSamples[i].m_bIsProcessed = false;
|
||||||
}
|
}
|
||||||
|
for (int32 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; i++) {
|
||||||
for (int32 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; ++i) {
|
tSound& sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
|
||||||
tSound &sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
|
|
||||||
if (sample.m_nSampleIndex != NO_SAMPLE) {
|
if (sample.m_nSampleIndex != NO_SAMPLE) {
|
||||||
for (int32 j = 0; j < m_nActiveSamples; ++j) {
|
for (int32 j = 0; j < m_nActiveSamples; j++) {
|
||||||
if (sample.m_nEntityIndex == m_asActiveSamples[j].m_nEntityIndex && sample.m_nCounter == m_asActiveSamples[j].m_nCounter &&
|
if (sample.m_nEntityIndex == m_asActiveSamples[j].m_nEntityIndex &&
|
||||||
sample.m_nSampleIndex == m_asActiveSamples[j].m_nSampleIndex) {
|
sample.m_nCounter == m_asActiveSamples[j].m_nCounter &&
|
||||||
|
sample.m_nSampleIndex == m_asActiveSamples[j].m_nSampleIndex) {
|
||||||
if (sample.m_nLoopCount) {
|
if (sample.m_nLoopCount) {
|
||||||
|
|
||||||
if (m_FrameCounter & 1) {
|
if (m_FrameCounter & 1) {
|
||||||
flag = !!(j & 1);
|
if (!(j & 1)) {
|
||||||
|
flag = false;
|
||||||
|
} else {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
} else if (j & 1) {
|
||||||
|
flag = false;
|
||||||
} else {
|
} else {
|
||||||
flag = !(j & 1);
|
flag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag && !SampleManager.GetChannelUsedFlag(j)) {
|
if (flag && !SampleManager.GetChannelUsedFlag(j)) {
|
||||||
sample.m_bLoopEnded = true;
|
sample.m_bLoopEnded = true;
|
||||||
m_asActiveSamples[j].m_bLoopEnded = true;
|
m_asActiveSamples[j].m_bLoopEnded = true;
|
||||||
@@ -778,6 +864,8 @@ cAudioManager::ProcessActiveQueues()
|
|||||||
m_asActiveSamples[j].m_nEntityIndex = AEHANDLE_NONE;
|
m_asActiveSamples[j].m_nEntityIndex = AEHANDLE_NONE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!sample.m_nReleasingVolumeDivider)
|
||||||
|
sample.m_nReleasingVolumeDivider = 1;
|
||||||
}
|
}
|
||||||
sample.m_bIsProcessed = true;
|
sample.m_bIsProcessed = true;
|
||||||
m_asActiveSamples[j].m_bIsProcessed = true;
|
m_asActiveSamples[j].m_bIsProcessed = true;
|
||||||
@@ -793,37 +881,39 @@ cAudioManager::ProcessActiveQueues()
|
|||||||
SampleManager.SetChannelEmittingVolume(j, emittingVol);
|
SampleManager.SetChannelEmittingVolume(j, emittingVol);
|
||||||
} else {
|
} else {
|
||||||
m_asActiveSamples[j].m_fDistance = sample.m_fDistance;
|
m_asActiveSamples[j].m_fDistance = sample.m_fDistance;
|
||||||
position2 = sample.m_fDistance;
|
sample.m_nFrequency = ComputeDopplerEffectedFrequency(
|
||||||
position1 = m_asActiveSamples[j].m_fDistance;
|
sample.m_nFrequency,
|
||||||
sample.m_nFrequency = ComputeDopplerEffectedFrequency(sample.m_nFrequency, position1, position2, sample.m_fSpeedMultiplier);
|
m_asActiveSamples[j].m_fDistance,
|
||||||
|
sample.m_fDistance,
|
||||||
|
sample.m_fSpeedMultiplier);
|
||||||
|
|
||||||
if (sample.m_nFrequency != m_asActiveSamples[j].m_nFrequency) {
|
if (sample.m_nFrequency != m_asActiveSamples[j].m_nFrequency) {
|
||||||
int32 freq;
|
m_asActiveSamples[j].m_nFrequency = clamp2((int32)sample.m_nFrequency, (int32)m_asActiveSamples[j].m_nFrequency, 6000);
|
||||||
if (sample.m_nFrequency <= m_asActiveSamples[j].m_nFrequency) {
|
SampleManager.SetChannelFrequency(j, m_asActiveSamples[j].m_nFrequency);
|
||||||
#ifdef FIX_BUGS
|
|
||||||
freq = Max((int32)sample.m_nFrequency, (int32)m_asActiveSamples[j].m_nFrequency - 6000);
|
|
||||||
#else
|
|
||||||
freq = Max((int32)sample.m_nFrequency, int32(m_asActiveSamples[j].m_nFrequency - 6000));
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
freq = Min(sample.m_nFrequency, m_asActiveSamples[j].m_nFrequency + 6000);
|
|
||||||
}
|
|
||||||
m_asActiveSamples[j].m_nFrequency = freq;
|
|
||||||
SampleManager.SetChannelFrequency(j, freq);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sample.m_nEmittingVolume != m_asActiveSamples[j].m_nEmittingVolume) {
|
if (sample.m_nEmittingVolume != m_asActiveSamples[j].m_nEmittingVolume) {
|
||||||
if (sample.m_nEmittingVolume <= m_asActiveSamples[j].m_nEmittingVolume) {
|
vol = clamp2((int8)sample.m_nEmittingVolume, (int8)m_asActiveSamples[j].m_nEmittingVolume, 10);
|
||||||
vol = Max(m_asActiveSamples[j].m_nEmittingVolume - 10, sample.m_nEmittingVolume);
|
|
||||||
} else {
|
|
||||||
vol = Min(m_asActiveSamples[j].m_nEmittingVolume + 10, sample.m_nEmittingVolume);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8 emittingVol;
|
|
||||||
if (field_4) {
|
if (field_4) {
|
||||||
emittingVol = 2 * Min(63, vol);
|
emittingVol = 2 * Min(63, vol);
|
||||||
} else {
|
} else {
|
||||||
emittingVol = vol;
|
emittingVol = vol;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
missionState = false;
|
||||||
|
for (int32 k = 0; k < ARRAY_SIZE(m_sMissionAudio.m_bIsMobile); k++) {
|
||||||
|
if (m_sMissionAudio.m_bIsMobile[k]) {
|
||||||
|
missionState = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (missionState) {
|
||||||
|
emittingVol = (emittingVol * field_5538) / 127;
|
||||||
|
} else {
|
||||||
|
if (field_5538 < 127)
|
||||||
|
emittingVol = (emittingVol * field_5538) / 127;
|
||||||
|
}
|
||||||
|
|
||||||
SampleManager.SetChannelEmittingVolume(j, emittingVol);
|
SampleManager.SetChannelEmittingVolume(j, emittingVol);
|
||||||
m_asActiveSamples[j].m_nEmittingVolume = vol;
|
m_asActiveSamples[j].m_nEmittingVolume = vol;
|
||||||
}
|
}
|
||||||
@@ -832,10 +922,11 @@ cAudioManager::ProcessActiveQueues()
|
|||||||
SampleManager.SetChannel3DDistances(j, sample.m_fSoundIntensity, 0.25f * sample.m_fSoundIntensity);
|
SampleManager.SetChannel3DDistances(j, sample.m_fSoundIntensity, 0.25f * sample.m_fSoundIntensity);
|
||||||
}
|
}
|
||||||
SampleManager.SetChannelReverbFlag(j, sample.m_bReverbFlag);
|
SampleManager.SetChannelReverbFlag(j, sample.m_bReverbFlag);
|
||||||
break;
|
break; //continue for i
|
||||||
}
|
}
|
||||||
sample.m_bIsProcessed = false;
|
sample.m_bIsProcessed = false;
|
||||||
m_asActiveSamples[j].m_bIsProcessed = false;
|
m_asActiveSamples[j].m_bIsProcessed = false;
|
||||||
|
//continue for j
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -847,59 +938,69 @@ cAudioManager::ProcessActiveQueues()
|
|||||||
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
|
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (uint8 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; ++i) {
|
for (uint8 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; i++) {
|
||||||
tSound &sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
|
tSound& sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
|
||||||
if (!sample.m_bIsProcessed && !sample.m_bLoopEnded && m_asAudioEntities[sample.m_nEntityIndex].m_bIsUsed && sample.m_nSampleIndex < NO_SAMPLE) {
|
if (!sample.m_bIsProcessed && !sample.m_bLoopEnded &&
|
||||||
|
m_asAudioEntities[sample.m_nEntityIndex].m_bIsUsed && sample.m_nSampleIndex < NO_SAMPLE) {
|
||||||
if (sample.m_nCounter > 255 && sample.m_nLoopCount && sample.m_nLoopsRemaining) {
|
if (sample.m_nCounter > 255 && sample.m_nLoopCount && sample.m_nLoopsRemaining) {
|
||||||
--sample.m_nLoopsRemaining;
|
sample.m_nLoopsRemaining--;
|
||||||
sample.m_nReleasingVolumeDivider = 1;
|
sample.m_nReleasingVolumeDivider = 1;
|
||||||
} else {
|
} else {
|
||||||
for (uint8 j = 0; j < m_nActiveSamples; ++j) {
|
for (uint8 j = 0; j < m_nActiveSamples; j++) {
|
||||||
if (!m_asActiveSamples[j].m_bIsProcessed) {
|
uint8 k = (j + field_6) % m_nActiveSamples;
|
||||||
if (sample.m_nLoopCount) {
|
if (!m_asActiveSamples[k].m_bIsProcessed) {
|
||||||
v28 = sample.m_nFrequency / m_nTimeSpent;
|
if (sample.m_nLoopCount != 0) {
|
||||||
v29 = sample.m_nLoopCount * SampleManager.GetSampleLength(sample.m_nSampleIndex);
|
freqDivided = sample.m_nFrequency / m_nTimeSpent;
|
||||||
if (v28 == 0)
|
loopCount = sample.m_nLoopCount * SampleManager.GetSampleLength(sample.m_nSampleIndex);
|
||||||
|
if (freqDivided == 0)
|
||||||
continue;
|
continue;
|
||||||
sample.m_nReleasingVolumeDivider = v29 / v28 + 1;
|
sample.m_nReleasingVolumeDivider = loopCount / freqDivided + 1;
|
||||||
}
|
}
|
||||||
memcpy(&m_asActiveSamples[j], &sample, sizeof(tSound));
|
memcpy(&m_asActiveSamples[k], &sample, sizeof(tSound));
|
||||||
if (!m_asActiveSamples[j].m_bIs2D)
|
if (!m_asActiveSamples[k].m_bIs2D)
|
||||||
TranslateEntity(&m_asActiveSamples[j].m_vecPos, &position);
|
TranslateEntity(&m_asActiveSamples[k].m_vecPos, &position);
|
||||||
if (field_4) {
|
if (field_4) {
|
||||||
emittingVol = 2 * Min(63, m_asActiveSamples[j].m_nEmittingVolume);
|
emittingVol = 2 * Min(63, m_asActiveSamples[k].m_nEmittingVolume);
|
||||||
} else {
|
} else {
|
||||||
emittingVol = m_asActiveSamples[j].m_nEmittingVolume;
|
emittingVol = m_asActiveSamples[k].m_nEmittingVolume;
|
||||||
}
|
}
|
||||||
if (SampleManager.InitialiseChannel(j, m_asActiveSamples[j].m_nSampleIndex, m_asActiveSamples[j].m_nBankIndex)) {
|
if (SampleManager.InitialiseChannel(k, m_asActiveSamples[k].m_nSampleIndex, m_asActiveSamples[k].m_nBankIndex)) {
|
||||||
SampleManager.SetChannelFrequency(j, m_asActiveSamples[j].m_nFrequency);
|
SampleManager.SetChannelFrequency(k, m_asActiveSamples[k].m_nFrequency);
|
||||||
SampleManager.SetChannelEmittingVolume(j, emittingVol);
|
bool isMobile = false;
|
||||||
SampleManager.SetChannelLoopPoints(j, m_asActiveSamples[j].m_nLoopStart, m_asActiveSamples[j].m_nLoopEnd);
|
for (int32 l = 0; l < ARRAY_SIZE(m_sMissionAudio.m_bIsMobile); l++) {
|
||||||
SampleManager.SetChannelLoopCount(j, m_asActiveSamples[j].m_nLoopCount);
|
if (m_sMissionAudio.m_bIsMobile[l]) {
|
||||||
SampleManager.SetChannelReverbFlag(j, m_asActiveSamples[j].m_bReverbFlag);
|
isMobile = true;
|
||||||
if (m_asActiveSamples[j].m_bIs2D) {
|
break;
|
||||||
uint8 offset = m_asActiveSamples[j].m_nOffset;
|
|
||||||
if (offset == 63) {
|
|
||||||
x = 0.f;
|
|
||||||
} else if (offset >= 63) {
|
|
||||||
x = (offset - 63) * 1000.f / 63;
|
|
||||||
} else {
|
|
||||||
x = -(63 - offset) * 1000.f / 63;
|
|
||||||
}
|
}
|
||||||
usedX = x;
|
|
||||||
usedY = 0.f;
|
|
||||||
usedZ = 0.f;
|
|
||||||
m_asActiveSamples[j].m_fSoundIntensity = 100000.0f;
|
|
||||||
} else {
|
|
||||||
usedX = position.x;
|
|
||||||
usedY = position.y;
|
|
||||||
usedZ = position.z;
|
|
||||||
}
|
}
|
||||||
SampleManager.SetChannel3DPosition(j, usedX, usedY, usedZ);
|
if (!isMobile || m_asActiveSamples[k].m_bIs2D) {
|
||||||
SampleManager.SetChannel3DDistances(j, m_asActiveSamples[j].m_fSoundIntensity, 0.25f * m_asActiveSamples[j].m_fSoundIntensity);
|
if (field_5538 < 127)
|
||||||
SampleManager.StartChannel(j);
|
emittingVol *= field_5538 / 127;
|
||||||
|
vol = emittingVol;
|
||||||
|
} else {
|
||||||
|
vol = (emittingVol * field_5538 / 127);
|
||||||
|
}
|
||||||
|
SampleManager.SetChannelEmittingVolume(k, vol);
|
||||||
|
SampleManager.SetChannelLoopPoints(k, m_asActiveSamples[k].m_nLoopStart, m_asActiveSamples[k].m_nLoopEnd);
|
||||||
|
SampleManager.SetChannelLoopCount(k, m_asActiveSamples[k].m_nLoopCount);
|
||||||
|
SampleManager.SetChannelReverbFlag(k, m_asActiveSamples[k].m_bReverbFlag);
|
||||||
|
if (m_asActiveSamples[k].m_bIs2D) {
|
||||||
|
offset = m_asActiveSamples[k].m_nOffset;
|
||||||
|
if (offset == 63) {
|
||||||
|
x = 0.0f;
|
||||||
|
} else if (offset >= 63) {
|
||||||
|
x = (offset - 63) * 1000.0f / 63;
|
||||||
|
} else {
|
||||||
|
x = -(63 - offset) * 1000.0f / 63; //same like line below
|
||||||
|
}
|
||||||
|
position = CVector(x, 0.0f, 0.0f);
|
||||||
|
m_asActiveSamples[k].m_fSoundIntensity = 100000.0f;
|
||||||
|
}
|
||||||
|
SampleManager.SetChannel3DPosition(k, position.x, position.y, position.z);
|
||||||
|
SampleManager.SetChannel3DDistances(k, m_asActiveSamples[k].m_fSoundIntensity, 0.25f * m_asActiveSamples[k].m_fSoundIntensity);
|
||||||
|
SampleManager.StartChannel(k);
|
||||||
}
|
}
|
||||||
m_asActiveSamples[j].m_bIsProcessed = true;
|
m_asActiveSamples[k].m_bIsProcessed = true;
|
||||||
sample.m_bIsProcessed = true;
|
sample.m_bIsProcessed = true;
|
||||||
sample.m_nVolumeChange = -1;
|
sample.m_nVolumeChange = -1;
|
||||||
break;
|
break;
|
||||||
@@ -908,6 +1009,7 @@ cAudioManager::ProcessActiveQueues()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
field_6 %= m_nActiveSamples;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -922,7 +1024,7 @@ cAudioManager::ClearRequestedQueue()
|
|||||||
void
|
void
|
||||||
cAudioManager::ClearActiveSamples()
|
cAudioManager::ClearActiveSamples()
|
||||||
{
|
{
|
||||||
for (int32 i = 0; i < m_nActiveSamples; i++) {
|
for (uint8 i = 0; i < m_nActiveSamples; i++) {
|
||||||
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
|
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
|
||||||
m_asActiveSamples[i].m_nCounter = 0;
|
m_asActiveSamples[i].m_nCounter = 0;
|
||||||
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
|
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
|
||||||
@@ -945,7 +1047,7 @@ cAudioManager::ClearActiveSamples()
|
|||||||
m_asActiveSamples[i].m_nCalculatedVolume = 0;
|
m_asActiveSamples[i].m_nCalculatedVolume = 0;
|
||||||
m_asActiveSamples[i].m_nReleasingVolumeDivider = 0;
|
m_asActiveSamples[i].m_nReleasingVolumeDivider = 0;
|
||||||
m_asActiveSamples[i].m_nVolumeChange = -1;
|
m_asActiveSamples[i].m_nVolumeChange = -1;
|
||||||
m_asActiveSamples[i].m_vecPos = {0.0f, 0.0f, 0.0f};
|
m_asActiveSamples[i].m_vecPos = CVector(0.0f, 0.0f, 0.0f);
|
||||||
m_asActiveSamples[i].m_bReverbFlag = false;
|
m_asActiveSamples[i].m_bReverbFlag = false;
|
||||||
m_asActiveSamples[i].m_nLoopsRemaining = 0;
|
m_asActiveSamples[i].m_nLoopsRemaining = 0;
|
||||||
m_asActiveSamples[i].m_bRequireReflection = false;
|
m_asActiveSamples[i].m_bRequireReflection = false;
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
#include "audio_enums.h"
|
#include "audio_enums.h"
|
||||||
#include "AudioCollision.h"
|
#include "AudioCollision.h"
|
||||||
#include "PoliceRadio.h"
|
#include "PoliceRadio.h"
|
||||||
|
#include "VehicleModelInfo.h"
|
||||||
|
#include "Vehicle.h"
|
||||||
|
|
||||||
class tSound
|
class tSound
|
||||||
{
|
{
|
||||||
@@ -28,6 +30,7 @@ public:
|
|||||||
uint8 m_nLoopsRemaining;
|
uint8 m_nLoopsRemaining;
|
||||||
bool m_bRequireReflection; // Used for oneshots
|
bool m_bRequireReflection; // Used for oneshots
|
||||||
uint8 m_nOffset;
|
uint8 m_nOffset;
|
||||||
|
uint8 field_4C;
|
||||||
int32 m_nReleasingVolumeDivider;
|
int32 m_nReleasingVolumeDivider;
|
||||||
bool m_bIsProcessed;
|
bool m_bIsProcessed;
|
||||||
bool m_bLoopEnded;
|
bool m_bLoopEnded;
|
||||||
@@ -35,7 +38,7 @@ public:
|
|||||||
int8 m_nVolumeChange;
|
int8 m_nVolumeChange;
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(tSound, 92);
|
VALIDATE_SIZE(tSound, 96);
|
||||||
|
|
||||||
class CPhysical;
|
class CPhysical;
|
||||||
class CAutomobile;
|
class CAutomobile;
|
||||||
@@ -57,7 +60,7 @@ VALIDATE_SIZE(tAudioEntity, 40);
|
|||||||
class tPedComment
|
class tPedComment
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int32 m_nSampleIndex;
|
uint32 m_nSampleIndex;
|
||||||
int32 m_nEntityIndex;
|
int32 m_nEntityIndex;
|
||||||
CVector m_vecPos;
|
CVector m_vecPos;
|
||||||
float m_fDistance;
|
float m_fDistance;
|
||||||
@@ -74,6 +77,10 @@ public:
|
|||||||
uint8 m_nIndexMap[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
|
uint8 m_nIndexMap[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
|
||||||
uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS];
|
uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS];
|
||||||
uint8 m_nActiveBank;
|
uint8 m_nActiveBank;
|
||||||
|
#ifdef GTA_PC
|
||||||
|
bool m_bDelay;
|
||||||
|
uint32 m_nDelayTimer;
|
||||||
|
#endif
|
||||||
|
|
||||||
cPedComments()
|
cPedComments()
|
||||||
{
|
{
|
||||||
@@ -87,27 +94,32 @@ public:
|
|||||||
m_nCommentsInBank[i] = 0;
|
m_nCommentsInBank[i] = 0;
|
||||||
m_nActiveBank = 0;
|
m_nActiveBank = 0;
|
||||||
}
|
}
|
||||||
void Add(tPedComment *com);
|
void Add(tPedComment *com); // done
|
||||||
void Process();
|
void Process(); // done
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(cPedComments, 1164);
|
VALIDATE_SIZE(cPedComments, 0x490);
|
||||||
|
|
||||||
class CEntity;
|
class CEntity;
|
||||||
|
|
||||||
|
#define MISSION_AUDIO_SLOTS (2)
|
||||||
|
|
||||||
|
// So instead of doing cMissionAudio [2] they've added [2] to every field of the struct...
|
||||||
|
// Only someone with a VERY EXTRAORDINARY mind could have come up with that
|
||||||
class cMissionAudio
|
class cMissionAudio
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CVector m_vecPos;
|
CVector m_vecPos[MISSION_AUDIO_SLOTS];
|
||||||
bool m_bPredefinedProperties;
|
bool m_bPredefinedProperties[MISSION_AUDIO_SLOTS];
|
||||||
int32 m_nSampleIndex;
|
int32 m_nSampleIndex[MISSION_AUDIO_SLOTS];
|
||||||
uint8 m_nLoadingStatus;
|
uint8 m_nLoadingStatus[MISSION_AUDIO_SLOTS];
|
||||||
uint8 m_nPlayStatus;
|
uint8 m_nPlayStatus[MISSION_AUDIO_SLOTS];
|
||||||
bool m_bIsPlaying;
|
bool m_bIsPlaying[MISSION_AUDIO_SLOTS];
|
||||||
int32 m_nMissionAudioCounter;
|
int32 m_nMissionAudioCounter[MISSION_AUDIO_SLOTS];
|
||||||
bool m_bIsPlayed;
|
bool m_bIsPlayed[MISSION_AUDIO_SLOTS];
|
||||||
|
bool m_bIsMobile[MISSION_AUDIO_SLOTS];
|
||||||
};
|
};
|
||||||
VALIDATE_SIZE(cMissionAudio, 32);
|
VALIDATE_SIZE(cMissionAudio, 0x38);
|
||||||
|
|
||||||
// name made up
|
// name made up
|
||||||
class cAudioScriptObjectManager
|
class cAudioScriptObjectManager
|
||||||
@@ -144,6 +156,7 @@ public:
|
|||||||
class cVehicleParams
|
class cVehicleParams
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
int32 m_VehicleType;
|
||||||
bool m_bDistanceCalculated;
|
bool m_bDistanceCalculated;
|
||||||
float m_fDistance;
|
float m_fDistance;
|
||||||
CVehicle *m_pVehicle;
|
CVehicle *m_pVehicle;
|
||||||
@@ -153,6 +166,7 @@ public:
|
|||||||
|
|
||||||
cVehicleParams()
|
cVehicleParams()
|
||||||
{
|
{
|
||||||
|
m_VehicleType = -1;
|
||||||
m_bDistanceCalculated = false;
|
m_bDistanceCalculated = false;
|
||||||
m_fDistance = 0.0f;
|
m_fDistance = 0.0f;
|
||||||
m_pVehicle = nil;
|
m_pVehicle = nil;
|
||||||
@@ -162,22 +176,17 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(cVehicleParams, 0x18);
|
VALIDATE_SIZE(cVehicleParams, 0x1C);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
/*
|
REFLECTION_NORTH = 0,
|
||||||
REFLECTION_YMAX = 0, top
|
REFLECTION_SOUTH,
|
||||||
REFLECTION_YMIN = 1, bottom
|
REFLECTION_WEST,
|
||||||
REFLECTION_XMIN = 2, left
|
REFLECTION_EAST,
|
||||||
REFLECTION_XMAX = 3, right
|
REFLECTION_CEIL_NORTH,
|
||||||
REFLECTION_ZMAX = 4,
|
REFLECTION_CEIL_SOUTH,
|
||||||
*/
|
REFLECTION_CEIL_WEST,
|
||||||
|
REFLECTION_CEIL_EAST,
|
||||||
REFLECTION_TOP = 0,
|
|
||||||
REFLECTION_BOTTOM,
|
|
||||||
REFLECTION_LEFT,
|
|
||||||
REFLECTION_RIGHT,
|
|
||||||
REFLECTION_UP,
|
|
||||||
MAX_REFLECTIONS,
|
MAX_REFLECTIONS,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -185,11 +194,12 @@ class cAudioManager
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool m_bIsInitialised;
|
bool m_bIsInitialised;
|
||||||
uint8 field_1; // unused
|
uint8 m_bReverb; // unused
|
||||||
bool m_bFifthFrameFlag;
|
bool m_bFifthFrameFlag;
|
||||||
uint8 m_nActiveSamples;
|
uint8 m_nActiveSamples;
|
||||||
uint8 field_4; // unused
|
uint8 field_4; // unused
|
||||||
bool m_bDynamicAcousticModelingStatus;
|
bool m_bDynamicAcousticModelingStatus;
|
||||||
|
int8 field_6;
|
||||||
float m_fSpeedOfSound;
|
float m_fSpeedOfSound;
|
||||||
bool m_bTimerJustReset;
|
bool m_bTimerJustReset;
|
||||||
int32 m_nTimer;
|
int32 m_nTimer;
|
||||||
@@ -205,6 +215,14 @@ public:
|
|||||||
CVector m_avecReflectionsPos[NUM_AUDIO_REFLECTIONS];
|
CVector m_avecReflectionsPos[NUM_AUDIO_REFLECTIONS];
|
||||||
float m_afReflectionsDistances[NUM_AUDIO_REFLECTIONS];
|
float m_afReflectionsDistances[NUM_AUDIO_REFLECTIONS];
|
||||||
cAudioScriptObjectManager m_sAudioScriptObjectManager;
|
cAudioScriptObjectManager m_sAudioScriptObjectManager;
|
||||||
|
|
||||||
|
// miami
|
||||||
|
uint8 m_bIsPlayerShutUp;
|
||||||
|
uint8 m_nPlayerMood;
|
||||||
|
uint32 m_nPlayerMoodTimer;
|
||||||
|
uint8 field_rest[4];
|
||||||
|
bool m_bGenericSfx;
|
||||||
|
|
||||||
cPedComments m_sPedComments;
|
cPedComments m_sPedComments;
|
||||||
int32 m_nFireAudioEntity;
|
int32 m_nFireAudioEntity;
|
||||||
int32 m_nWaterCannonEntity;
|
int32 m_nWaterCannonEntity;
|
||||||
@@ -214,8 +232,13 @@ public:
|
|||||||
int32 m_nCollisionEntity;
|
int32 m_nCollisionEntity;
|
||||||
cAudioCollisionManager m_sCollisionManager;
|
cAudioCollisionManager m_sCollisionManager;
|
||||||
int32 m_nProjectileEntity;
|
int32 m_nProjectileEntity;
|
||||||
|
#ifdef GTA_BRIDGE
|
||||||
int32 m_nBridgeEntity;
|
int32 m_nBridgeEntity;
|
||||||
|
#endif
|
||||||
|
int32 m_nEscalatorEntity;
|
||||||
|
int32 m_nExtraSoundsEntity;
|
||||||
cMissionAudio m_sMissionAudio;
|
cMissionAudio m_sMissionAudio;
|
||||||
|
uint8 field_5538; // something related to phone dialogues
|
||||||
int32 m_anRandomTable[5];
|
int32 m_anRandomTable[5];
|
||||||
uint8 m_nTimeSpent;
|
uint8 m_nTimeSpent;
|
||||||
uint8 m_nUserPause;
|
uint8 m_nUserPause;
|
||||||
@@ -226,280 +249,303 @@ public:
|
|||||||
~cAudioManager();
|
~cAudioManager();
|
||||||
|
|
||||||
// getters
|
// getters
|
||||||
uint32 GetFrameCounter() const { return m_FrameCounter; }
|
uint32 GetFrameCounter() const { return m_FrameCounter; } // done
|
||||||
float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; }
|
float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; } // done
|
||||||
int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; }
|
int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; }
|
||||||
int32 GetRandomNumberInRange(int32 idx, int32 low, int32 high) const { return (m_anRandomTable[idx] % (high - low + 1)) + low; }
|
int32 GetRandomNumberInRange(int32 idx, int32 low, int32 high) const { return (m_anRandomTable[idx] % (high - low + 1)) + low; }
|
||||||
bool ShouldDuckMissionAudio() const { return m_sMissionAudio.m_nPlayStatus == 1; }
|
bool IsMissionAudioSamplePlaying(uint8 slot) const; // { return m_sMissionAudio.m_nPlayStatus == 1; }
|
||||||
|
bool ShouldDuckMissionAudio(uint8 slot) const;
|
||||||
|
|
||||||
// "Should" be in alphabetic order, except "getXTalkSfx"
|
// "Should" be in alphabetic order, except "getXTalkSfx"
|
||||||
void AddDetailsToRequestedOrderList(uint8 sample);
|
void AddDetailsToRequestedOrderList(uint8 sample); // done (inlined in vc)
|
||||||
void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank,
|
void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool notLooping); // done
|
||||||
uint8 counter, bool notLooping);
|
void AddReflectionsToRequestedQueue(); // done
|
||||||
void AddReflectionsToRequestedQueue();
|
void AddReleasingSounds(); // done
|
||||||
void AddReleasingSounds();
|
void AddSampleToRequestedQueue(); // done
|
||||||
void AddSampleToRequestedQueue();
|
void AgeCrimes(); // done (inlined in vc)
|
||||||
void AgeCrimes();
|
|
||||||
|
|
||||||
void CalculateDistance(bool &condition, float dist);
|
void CalculateDistance(bool &condition, float dist); // done
|
||||||
bool CheckForAnAudioFileOnCD() const;
|
bool CheckForAnAudioFileOnCD() const; // done
|
||||||
void ClearActiveSamples();
|
void ClearActiveSamples(); // done
|
||||||
void ClearMissionAudio();
|
void ClearMissionAudio(uint8 slot); // done (inlined in vc)
|
||||||
void ClearRequestedQueue();
|
void ClearRequestedQueue(); // done (inlined in vc)
|
||||||
int32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2,
|
uint32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const; // done
|
||||||
float speedMultiplier) const;
|
int32 ComputePan(float, CVector *); // done
|
||||||
int32 ComputePan(float, CVector *);
|
uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const; // done
|
||||||
uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const;
|
int32 CreateEntity(eAudioType type, void *entity); // done
|
||||||
int32 CreateEntity(eAudioType type, void *entity);
|
|
||||||
|
|
||||||
void DestroyAllGameCreatedEntities();
|
void DestroyAllGameCreatedEntities(); // done
|
||||||
void DestroyEntity(int32 id);
|
void DestroyEntity(int32 id); // done (inlined in vc)
|
||||||
void DoPoliceRadioCrackle();
|
void DoPoliceRadioCrackle(); // done
|
||||||
|
|
||||||
// functions returning talk sfx,
|
// functions returning talk sfx,
|
||||||
// order from GetPedCommentSfx
|
// order from GetPedCommentSfx
|
||||||
uint32 GetPlayerTalkSfx(int16 sound);
|
uint32 GetPlayerTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetCopTalkSfx(int16 sound);
|
uint32 GetCopTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetSwatTalkSfx(int16 sound);
|
uint32 GetSwatTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetFBITalkSfx(int16 sound);
|
uint32 GetFBITalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetArmyTalkSfx(int16 sound);
|
uint32 GetArmyTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetMedicTalkSfx(int16 sound);
|
uint32 GetMedicTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetFiremanTalkSfx(int16 sound);
|
uint32 GetFiremanTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetNormalMaleTalkSfx(int16 sound);
|
uint32 GetDefaultTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetTaxiDriverTalkSfx(int16 sound);
|
uint32 GetHFYSTTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetPimpTalkSfx(int16 sound);
|
uint32 GetHFOSTTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetMafiaTalkSfx(int16 sound);
|
uint32 GetHMYSTTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetTriadTalkSfx(int16 sound);
|
uint32 GetHMOSTTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetDiabloTalkSfx(int16 sound);
|
uint32 GetHFYRITalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetYakuzaTalkSfx(int16 sound);
|
uint32 GetHFORITalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetYardieTalkSfx(int16 sound);
|
uint32 GetHMYRITalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetColumbianTalkSfx(int16 sound);
|
uint32 GetHMORITalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetHoodTalkSfx(int16 sound);
|
uint32 GetHFYBETalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBlackCriminalTalkSfx(int16 sound);
|
uint32 GetHFOBETalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetWhiteCriminalTalkSfx(int16 sound);
|
uint32 GetHMYBETalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetMaleNo2TalkSfx(int16 sound);
|
uint32 GetHMOBETalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBlackProjectMaleTalkSfx(int16 sound, int32 model);
|
uint32 GetHFYBUTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetWhiteFatMaleTalkSfx(int16 sound);
|
uint32 GetHFYMDTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBlackFatMaleTalkSfx(int16 sound);
|
uint32 GetHFYCGTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBlackCasualFemaleTalkSfx(int16 sound);
|
uint32 GetHFYPRTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetWhiteCasualFemaleTalkSfx(int16 sound);
|
uint32 GetHFOTRTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetFemaleNo3TalkSfx(int16 sound);
|
uint32 GetHMOTRTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBlackFatFemaleTalkSfx(int16 sound);
|
uint32 GetHMYAPTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetWhiteFatFemaleTalkSfx(int16 sound);
|
uint32 GetHMOCATalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBlackFemaleProstituteTalkSfx(int16 sound);
|
uint32 GetBMODKTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetWhiteFemaleProstituteTalkSfx(int16 sound);
|
uint32 GetBMYCRTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBlackProjectFemaleOldTalkSfx(int16 sound);
|
uint32 GetBFYSTTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBlackProjectFemaleYoungTalkSfx(int16 sound);
|
uint32 GetBFOSTTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetChinatownMaleOldTalkSfx(int16 sound);
|
uint32 GetBMYSTTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetChinatownMaleYoungTalkSfx(int16 sound);
|
uint32 GetBMOSTTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetChinatownFemaleOldTalkSfx(int16 sound);
|
uint32 GetBFYRITalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetChinatownFemaleYoungTalkSfx(int16 sound);
|
uint32 GetBFORITalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetLittleItalyMaleTalkSfx(int16 sound);
|
uint32 GetBMYRITalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetLittleItalyFemaleOldTalkSfx(int16 sound);
|
uint32 GetBFYBETalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetLittleItalyFemaleYoungTalkSfx(int16 sound);
|
uint32 GetBMYBETalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetWhiteDockerMaleTalkSfx(int16 sound);
|
uint32 GetBFOBETalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBlackDockerMaleTalkSfx(int16 sound);
|
uint32 GetBMOBETalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetScumMaleTalkSfx(int16 sound);
|
uint32 GetBMYBUTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetScumFemaleTalkSfx(int16 sound);
|
uint32 GetBFYPRTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetWhiteWorkerMaleTalkSfx(int16 sound);
|
uint32 GetBFOTRTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBlackWorkerMaleTalkSfx(int16 sound);
|
uint32 GetBMOTRTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBusinessMaleYoungTalkSfx(int16 sound, int32 model);
|
uint32 GetBMYPITalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBusinessMaleOldTalkSfx(int16 sound);
|
uint32 GetBMYBBTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetWhiteBusinessFemaleTalkSfx(int16 sound, int32 model);
|
uint32 GetWMYCRTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBlackBusinessFemaleTalkSfx(int16 sound);
|
uint32 GetWFYSTTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetSupermodelMaleTalkSfx(int16 sound);
|
uint32 GetWFOSTTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetSupermodelFemaleTalkSfx(int16 sound);
|
uint32 GetWMYSTTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetStewardMaleTalkSfx(int16 sound);
|
uint32 GetWMOSTTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetStewardFemaleTalkSfx(int16 sound);
|
uint32 GetWFYRITalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetFanMaleTalkSfx(int16 sound, int32 model);
|
uint32 GetWFORITalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetFanFemaleTalkSfx(int16 sound);
|
uint32 GetWMYRITalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetHospitalMaleTalkSfx(int16 sound);
|
uint32 GetWMORITalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetHospitalFemaleTalkSfx(int16 sound);
|
uint32 GetWFYBETalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetWhiteConstructionWorkerTalkSfx(int16 sound);
|
uint32 GetWMYBETalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetBlackConstructionWorkerTalkSfx(int16 sound);
|
uint32 GetWFOBETalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetShopperFemaleTalkSfx(int16 sound, int32 model);
|
uint32 GetWMOBETalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetStudentMaleTalkSfx(int16 sound);
|
uint32 GetWMYCWTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetStudentFemaleTalkSfx(int16 sound);
|
uint32 GetWMYGOTalkSfx(CPed *ped, int16 sound);
|
||||||
uint32 GetCasualMaleOldTalkSfx(int16 sound);
|
uint32 GetWFOGOTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWMOGOTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWFYLGTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWMYLGTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWFYBUTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWMYBUTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWMOBUTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWFYPRTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWFOTRTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWMOTRTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWMYPITalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWMOCATalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWFYJGTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWMYJGTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWFYSKTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWMYSKTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWFYSHTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWFOSHTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetJFOTOTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetJMOTOTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetCBTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetHNTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetSGTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetCLTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetGDTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetBKTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetPGTalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetVICETalkSfx(CPed *ped, int16 sound, int16 model);
|
||||||
|
uint32 GetWFYG1TalkSfx(CPed *ped, int16 sound);
|
||||||
|
uint32 GetWFYG2TalkSfx(CPed *ped, int16 sound);
|
||||||
|
|
||||||
uint32 GetSpecialCharacterTalkSfx(int32 modelIndex, int32 sound);
|
uint32 GetGenericMaleTalkSfx(CPed *ped, int16 sound); // todo names (inlined in vc)
|
||||||
uint32 GetEightTalkSfx(int16 sound);
|
uint32 GetGenericFemaleTalkSfx(CPed *ped, int16 sound); // todo names (inlined in vc)
|
||||||
uint32 GetFrankieTalkSfx(int16 sound);
|
|
||||||
uint32 GetMistyTalkSfx(int16 sound);
|
|
||||||
uint32 GetOJGTalkSfx(int16 sound);
|
|
||||||
uint32 GetCatatalinaTalkSfx(int16 sound);
|
|
||||||
uint32 GetBomberTalkSfx(int16 sound);
|
|
||||||
uint32 GetSecurityGuardTalkSfx(int16 sound);
|
|
||||||
uint32 GetChunkyTalkSfx(int16 sound);
|
|
||||||
|
|
||||||
uint32 GetGenericMaleTalkSfx(int16 sound);
|
|
||||||
uint32 GetGenericFemaleTalkSfx(int16 sound);
|
|
||||||
// end of functions returning talk sfx
|
// end of functions returning talk sfx
|
||||||
|
|
||||||
void GenerateIntegerRandomNumberTable();
|
void GenerateIntegerRandomNumberTable(); // done
|
||||||
char *Get3DProviderName(uint8 id) const;
|
char *Get3DProviderName(uint8 id) const; // done
|
||||||
uint8 GetCDAudioDriveLetter() const;
|
uint8 GetCDAudioDriveLetter() const; // done
|
||||||
int8 GetCurrent3DProviderIndex() const;
|
int8 GetCurrent3DProviderIndex() const; // done
|
||||||
float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used
|
int8 AutoDetect3DProviders() const; // done
|
||||||
float GetCollisionOneShotRatio(int32 a, float b) const;
|
float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used
|
||||||
float GetCollisionRatio(float a, float b, float c, float d) const;
|
float GetCollisionOneShotRatio(int32 a, float b) const; // done
|
||||||
float GetDistanceSquared(const CVector &v) const;
|
float GetCollisionRatio(float a, float b, float c, float d) const; // done (inlined in vc)
|
||||||
int32 GetJumboTaxiFreq() const;
|
float GetDistanceSquared(const CVector &v) const; // done (inlined in vc)
|
||||||
uint8 GetMissionAudioLoadingStatus() const;
|
int32 GetJumboTaxiFreq() const; // done (inlined in vc)
|
||||||
int8 GetMissionScriptPoliceAudioPlayingStatus() const;
|
uint8 GetMissionAudioLoadingStatus(uint8 slot) const; // done
|
||||||
uint8 GetNum3DProvidersAvailable() const;
|
int8 GetMissionScriptPoliceAudioPlayingStatus() const; // done
|
||||||
int32 GetPedCommentSfx(CPed *ped, int32 sound);
|
uint8 GetNum3DProvidersAvailable() const; // done
|
||||||
void GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) const;
|
uint32 GetPedCommentSfx(CPed *ped, int32 sound); // done
|
||||||
float GetVehicleDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile,
|
void GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) const; // done
|
||||||
cTransmission *transmission, float velocityChange);
|
float GetVehicleDriveWheelSkidValue(CVehicle *veh, tWheelState wheelState, float gasPedalAudio, cTransmission *transmission,
|
||||||
float GetVehicleNonDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile,
|
float velocityChange); // done
|
||||||
cTransmission *transmission, float velocityChange);
|
float GetVehicleNonDriveWheelSkidValue(CVehicle *veh, tWheelState wheelState, cTransmission *transmission, float velocityChange); // done
|
||||||
|
|
||||||
bool HasAirBrakes(int32 model) const;
|
bool HasAirBrakes(int32 model) const; // done
|
||||||
|
|
||||||
void Initialise();
|
void Initialise(); // done
|
||||||
void InitialisePoliceRadio();
|
void InitialisePoliceRadio(); // done
|
||||||
void InitialisePoliceRadioZones();
|
void InitialisePoliceRadioZones(); // done
|
||||||
void InterrogateAudioEntities();
|
void InterrogateAudioEntities(); // done (inlined)
|
||||||
bool IsAudioInitialised() const;
|
bool IsAudioInitialised() const; // done
|
||||||
bool IsMissionAudioSampleFinished();
|
bool IsMissionAudioSampleFinished(uint8 slot); // done
|
||||||
bool IsMP3RadioChannelAvailable() const;
|
bool IsMP3RadioChannelAvailable() const; // done
|
||||||
|
|
||||||
bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const;
|
bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; //done
|
||||||
|
|
||||||
void PlayLoadedMissionAudio();
|
void PlayLoadedMissionAudio(uint8 slot); // done
|
||||||
void PlayOneShot(int32 index, uint16 sound, float vol);
|
void PlayOneShot(int32 index, uint16 sound, float vol); // done
|
||||||
void PlaySuspectLastSeen(float x, float y, float z);
|
void PlaySuspectLastSeen(float x, float y, float z); // done
|
||||||
void PlayerJustGotInCar() const;
|
void PlayerJustGotInCar() const; // done
|
||||||
void PlayerJustLeftCar() const;
|
void PlayerJustLeftCar() const; // done
|
||||||
void PostInitialiseGameSpecificSetup();
|
void PostInitialiseGameSpecificSetup(); // done
|
||||||
void PostTerminateGameSpecificShutdown();
|
void PostTerminateGameSpecificShutdown(); // done
|
||||||
void PreInitialiseGameSpecificSetup() const;
|
void PreInitialiseGameSpecificSetup() const; // done
|
||||||
void PreloadMissionAudio(Const char *name);
|
void PreloadMissionAudio(uint8 slot, Const char *name); // done
|
||||||
void PreTerminateGameSpecificShutdown();
|
void PreTerminateGameSpecificShutdown(); // done
|
||||||
/// processX - main logic of adding new sounds
|
/// processX - main logic of adding new sounds
|
||||||
void ProcessActiveQueues();
|
void ProcessActiveQueues(); // done
|
||||||
bool ProcessAirBrakes(cVehicleParams& params);
|
bool ProcessAirBrakes(cVehicleParams& params); // done
|
||||||
void ProcessAirportScriptObject(uint8 sound);
|
|
||||||
bool ProcessBoatEngine(cVehicleParams& params);
|
bool ProcessBoatEngine(cVehicleParams& params);
|
||||||
bool ProcessBoatMovingOverWater(cVehicleParams& params);
|
bool ProcessBoatMovingOverWater(cVehicleParams& params); //done
|
||||||
void ProcessBridge();
|
#ifdef GTA_BRIDGE
|
||||||
void ProcessBridgeMotor();
|
void ProcessBridge(); // done(bcs not exists in VC)
|
||||||
void ProcessBridgeOneShots();
|
void ProcessBridgeMotor(); // done(bcs not exists in VC)
|
||||||
void ProcessBridgeWarning();
|
void ProcessBridgeOneShots(); // done(bcs not exists in VC)
|
||||||
bool ProcessCarBombTick(cVehicleParams& params);
|
void ProcessBridgeWarning(); // done(bcs not exists in VC)
|
||||||
void ProcessCesna(cVehicleParams& params);
|
#endif
|
||||||
void ProcessCinemaScriptObject(uint8 sound);
|
bool ProcessCarBombTick(cVehicleParams& params); // done
|
||||||
void ProcessCrane();
|
void ProcessCarHeli(cVehicleParams& params); // done
|
||||||
void ProcessDocksScriptObject(uint8 sound);
|
void ProcessCesna(cVehicleParams& params); // done
|
||||||
bool ProcessEngineDamage(cVehicleParams& params);
|
//void ProcessCrane(); // done(bcs not exists in VC)
|
||||||
void ProcessEntity(int32 sound);
|
bool ProcessEngineDamage(cVehicleParams& params); // done
|
||||||
void ProcessExplosions(int32 explosion);
|
void ProcessEntity(int32 sound); // done
|
||||||
void ProcessFireHydrant();
|
void ProcessExplosions(int32 explosion); // done
|
||||||
void ProcessFires(int32 entity);
|
void ProcessFireHydrant(); // done
|
||||||
void ProcessFrontEnd();
|
void ProcessFires(int32 entity); // done
|
||||||
void ProcessGarages();
|
void ProcessFrontEnd(); // done
|
||||||
bool ProcessHelicopter(cVehicleParams& params);
|
void ProcessGarages(); // done
|
||||||
void ProcessHomeScriptObject(uint8 sound);
|
void ProcessJumbo(cVehicleParams& params); // done
|
||||||
void ProcessJumbo(cVehicleParams& params);
|
void ProcessJumboAccel(CPlane *plane); // done
|
||||||
void ProcessJumboAccel(CPlane *plane);
|
void ProcessJumboDecel(CPlane *plane); // done
|
||||||
void ProcessJumboDecel(CPlane *plane);
|
void ProcessJumboFlying(); // done
|
||||||
void ProcessJumboFlying();
|
void ProcessJumboLanding(CPlane *plane); // done
|
||||||
void ProcessJumboLanding(CPlane *plane);
|
void ProcessJumboTakeOff(CPlane *plane); // done
|
||||||
void ProcessJumboTakeOff(CPlane *plane);
|
void ProcessJumboTaxi(); // done
|
||||||
void ProcessJumboTaxi();
|
void ProcessLoopingScriptObject(uint8 sound); // done
|
||||||
void ProcessLaunderetteScriptObject(uint8 sound);
|
void ProcessMissionAudio(); // done
|
||||||
void ProcessLoopingScriptObject(uint8 sound);
|
void ProcessMissionAudioSlot(uint8 slot); // done
|
||||||
void ProcessMissionAudio();
|
void ProcessModelHeliVehicle(cVehicleParams& params); // done
|
||||||
void ProcessModelCarEngine(cVehicleParams& params);
|
void ProcessModelVehicle(cVehicleParams& params); // done
|
||||||
void ProcessOneShotScriptObject(uint8 sound);
|
void ProcessOneShotScriptObject(uint8 sound); //
|
||||||
void ProcessPed(CPhysical *ped);
|
void ProcessPed(CPhysical *ped); // done
|
||||||
void ProcessPedHeadphones(cPedParams ¶ms);
|
void ProcessPedOneShots(cPedParams ¶ms); //
|
||||||
void ProcessPedOneShots(cPedParams ¶ms);
|
void ProcessPhysical(int32 id); // done
|
||||||
void ProcessPhysical(int32 id);
|
void ProcessPlane(cVehicleParams& params); // done
|
||||||
void ProcessPlane(cVehicleParams& params);
|
void ProcessPlayerMood(); // done
|
||||||
void ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *automobile);
|
void ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh); // done
|
||||||
void ProcessPoliceCellBeatingScriptObject(uint8 sound);
|
void ProcessProjectiles(); // done
|
||||||
void ProcessPornCinema(uint8 sound);
|
void ProcessRainOnVehicle(cVehicleParams& params); // done
|
||||||
void ProcessProjectiles();
|
void ProcessReverb() const; // done
|
||||||
void ProcessRainOnVehicle(cVehicleParams& params);
|
bool ProcessReverseGear(cVehicleParams& params); // done
|
||||||
void ProcessReverb() const;
|
void ProcessScriptObject(int32 id); // done
|
||||||
bool ProcessReverseGear(cVehicleParams& params);
|
void ProcessSpecial(); // done
|
||||||
void ProcessSawMillScriptObject(uint8 sound);
|
#ifdef GTA_TRAIN
|
||||||
void ProcessScriptObject(int32 id);
|
bool ProcessTrainNoise(cVehicleParams ¶ms); //done(bcs not exists in VC)
|
||||||
void ProcessShopScriptObject(uint8 sound);
|
#endif
|
||||||
void ProcessSpecial();
|
void ProcessVehicle(CVehicle *vehicle); // done
|
||||||
bool ProcessTrainNoise(cVehicleParams& params);
|
bool ProcessVehicleDoors(cVehicleParams ¶ms); // done
|
||||||
void ProcessVehicle(CVehicle *vehicle);
|
void ProcessVehicleEngine(cVehicleParams ¶ms); // done
|
||||||
bool ProcessVehicleDoors(cVehicleParams& params);
|
void ProcessVehicleFlatTyre(cVehicleParams ¶ms); // done
|
||||||
void ProcessVehicleEngine(cVehicleParams& params);
|
bool ProcessVehicleHorn(cVehicleParams ¶ms); // done
|
||||||
void ProcessVehicleHorn(cVehicleParams& params);
|
void ProcessVehicleOneShots(cVehicleParams ¶ms); // done
|
||||||
void ProcessVehicleOneShots(cVehicleParams& params);
|
bool ProcessVehicleReverseWarning(cVehicleParams ¶ms); // done
|
||||||
bool ProcessVehicleReverseWarning(cVehicleParams& params);
|
bool ProcessVehicleRoadNoise(cVehicleParams ¶ms); // done
|
||||||
bool ProcessVehicleRoadNoise(cVehicleParams& params);
|
bool ProcessVehicleSirenOrAlarm(cVehicleParams ¶ms); // done
|
||||||
bool ProcessVehicleSirenOrAlarm(cVehicleParams& params);
|
bool ProcessVehicleSkidding(cVehicleParams ¶ms); // done
|
||||||
bool ProcessVehicleSkidding(cVehicleParams& params);
|
void ProcessWaterCannon(int32); // done
|
||||||
void ProcessWaterCannon(int32);
|
void ProcessWeather(int32 id); // done
|
||||||
void ProcessWeather(int32 id);
|
bool ProcessWetRoadNoise(cVehicleParams& params); // done
|
||||||
bool ProcessWetRoadNoise(cVehicleParams& params);
|
void ProcessEscalators(); // done
|
||||||
void ProcessWorkShopScriptObject(uint8 sound);
|
void ProcessExtraSounds(); // done
|
||||||
|
|
||||||
int32 RandomDisplacement(uint32 seed) const;
|
int32 RandomDisplacement(uint32 seed) const; // done
|
||||||
void ReacquireDigitalHandle() const;
|
void ReacquireDigitalHandle() const; // done
|
||||||
void ReleaseDigitalHandle() const;
|
void ReleaseDigitalHandle() const; // done
|
||||||
void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2,
|
void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower, float intensity2); // done
|
||||||
float collisionPower, float intensity2);
|
void ReportCrime(eCrimeType crime, const CVector &pos); // done
|
||||||
void ReportCrime(eCrimeType crime, const CVector &pos);
|
void ResetAudioLogicTimers(uint32 timer); // done
|
||||||
void ResetAudioLogicTimers(uint32 timer);
|
void ResetPoliceRadio(); // done
|
||||||
void ResetPoliceRadio();
|
void ResetTimers(uint32 time); // done
|
||||||
void ResetTimers(uint32 time);
|
|
||||||
|
|
||||||
void Service();
|
void Service(); // done
|
||||||
void ServiceCollisions();
|
void ServiceCollisions(); // done
|
||||||
void ServicePoliceRadio();
|
void ServicePoliceRadio(); // done
|
||||||
void ServicePoliceRadioChannel(uint8 wantedLevel);
|
void ServicePoliceRadioChannel(uint8 wantedLevel); // done
|
||||||
void ServiceSoundEffects();
|
void ServiceSoundEffects(); // done
|
||||||
int8 SetCurrent3DProvider(uint8 which);
|
int8 SetCurrent3DProvider(uint8 which); // done
|
||||||
void SetDynamicAcousticModelingStatus(uint8 status);
|
void SetDynamicAcousticModelingStatus(uint8 status); // done
|
||||||
void SetEffectsFadeVol(uint8 volume) const;
|
void SetEffectsFadeVol(uint8 volume) const; // done
|
||||||
void SetEffectsMasterVolume(uint8 volume) const;
|
void SetEffectsMasterVolume(uint8 volume) const; // done
|
||||||
void SetEntityStatus(int32 id, uint8 status);
|
void SetMP3BoostVolume(uint8 volume) const; // done
|
||||||
uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision);
|
void SetEntityStatus(int32 id, uint8 status); // done
|
||||||
void SetMissionAudioLocation(float x, float y, float z);
|
uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision); // done
|
||||||
void SetMissionScriptPoliceAudio(int32 sfx) const;
|
void SetMissionAudioLocation(uint8 slot, float x, float y, float z); // done
|
||||||
void SetMonoMode(uint8 mono);
|
void SetMissionScriptPoliceAudio(int32 sfx) const; // inlined and optimized
|
||||||
void SetMusicFadeVol(uint8 volume) const;
|
void SetMonoMode(uint8 mono); // done
|
||||||
void SetMusicMasterVolume(uint8 volume) const;
|
void SetMusicFadeVol(uint8 volume) const; // done
|
||||||
void SetSpeakerConfig(int32 conf) const;
|
void SetMusicMasterVolume(uint8 volume) const; // done
|
||||||
void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter);
|
void SetSpeakerConfig(int32 conf) const; // done
|
||||||
void SetUpOneShotCollisionSound(const cAudioCollision &col);
|
void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter); // done
|
||||||
bool SetupCrimeReport();
|
void SetUpOneShotCollisionSound(const cAudioCollision &col); // done
|
||||||
bool SetupJumboEngineSound(uint8 vol, uint32 freq);
|
bool SetupCrimeReport(); // done
|
||||||
bool SetupJumboFlySound(uint8 emittingVol);
|
bool SetupJumboEngineSound(uint8 vol, uint32 freq); // done
|
||||||
bool SetupJumboRumbleSound(uint8 emittingVol);
|
bool SetupJumboFlySound(uint8 emittingVol); // done
|
||||||
bool SetupJumboTaxiSound(uint8 vol);
|
bool SetupJumboRumbleSound(uint8 emittingVol); // done
|
||||||
bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq);
|
bool SetupJumboTaxiSound(uint8 vol); // done
|
||||||
void SetupPedComments(cPedParams ¶ms, uint16 sound);
|
bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq); // done
|
||||||
|
void SetupPedComments(cPedParams ¶ms, uint16 sound); // done
|
||||||
void SetupSuspectLastSeenReport();
|
void SetupSuspectLastSeenReport();
|
||||||
|
|
||||||
void Terminate();
|
void Terminate(); // done
|
||||||
void TranslateEntity(Const CVector *v1, CVector *v2) const;
|
void TranslateEntity(Const CVector *v1, CVector *v2) const; // done
|
||||||
|
|
||||||
void UpdateGasPedalAudio(CAutomobile *automobile);
|
void UpdateGasPedalAudio(CVehicle *veh, int vehType); // done
|
||||||
void UpdateReflections();
|
void UpdateReflections(); // done
|
||||||
bool UsesReverseWarning(int32 model) const;
|
bool UsesReverseWarning(int32 model) const; // done
|
||||||
bool UsesSiren(int32 model) const;
|
bool UsesSiren(cVehicleParams ¶ms) const; // done
|
||||||
bool UsesSirenSwitching(int32 model) const;
|
bool UsesSirenSwitching(cVehicleParams ¶ms) const; // done
|
||||||
|
|
||||||
|
CVehicle *FindVehicleOfPlayer(); // done
|
||||||
|
void SetPedTalkingStatus(CPed *ped, uint8 status); // done
|
||||||
|
void SetPlayersMood(uint8 mood, uint32 time); // done
|
||||||
|
|
||||||
|
float Sqrt(float v) const { return v <= 0.0f ? 0.0f : ::Sqrt(v); }
|
||||||
|
|
||||||
#ifdef GTA_PC
|
#ifdef GTA_PC
|
||||||
// only used in pc
|
// only used in pc
|
||||||
void AdjustSamplesVolume();
|
void AdjustSamplesVolume(); // done (inlined)
|
||||||
uint8 ComputeEmittingVolume(uint8 emittingVolume, float intensity, float dist);
|
uint8 ComputeEmittingVolume(uint8 emittingVolume, float intensity, float dist); // done (inlined)
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef AUDIO_MSS
|
//#ifdef AUDIO_MSS
|
||||||
static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error");
|
//static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error");
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
extern cAudioManager AudioManager;
|
extern cAudioManager AudioManager;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -62,6 +62,15 @@ cDMAudio::SetMonoMode(uint8 mono)
|
|||||||
AudioManager.SetMonoMode(mono);
|
AudioManager.SetMonoMode(mono);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cDMAudio::SetMP3BoostVolume(uint8 volume)
|
||||||
|
{
|
||||||
|
uint8 vol = volume;
|
||||||
|
if (vol > MAX_VOLUME) vol = MAX_VOLUME;
|
||||||
|
|
||||||
|
AudioManager.SetMP3BoostVolume(vol);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::SetEffectsMasterVolume(uint8 volume)
|
cDMAudio::SetEffectsMasterVolume(uint8 volume)
|
||||||
{
|
{
|
||||||
@@ -110,6 +119,11 @@ cDMAudio::Get3DProviderName(uint8 id)
|
|||||||
return AudioManager.Get3DProviderName(id);
|
return AudioManager.Get3DProviderName(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int8 cDMAudio::AutoDetect3DProviders(void)
|
||||||
|
{
|
||||||
|
return AudioManager.AutoDetect3DProviders();
|
||||||
|
}
|
||||||
|
|
||||||
int8
|
int8
|
||||||
cDMAudio::GetCurrent3DProviderIndex(void)
|
cDMAudio::GetCurrent3DProviderIndex(void)
|
||||||
{
|
{
|
||||||
@@ -224,13 +238,13 @@ cDMAudio::PlayFrontEndSound(uint16 frontend, uint32 volume)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::PlayRadioAnnouncement(uint8 announcement)
|
cDMAudio::PlayRadioAnnouncement(uint32 announcement)
|
||||||
{
|
{
|
||||||
MusicManager.PlayAnnouncement(announcement);
|
MusicManager.PlayAnnouncement(announcement);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::PlayFrontEndTrack(uint8 track, uint8 frontendFlag)
|
cDMAudio::PlayFrontEndTrack(uint32 track, uint8 frontendFlag)
|
||||||
{
|
{
|
||||||
MusicManager.PlayFrontEndTrack(track, frontendFlag);
|
MusicManager.PlayFrontEndTrack(track, frontendFlag);
|
||||||
}
|
}
|
||||||
@@ -254,7 +268,7 @@ cDMAudio::ChangeMusicMode(uint8 mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::PreloadCutSceneMusic(uint8 track)
|
cDMAudio::PreloadCutSceneMusic(uint32 track)
|
||||||
{
|
{
|
||||||
MusicManager.PreloadCutSceneMusic(track);
|
MusicManager.PreloadCutSceneMusic(track);
|
||||||
}
|
}
|
||||||
@@ -272,39 +286,39 @@ cDMAudio::StopCutSceneMusic(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::PreloadMissionAudio(Const char *missionAudio)
|
cDMAudio::PreloadMissionAudio(uint8 slot, Const char *missionAudio)
|
||||||
{
|
{
|
||||||
AudioManager.PreloadMissionAudio(missionAudio);
|
AudioManager.PreloadMissionAudio(slot, missionAudio);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8
|
uint8
|
||||||
cDMAudio::GetMissionAudioLoadingStatus(void)
|
cDMAudio::GetMissionAudioLoadingStatus(uint8 slot)
|
||||||
{
|
{
|
||||||
return AudioManager.GetMissionAudioLoadingStatus();
|
return AudioManager.GetMissionAudioLoadingStatus(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::SetMissionAudioLocation(float x, float y, float z)
|
cDMAudio::SetMissionAudioLocation(uint8 slot, float x, float y, float z)
|
||||||
{
|
{
|
||||||
AudioManager.SetMissionAudioLocation(x, y, z);
|
AudioManager.SetMissionAudioLocation(slot, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::PlayLoadedMissionAudio(void)
|
cDMAudio::PlayLoadedMissionAudio(uint8 slot)
|
||||||
{
|
{
|
||||||
AudioManager.PlayLoadedMissionAudio();
|
AudioManager.PlayLoadedMissionAudio(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
cDMAudio::IsMissionAudioSampleFinished(void)
|
cDMAudio::IsMissionAudioSampleFinished(uint8 slot)
|
||||||
{
|
{
|
||||||
return AudioManager.IsMissionAudioSampleFinished();
|
return AudioManager.IsMissionAudioSampleFinished(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::ClearMissionAudio(void)
|
cDMAudio::ClearMissionAudio(uint8 slot)
|
||||||
{
|
{
|
||||||
AudioManager.ClearMissionAudio();
|
AudioManager.ClearMissionAudio(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8
|
uint8
|
||||||
@@ -320,7 +334,49 @@ cDMAudio::SetRadioInCar(uint32 radio)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::SetRadioChannel(uint8 radio, int32 pos)
|
cDMAudio::SetRadioChannel(uint32 radio, int32 pos)
|
||||||
{
|
{
|
||||||
MusicManager.SetRadioChannelByScript(radio, pos);
|
MusicManager.SetRadioChannelByScript(radio, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cDMAudio::SetStartingTrackPositions(uint8 isStartGame)
|
||||||
|
{
|
||||||
|
MusicManager.SetStartingTrackPositions(isStartGame);
|
||||||
|
}
|
||||||
|
|
||||||
|
float *
|
||||||
|
cDMAudio::GetListenTimeArray()
|
||||||
|
{
|
||||||
|
return MusicManager.GetListenTimeArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32
|
||||||
|
cDMAudio::GetFavouriteRadioStation()
|
||||||
|
{
|
||||||
|
return MusicManager.GetFavouriteRadioStation();
|
||||||
|
}
|
||||||
|
|
||||||
|
int32
|
||||||
|
cDMAudio::GetRadioPosition(uint32 station)
|
||||||
|
{
|
||||||
|
return MusicManager.GetRadioPosition(station);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cDMAudio::SetPedTalkingStatus(CPed *ped, uint8 status)
|
||||||
|
{
|
||||||
|
return AudioManager.SetPedTalkingStatus(ped, status);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cDMAudio::SetPlayersMood(uint8 mood, uint32 time)
|
||||||
|
{
|
||||||
|
return AudioManager.SetPlayersMood(mood, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cDMAudio::ShutUpPlayerTalking(uint8 state)
|
||||||
|
{
|
||||||
|
AudioManager.m_bIsPlayerShutUp = state;
|
||||||
|
}
|
||||||
@@ -7,6 +7,9 @@
|
|||||||
#define AEHANDLE_IS_FAILED(h) ((h)<0)
|
#define AEHANDLE_IS_FAILED(h) ((h)<0)
|
||||||
#define AEHANDLE_IS_OK(h) ((h)>=0)
|
#define AEHANDLE_IS_OK(h) ((h)>=0)
|
||||||
|
|
||||||
|
#define NO_AUDIO_PROVIDER -3
|
||||||
|
#define AUDIO_PROVIDER_NOT_DETERMINED -99
|
||||||
|
|
||||||
class cAudioScriptObject;
|
class cAudioScriptObject;
|
||||||
class CEntity;
|
class CEntity;
|
||||||
|
|
||||||
@@ -27,6 +30,7 @@ public:
|
|||||||
void DestroyAllGameCreatedEntities(void);
|
void DestroyAllGameCreatedEntities(void);
|
||||||
|
|
||||||
void SetMonoMode(uint8 mono);
|
void SetMonoMode(uint8 mono);
|
||||||
|
void SetMP3BoostVolume(uint8 volume);
|
||||||
void SetEffectsMasterVolume(uint8 volume);
|
void SetEffectsMasterVolume(uint8 volume);
|
||||||
void SetMusicMasterVolume(uint8 volume);
|
void SetMusicMasterVolume(uint8 volume);
|
||||||
void SetEffectsFadeVol(uint8 volume);
|
void SetEffectsFadeVol(uint8 volume);
|
||||||
@@ -35,6 +39,8 @@ public:
|
|||||||
uint8 GetNum3DProvidersAvailable(void);
|
uint8 GetNum3DProvidersAvailable(void);
|
||||||
char *Get3DProviderName(uint8 id);
|
char *Get3DProviderName(uint8 id);
|
||||||
|
|
||||||
|
int8 AutoDetect3DProviders(void);
|
||||||
|
|
||||||
int8 GetCurrent3DProviderIndex(void);
|
int8 GetCurrent3DProviderIndex(void);
|
||||||
int8 SetCurrent3DProvider(uint8 which);
|
int8 SetCurrent3DProvider(uint8 which);
|
||||||
|
|
||||||
@@ -63,27 +69,35 @@ public:
|
|||||||
void ReportCollision(CEntity *entityA, CEntity *entityB, uint8 surfaceTypeA, uint8 surfaceTypeB, float collisionPower, float velocity);
|
void ReportCollision(CEntity *entityA, CEntity *entityB, uint8 surfaceTypeA, uint8 surfaceTypeB, float collisionPower, float velocity);
|
||||||
|
|
||||||
void PlayFrontEndSound(uint16 frontend, uint32 volume);
|
void PlayFrontEndSound(uint16 frontend, uint32 volume);
|
||||||
void PlayRadioAnnouncement(uint8 announcement);
|
void PlayRadioAnnouncement(uint32 announcement);
|
||||||
void PlayFrontEndTrack(uint8 track, uint8 frontendFlag);
|
void PlayFrontEndTrack(uint32 track, uint8 frontendFlag);
|
||||||
void StopFrontEndTrack(void);
|
void StopFrontEndTrack(void);
|
||||||
|
|
||||||
void ResetTimers(uint32 time);
|
void ResetTimers(uint32 time);
|
||||||
|
|
||||||
void ChangeMusicMode(uint8 mode);
|
void ChangeMusicMode(uint8 mode);
|
||||||
|
|
||||||
void PreloadCutSceneMusic(uint8 track);
|
void PreloadCutSceneMusic(uint32 track);
|
||||||
void PlayPreloadedCutSceneMusic(void);
|
void PlayPreloadedCutSceneMusic(void);
|
||||||
void StopCutSceneMusic(void);
|
void StopCutSceneMusic(void);
|
||||||
|
|
||||||
void PreloadMissionAudio(Const char *missionAudio);
|
void PreloadMissionAudio(uint8 slot, Const char *missionAudio);
|
||||||
uint8 GetMissionAudioLoadingStatus(void);
|
uint8 GetMissionAudioLoadingStatus(uint8 slot);
|
||||||
void SetMissionAudioLocation(float x, float y, float z);
|
void SetMissionAudioLocation(uint8 slot, float x, float y, float z);
|
||||||
void PlayLoadedMissionAudio(void);
|
void PlayLoadedMissionAudio(uint8 slot);
|
||||||
bool IsMissionAudioSampleFinished(void);
|
bool IsMissionAudioSampleFinished(uint8 slot);
|
||||||
void ClearMissionAudio(void);
|
void ClearMissionAudio(uint8 slot);
|
||||||
|
|
||||||
uint8 GetRadioInCar(void);
|
uint8 GetRadioInCar(void);
|
||||||
void SetRadioInCar(uint32 radio);
|
void SetRadioInCar(uint32 radio);
|
||||||
void SetRadioChannel(uint8 radio, int32 pos);
|
void SetRadioChannel(uint32 radio, int32 pos);
|
||||||
|
|
||||||
|
void SetStartingTrackPositions(uint8 isStartGame);
|
||||||
|
float *GetListenTimeArray();
|
||||||
|
uint32 GetFavouriteRadioStation();
|
||||||
|
int32 GetRadioPosition(uint32 station);
|
||||||
|
void SetPedTalkingStatus(class CPed *ped, uint8 status);
|
||||||
|
void SetPlayersMood(uint8 mood, uint32 time);
|
||||||
|
void ShutUpPlayerTalking(uint8 state);
|
||||||
};
|
};
|
||||||
extern cDMAudio DMAudio;
|
extern cDMAudio DMAudio;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -11,41 +11,53 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class CVehicle;
|
class CVehicle;
|
||||||
|
class CPed;
|
||||||
|
|
||||||
class cMusicManager
|
class cMusicManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool m_bIsInitialised;
|
bool m_bIsInitialised;
|
||||||
bool m_bDisabled;
|
bool m_bDisabled;
|
||||||
uint8 m_nMusicMode;
|
bool field_2;
|
||||||
uint8 m_nCurrentStreamedSound;
|
uint8 m_nVolumeLatency;
|
||||||
uint8 m_nPreviousStreamedSound;
|
uint8 m_nCurrentVolume;
|
||||||
bool m_bFrontendTrackFinished;
|
uint8 m_nMaxVolume;
|
||||||
bool m_bPlayInFrontend;
|
uint32 m_nAnnouncement;
|
||||||
bool m_bSetNextStation;
|
|
||||||
uint8 m_nAnnouncement;
|
|
||||||
bool m_bPreviousPlayerInCar;
|
|
||||||
bool m_bPlayerInCar;
|
|
||||||
bool m_bAnnouncementInProgress;
|
bool m_bAnnouncementInProgress;
|
||||||
tStreamedSample m_aTracks[TOTAL_STREAMED_SOUNDS];
|
tStreamedSample m_aTracks[TOTAL_STREAMED_SOUNDS];
|
||||||
bool m_bResetTimers;
|
bool m_bResetTimers;
|
||||||
uint32 m_nResetTime;
|
uint32 m_nResetTime;
|
||||||
uint32 m_nLastTrackServiceTime;
|
|
||||||
uint32 m_nTimer;
|
|
||||||
bool m_bDoTrackService;
|
|
||||||
bool m_bIgnoreTimeDelay;
|
|
||||||
bool m_bDontServiceAmbienceTrack;
|
|
||||||
bool m_bRadioSetByScript;
|
bool m_bRadioSetByScript;
|
||||||
uint8 m_nRadioStation;
|
uint8 m_nRadioStation;
|
||||||
int32 m_nRadioPosition;
|
uint32 m_nRadioPosition;
|
||||||
uint8 m_nRadioInCar;
|
uint32 m_nRadioInCar;
|
||||||
|
uint32 m_nFrontendTrack;
|
||||||
|
uint32 m_nPlayingTrack;
|
||||||
|
uint8 m_nUpcomingMusicMode;
|
||||||
|
uint8 m_nMusicMode;
|
||||||
|
bool field_398E;
|
||||||
|
bool field_398F;
|
||||||
|
uint32 m_nStreamedTrack;
|
||||||
|
bool field_3994;
|
||||||
|
bool field_3995;
|
||||||
|
bool field_3996;
|
||||||
|
bool field_3997;
|
||||||
|
int8 nFramesSinceCutsceneEnded;
|
||||||
|
bool field_3999;
|
||||||
|
bool field_399A;
|
||||||
|
uint8 m_nMusicModeToBeSet;
|
||||||
|
bool field_399C;
|
||||||
|
float aListenTimeArray[NUM_RADIOS];
|
||||||
|
float m_nLastTrackServiceTime;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cMusicManager();
|
cMusicManager();
|
||||||
bool IsInitialised() { return m_bIsInitialised; }
|
bool IsInitialised() { return m_bIsInitialised; }
|
||||||
uint32 GetMusicMode() { return m_nMusicMode; }
|
uint8 GetMusicMode() { return m_nMusicMode; }
|
||||||
uint8 GetCurrentTrack() { return m_nCurrentStreamedSound; }
|
uint32 GetCurrentTrack() { return m_nPlayingTrack; }
|
||||||
|
|
||||||
|
void ResetMusicAfterReload();
|
||||||
|
void SetStartingTrackPositions(uint8 isNewGameTimer);
|
||||||
bool Initialise();
|
bool Initialise();
|
||||||
void Terminate();
|
void Terminate();
|
||||||
|
|
||||||
@@ -55,35 +67,47 @@ public:
|
|||||||
bool PlayerInCar();
|
bool PlayerInCar();
|
||||||
void DisplayRadioStationName();
|
void DisplayRadioStationName();
|
||||||
|
|
||||||
void PlayAnnouncement(uint8);
|
void PlayAnnouncement(uint32);
|
||||||
void PlayFrontEndTrack(uint8, uint8);
|
void PlayFrontEndTrack(uint32, uint8);
|
||||||
void PreloadCutSceneMusic(uint8);
|
void PreloadCutSceneMusic(uint32);
|
||||||
void PlayPreloadedCutSceneMusic(void);
|
void PlayPreloadedCutSceneMusic(void);
|
||||||
void StopCutSceneMusic(void);
|
void StopCutSceneMusic(void);
|
||||||
uint8 GetRadioInCar(void);
|
uint32 GetRadioInCar(void);
|
||||||
void SetRadioInCar(uint32);
|
void SetRadioInCar(uint32);
|
||||||
void SetRadioChannelByScript(uint8, int32);
|
void SetRadioChannelByScript(uint32, int32);
|
||||||
|
|
||||||
void ResetMusicAfterReload();
|
|
||||||
|
|
||||||
void ResetTimers(int32);
|
void ResetTimers(int32);
|
||||||
void Service();
|
void Service();
|
||||||
void ServiceFrontEndMode();
|
void ServiceFrontEndMode();
|
||||||
void ServiceGameMode();
|
void ServiceGameMode();
|
||||||
void ServiceAmbience();
|
void ServiceAmbience();
|
||||||
void ServiceTrack();
|
void ServiceTrack(CVehicle *veh, CPed *ped);
|
||||||
|
|
||||||
bool UsesPoliceRadio(CVehicle *veh);
|
bool UsesPoliceRadio(CVehicle *veh);
|
||||||
uint32 GetTrackStartPos(uint8);
|
bool UsesTaxiRadio(CVehicle *veh);
|
||||||
|
uint32 GetTrackStartPos(uint32 track);
|
||||||
|
|
||||||
void ComputeAmbienceVol(uint8 reset, uint8& outVolume);
|
void ComputeAmbienceVol(uint8 reset, uint8& outVolume);
|
||||||
bool ServiceAnnouncement();
|
bool ServiceAnnouncement();
|
||||||
|
|
||||||
uint8 GetCarTuning();
|
uint32 GetCarTuning();
|
||||||
uint8 GetNextCarTuning();
|
uint32 GetNextCarTuning();
|
||||||
bool ChangeRadioChannel();
|
bool ChangeRadioChannel();
|
||||||
|
void RecordRadioStats();
|
||||||
|
void SetUpCorrectAmbienceTrack();
|
||||||
|
float *GetListenTimeArray();
|
||||||
|
uint32 GetRadioPosition(uint32 station);
|
||||||
|
uint32 GetFavouriteRadioStation();
|
||||||
|
void SetMalibuClubTrackPos(uint8 pos);
|
||||||
|
void SetStripClubTrackPos(uint8 pos);
|
||||||
|
bool CheckForMusicInterruptions();
|
||||||
|
|
||||||
|
void Enable();
|
||||||
|
void Disable();
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(cMusicManager, 0x95C);
|
VALIDATE_SIZE(cMusicManager, 0x95C);
|
||||||
|
|
||||||
extern cMusicManager MusicManager;
|
extern cMusicManager MusicManager;
|
||||||
|
extern bool g_bAnnouncementReadPosAlready; // we have a symbol of this so it was declared in .h
|
||||||
|
float GetHeightScale();
|
||||||
|
|||||||
@@ -13,8 +13,9 @@
|
|||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "Zones.h"
|
#include "Zones.h"
|
||||||
#include "sampman.h"
|
#include "sampman.h"
|
||||||
|
#include "Wanted.h"
|
||||||
|
|
||||||
const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples);
|
const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples);
|
||||||
const int policeChannel = channels + 1;
|
const int policeChannel = channels + 1;
|
||||||
|
|
||||||
struct tPoliceRadioZone {
|
struct tPoliceRadioZone {
|
||||||
@@ -24,8 +25,6 @@ struct tPoliceRadioZone {
|
|||||||
};
|
};
|
||||||
|
|
||||||
tPoliceRadioZone ZoneSfx[NUMAUDIOZONES];
|
tPoliceRadioZone ZoneSfx[NUMAUDIOZONES];
|
||||||
char SubZo2Label[8];
|
|
||||||
char SubZo3Label[8];
|
|
||||||
|
|
||||||
int32 g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES;
|
int32 g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES;
|
||||||
int8 g_nMissionAudioPlayingStatus = 2;
|
int8 g_nMissionAudioPlayingStatus = 2;
|
||||||
@@ -42,46 +41,22 @@ cAudioManager::InitialisePoliceRadioZones()
|
|||||||
strcpy(ZoneSfx[i].m_aName, name); \
|
strcpy(ZoneSfx[i].m_aName, name); \
|
||||||
ZoneSfx[i].m_nSampleIndex = sample;
|
ZoneSfx[i].m_nSampleIndex = sample;
|
||||||
|
|
||||||
SETZONESFX(0, "HOSPI_2", SFX_POLICE_RADIO_ROCKFORD);
|
SETZONESFX(0, "VICE_C", SFX_POLICE_RADIO_VICE_CITY);
|
||||||
SETZONESFX(1, "CONSTRU", SFX_POLICE_RADIO_FORT_STAUNTON);
|
SETZONESFX(1, "IND_ZON", SFX_POLICE_RADIO_VICE_CITY_BEACH);
|
||||||
SETZONESFX(2, "STADIUM", SFX_POLICE_RADIO_ASPATRIA);
|
SETZONESFX(2, "COM_ZON", SFX_POLICE_RADIO_VICE_CITY_MAINLAND);
|
||||||
SETZONESFX(3, "YAKUSA", SFX_POLICE_RADIO_TORRINGTON);
|
SETZONESFX(3, "BEACH1", SFX_POLICE_RADIO_OCEAN_BEACH);
|
||||||
SETZONESFX(4, "SHOPING", SFX_POLICE_RADIO_BEDFORD_POINT);
|
SETZONESFX(4, "BEACH2", SFX_POLICE_RADIO_WASHINGTON_BEACH);
|
||||||
SETZONESFX(5, "COM_EAS", SFX_POLICE_RADIO_NEWPORT);
|
SETZONESFX(5, "BEACH3", SFX_POLICE_RADIO_VICE_POINT);
|
||||||
SETZONESFX(6, "PARK", SFX_POLICE_RADIO_BELLEVILLE_PARK);
|
SETZONESFX(6, "GOLFC", SFX_POLICE_RADIO_LEAF_LINKS);
|
||||||
SETZONESFX(7, "UNIVERS", SFX_POLICE_RADIO_LIBERTY_CAMPUS);
|
SETZONESFX(7, "STARI", SFX_POLICE_RADIO_STRAFISH_ISLAND);
|
||||||
SETZONESFX(8, "BIG_DAM", SFX_POLICE_RADIO_COCHRANE_DAM);
|
SETZONESFX(8, "DOCKS", SFX_POLICE_RADIO_VICE_PORT);
|
||||||
SETZONESFX(9, "SUB_IND", SFX_POLICE_RADIO_PIKE_CREEK);
|
SETZONESFX(9, "HAVANA", SFX_POLICE_RADIO_LITTLE_HAVANA);
|
||||||
SETZONESFX(10, "SWANKS", SFX_POLICE_RADIO_CEDAR_GROVE);
|
SETZONESFX(10, "HAITI", SFX_POLICE_RADIO_LITTLE_HAITI);
|
||||||
SETZONESFX(11, "PROJECT", SFX_POLICE_RADIO_WICHITA_GARDENS);
|
SETZONESFX(11, "PORNI", SFX_POLICE_RADIO_PRAWN_ISLAND);
|
||||||
SETZONESFX(12, "AIRPORT", SFX_POLICE_RADIO_FRANCIS_INTERNATIONAL_AIRPORT);
|
SETZONESFX(12, "DTOWN", SFX_POLICE_RADIO_DOWNTOWN);
|
||||||
SETZONESFX(13, "PORT_W", SFX_POLICE_RADIO_CALLAHAN_POINT);
|
SETZONESFX(13, "A_PORT", SFX_POLICE_RADIO_ESCOBAR_INTERNATIONAL);
|
||||||
SETZONESFX(14, "PORT_S", SFX_POLICE_RADIO_ATLANTIC_QUAYS);
|
|
||||||
SETZONESFX(15, "PORT_E", SFX_POLICE_RADIO_PORTLAND_HARBOUR);
|
|
||||||
SETZONESFX(16, "PORT_I", SFX_POLICE_RADIO_TRENTON);
|
|
||||||
SETZONESFX(17, "CHINA", SFX_POLICE_RADIO_CHINATOWN);
|
|
||||||
SETZONESFX(18, "REDLIGH", SFX_POLICE_RADIO_RED_LIGHT_DISTRICT);
|
|
||||||
SETZONESFX(19, "TOWERS", SFX_POLICE_RADIO_HEPBURN_HEIGHTS);
|
|
||||||
SETZONESFX(20, "LITTLEI", SFX_POLICE_RADIO_SAINT_MARKS);
|
|
||||||
SETZONESFX(21, "HARWOOD", SFX_POLICE_RADIO_HARWOOD);
|
|
||||||
SETZONESFX(22, "EASTBAY", SFX_POLICE_RADIO_PORTLAND_BEACH);
|
|
||||||
SETZONESFX(23, "S_VIEW", SFX_POLICE_RADIO_PORTLAND_STRAIGHTS);
|
|
||||||
SETZONESFX(24, "CITYZON", SFX_POLICE_RADIO_LIBERTY_CITY);
|
|
||||||
SETZONESFX(25, "IND_ZON", SFX_POLICE_RADIO_PORTLAND);
|
|
||||||
SETZONESFX(26, "COM_ZON", SFX_POLICE_RADIO_STAUNTON_ISLAND);
|
|
||||||
SETZONESFX(27, "SUB_ZON", SFX_POLICE_RADIO_SHORESIDE_VALE);
|
|
||||||
SETZONESFX(28, "SUB_ZO2", SFX_POLICE_RADIO_SHORESIDE_VALE);
|
|
||||||
SETZONESFX(29, "SUB_ZO3", SFX_POLICE_RADIO_SHORESIDE_VALE);
|
|
||||||
SETZONESFX(30, "A", SFX_POLICE_RADIO_ROCKFORD);
|
|
||||||
SETZONESFX(31, "A", SFX_POLICE_RADIO_ROCKFORD);
|
|
||||||
SETZONESFX(32, "A", SFX_POLICE_RADIO_ROCKFORD);
|
|
||||||
SETZONESFX(33, "A", SFX_POLICE_RADIO_ROCKFORD);
|
|
||||||
SETZONESFX(34, "A", SFX_POLICE_RADIO_ROCKFORD);
|
|
||||||
|
|
||||||
#undef SETZONESFX
|
#undef SETZONESFX
|
||||||
|
|
||||||
strcpy(SubZo2Label, "SUB_ZO2");
|
|
||||||
strcpy(SubZo3Label, "SUB_ZO3");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -160,14 +135,17 @@ cAudioManager::ServicePoliceRadio()
|
|||||||
if(CReplay::IsPlayingBack() || !FindPlayerPed() || !FindPlayerPed()->m_pWanted)
|
if(CReplay::IsPlayingBack() || !FindPlayerPed() || !FindPlayerPed()->m_pWanted)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
wantedLevel = FindPlayerPed()->m_pWanted->m_nWantedLevel;
|
CPlayerPed *playerPed = FindPlayerPed();
|
||||||
if(!crimeReport) {
|
if (playerPed) {
|
||||||
if(wantedLevel != 0) {
|
wantedLevel = playerPed->m_pWanted->GetWantedLevel();
|
||||||
if(nLastSeen != 0) {
|
if (!crimeReport) {
|
||||||
--nLastSeen;
|
if (wantedLevel != 0) {
|
||||||
} else {
|
if (nLastSeen != 0)
|
||||||
nLastSeen = m_anRandomTable[1] % 1000 + 2000;
|
--nLastSeen;
|
||||||
SetupSuspectLastSeenReport();
|
else {
|
||||||
|
nLastSeen = m_anRandomTable[1] % 1000 + 2000;
|
||||||
|
SetupSuspectLastSeenReport();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -185,18 +163,18 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
|
|||||||
static int cWait = 0;
|
static int cWait = 0;
|
||||||
static bool bChannelOpen = false;
|
static bool bChannelOpen = false;
|
||||||
static uint8 bMissionAudioPhysicalPlayingStatus = 0;
|
static uint8 bMissionAudioPhysicalPlayingStatus = 0;
|
||||||
static int32 PoliceChannelFreq = 5500;
|
static int32 PoliceChannelFreq = 22050;
|
||||||
|
|
||||||
if (!m_bIsInitialised) return;
|
if (!m_bIsInitialised) return;
|
||||||
|
|
||||||
if (m_nUserPause != 0) {
|
if (m_nUserPause != 0) {
|
||||||
if (SampleManager.GetChannelUsedFlag(policeChannel)) SampleManager.StopChannel(policeChannel);
|
if (SampleManager.GetChannelUsedFlag(policeChannel)) SampleManager.StopChannel(policeChannel);
|
||||||
if (g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && bMissionAudioPhysicalPlayingStatus == 1 &&
|
if (g_nMissionAudioSfx != NO_SAMPLE && bMissionAudioPhysicalPlayingStatus == 1 &&
|
||||||
SampleManager.IsStreamPlaying(1)) {
|
SampleManager.IsStreamPlaying(1)) {
|
||||||
SampleManager.PauseStream(1, 1);
|
SampleManager.PauseStream(1, 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (m_nPreviousUserPause && g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES &&
|
if (m_nPreviousUserPause && g_nMissionAudioSfx != NO_SAMPLE &&
|
||||||
bMissionAudioPhysicalPlayingStatus == 1) {
|
bMissionAudioPhysicalPlayingStatus == 1) {
|
||||||
SampleManager.PauseStream(0, 1);
|
SampleManager.PauseStream(0, 1);
|
||||||
}
|
}
|
||||||
@@ -205,7 +183,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
|
|||||||
--cWait;
|
--cWait;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && !bChannelOpen) {
|
if (g_nMissionAudioSfx != NO_SAMPLE && !bChannelOpen) {
|
||||||
if (g_nMissionAudioPlayingStatus) {
|
if (g_nMissionAudioPlayingStatus) {
|
||||||
if (g_nMissionAudioPlayingStatus == 1 && !bMissionAudioPhysicalPlayingStatus &&
|
if (g_nMissionAudioPlayingStatus == 1 && !bMissionAudioPhysicalPlayingStatus &&
|
||||||
SampleManager.IsStreamPlaying(1)) {
|
SampleManager.IsStreamPlaying(1)) {
|
||||||
@@ -217,7 +195,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
|
|||||||
} else {
|
} else {
|
||||||
bMissionAudioPhysicalPlayingStatus = 2;
|
bMissionAudioPhysicalPlayingStatus = 2;
|
||||||
g_nMissionAudioPlayingStatus = 2;
|
g_nMissionAudioPlayingStatus = 2;
|
||||||
g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES;
|
g_nMissionAudioSfx = NO_SAMPLE;
|
||||||
cWait = 30;
|
cWait = 30;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -232,31 +210,29 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bChannelOpen) DoPoliceRadioCrackle();
|
if (bChannelOpen) DoPoliceRadioCrackle();
|
||||||
if ((g_nMissionAudioSfx == TOTAL_AUDIO_SAMPLES || g_nMissionAudioPlayingStatus != 1) &&
|
if ((g_nMissionAudioSfx == NO_SAMPLE || g_nMissionAudioPlayingStatus != 1) &&
|
||||||
!SampleManager.GetChannelUsedFlag(policeChannel) && m_sPoliceRadioQueue.policeChannelTimer) {
|
!SampleManager.GetChannelUsedFlag(policeChannel) && m_sPoliceRadioQueue.policeChannelTimer) {
|
||||||
if (m_sPoliceRadioQueue.policeChannelTimer) {
|
if (m_sPoliceRadioQueue.policeChannelTimer) {
|
||||||
sample = m_sPoliceRadioQueue.crimesSamples[m_sPoliceRadioQueue.policeChannelCounterSeconds];
|
sample = m_sPoliceRadioQueue.crimesSamples[m_sPoliceRadioQueue.policeChannelCounterSeconds];
|
||||||
m_sPoliceRadioQueue.policeChannelTimer--;
|
m_sPoliceRadioQueue.policeChannelTimer--;
|
||||||
m_sPoliceRadioQueue.policeChannelCounterSeconds = (m_sPoliceRadioQueue.policeChannelCounterSeconds + 1) % 60;
|
m_sPoliceRadioQueue.policeChannelCounterSeconds = (m_sPoliceRadioQueue.policeChannelCounterSeconds + 1) % 60;
|
||||||
} else {
|
} else {
|
||||||
sample = TOTAL_AUDIO_SAMPLES;
|
sample = NO_SAMPLE;
|
||||||
}
|
}
|
||||||
if (wantedLevel == 0) {
|
if (wantedLevel == 0) {
|
||||||
if (gSpecialSuspectLastSeenReport) {
|
if (gSpecialSuspectLastSeenReport) {
|
||||||
gSpecialSuspectLastSeenReport = 0;
|
gSpecialSuspectLastSeenReport = 0;
|
||||||
} else if (((sample >= SFX_POLICE_RADIO_MESSAGE_NOISE_1) && (sample <= SFX_POLICE_RADIO_MESSAGE_NOISE_3)) || sample == TOTAL_AUDIO_SAMPLES) {
|
} else if (sample == SFX_POLICE_RADIO_MESSAGE_NOISE_1) {
|
||||||
bChannelOpen = false;
|
bChannelOpen = false;
|
||||||
processed = true;
|
processed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sample == TOTAL_AUDIO_SAMPLES) {
|
if (sample == NO_SAMPLE) {
|
||||||
if (!processed) cWait = 30;
|
if (!processed) cWait = 30;
|
||||||
} else {
|
} else {
|
||||||
SampleManager.InitialiseChannel(policeChannel, sample, 0);
|
SampleManager.InitialiseChannel(policeChannel, sample, 0);
|
||||||
switch (sample) {
|
switch (sample) {
|
||||||
case SFX_POLICE_RADIO_MESSAGE_NOISE_1:
|
case SFX_POLICE_RADIO_MESSAGE_NOISE_1:
|
||||||
case SFX_POLICE_RADIO_MESSAGE_NOISE_2:
|
|
||||||
case SFX_POLICE_RADIO_MESSAGE_NOISE_3:
|
|
||||||
freq = m_anRandomTable[4] % 2000 + 10025;
|
freq = m_anRandomTable[4] % 2000 + 10025;
|
||||||
bChannelOpen = bChannelOpen == false;
|
bChannelOpen = bChannelOpen == false;
|
||||||
break;
|
break;
|
||||||
@@ -309,49 +285,54 @@ cAudioManager::SetupCrimeReport()
|
|||||||
for (int j = 0; j < NUMAUDIOZONES; j++) {
|
for (int j = 0; j < NUMAUDIOZONES; j++) {
|
||||||
if (strcmp(zone->name, ZoneSfx[j].m_aName) == 0) {
|
if (strcmp(zone->name, ZoneSfx[j].m_aName) == 0) {
|
||||||
sampleIndex = ZoneSfx[j].m_nSampleIndex;
|
sampleIndex = ZoneSfx[j].m_nSampleIndex;
|
||||||
m_sPoliceRadioQueue.Add(m_anRandomTable[4] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_WEVE_GOT);
|
m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_WEVE_GOT);
|
||||||
m_sPoliceRadioQueue.Add(m_anRandomTable[1] % 2 + SFX_A_10_1);
|
m_sPoliceRadioQueue.Add(SFX_A_10);
|
||||||
switch (m_sPoliceRadioQueue.crimes[i].type) {
|
switch (m_sPoliceRadioQueue.crimes[i].type) {
|
||||||
case CRIME_PED_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_PED; break;
|
case CRIME_PED_BURNED:
|
||||||
case CRIME_COP_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_COP; break;
|
case CRIME_HIT_PED_NASTYWEAPON:
|
||||||
|
m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_PED;
|
||||||
|
break;
|
||||||
|
case CRIME_COP_BURNED:
|
||||||
|
case CRIME_HIT_COP_NASTYWEAPON:
|
||||||
|
m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_COP;
|
||||||
|
break;
|
||||||
case CRIME_VEHICLE_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_STEAL_CAR; break;
|
case CRIME_VEHICLE_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_STEAL_CAR; break;
|
||||||
case CRIME_DESTROYED_CESSNA: m_sPoliceRadioQueue.crimes[i].type = CRIME_SHOOT_HELI; break;
|
case CRIME_DESTROYED_CESSNA: m_sPoliceRadioQueue.crimes[i].type = CRIME_SHOOT_HELI; break;
|
||||||
|
case CRIME_EXPLOSION: m_sPoliceRadioQueue.crimes[i].type = CRIME_STEAL_CAR; break; // huh?
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
#ifdef FIX_BUGS
|
||||||
m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_CRIME_1 - 1);
|
m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_CRIME_1 - 1);
|
||||||
|
#else
|
||||||
|
m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_CRIME_1);
|
||||||
|
#endif
|
||||||
m_sPoliceRadioQueue.Add(SFX_IN);
|
m_sPoliceRadioQueue.Add(SFX_IN);
|
||||||
if (sampleIndex == SFX_POLICE_RADIO_SHORESIDE_VALE &&
|
rangeX = zone->maxx - zone->minx;
|
||||||
(strcmp(zone->name, SubZo2Label) == 0 || strcmp(zone->name, SubZo3Label) == 0)) {
|
rangeY = zone->maxy - zone->miny;
|
||||||
|
halfX = 0.5f * rangeX + zone->minx;
|
||||||
|
halfY = 0.5f * rangeY + zone->miny;
|
||||||
|
quarterX = 0.25f * rangeX;
|
||||||
|
quarterY = 0.25f * rangeY;
|
||||||
|
|
||||||
|
if (m_sPoliceRadioQueue.crimes[i].position.y > halfY + quarterY) {
|
||||||
m_sPoliceRadioQueue.Add(SFX_NORTH);
|
m_sPoliceRadioQueue.Add(SFX_NORTH);
|
||||||
m_sPoliceRadioQueue.Add(SFX_EAST);
|
processed = true;
|
||||||
} else {
|
} else if (m_sPoliceRadioQueue.crimes[i].position.y < halfY - quarterY) {
|
||||||
rangeX = zone->maxx - zone->minx;
|
m_sPoliceRadioQueue.Add(SFX_SOUTH);
|
||||||
rangeY = zone->maxy - zone->miny;
|
processed = true;
|
||||||
halfX = 0.5f * rangeX + zone->minx;
|
|
||||||
halfY = 0.5f * rangeY + zone->miny;
|
|
||||||
quarterX = 0.25f * rangeX;
|
|
||||||
quarterY = 0.25f * rangeY;
|
|
||||||
|
|
||||||
if (m_sPoliceRadioQueue.crimes[i].position.y > halfY + quarterY) {
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_NORTH);
|
|
||||||
processed = true;
|
|
||||||
} else if (m_sPoliceRadioQueue.crimes[i].position.y < halfY - quarterY) {
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_SOUTH);
|
|
||||||
processed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_sPoliceRadioQueue.crimes[i].position.x > halfX + quarterX)
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_EAST);
|
|
||||||
else if (m_sPoliceRadioQueue.crimes[i].position.x < halfX - quarterX)
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_WEST);
|
|
||||||
else if (!processed)
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_CENTRAL);
|
|
||||||
|
|
||||||
m_sPoliceRadioQueue.Add(sampleIndex);
|
|
||||||
m_sPoliceRadioQueue.Add(m_anRandomTable[2] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
|
||||||
m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_sPoliceRadioQueue.crimes[i].position.x > halfX + quarterX)
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_EAST);
|
||||||
|
else if (m_sPoliceRadioQueue.crimes[i].position.x < halfX - quarterX)
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_WEST);
|
||||||
|
else if (!processed)
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_CENTRAL);
|
||||||
|
|
||||||
|
m_sPoliceRadioQueue.Add(sampleIndex);
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
|
m_sPoliceRadioQueue.Add(NO_SAMPLE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -373,161 +354,105 @@ cAudioManager::SetupSuspectLastSeenReport()
|
|||||||
int32 color_post_modifier;
|
int32 color_post_modifier;
|
||||||
|
|
||||||
const int32 gCarColourTable[][3] = {
|
const int32 gCarColourTable[][3] = {
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLACK, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_BLACK, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_WHITE, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_WHITE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_BRIGHT, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_BRIGHT, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, SFX_POLICE_RADIO_GREY},
|
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, SFX_POLICE_RADIO_GREY},
|
||||||
#ifdef FIX_BUGS
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||||
#else
|
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||||
#endif
|
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||||
#ifdef FIX_BUGS
|
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
#else
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||||
#endif
|
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
#ifdef FIX_BUGS
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||||
#else
|
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
#endif
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||||
#ifdef FIX_BUGS
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||||
#else
|
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||||
#endif
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||||
#ifdef FIX_BUGS
|
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
#else
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
#endif
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
#ifdef FIX_BUGS
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||||
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_PURPLE, SFX_POLICE_RADIO_BLUE},
|
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
|
||||||
#else
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
#endif
|
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
|
||||||
#ifdef FIX_BUGS
|
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, SFX_POLICE_RADIO_GREY},
|
|
||||||
#else
|
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
|
||||||
#endif
|
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
|
||||||
#ifdef FIX_BUGS
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
|
||||||
#else
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
#endif
|
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
|
||||||
#ifdef FIX_BUGS
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
|
||||||
#else
|
|
||||||
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
|
||||||
#endif
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
|
||||||
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) {
|
if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) {
|
||||||
veh = FindPlayerVehicle();
|
veh = FindVehicleOfPlayer();
|
||||||
if (veh != nil) {
|
if (veh != nil) {
|
||||||
if (60 - m_sPoliceRadioQueue.policeChannelTimer > 9) {
|
if (60 - m_sPoliceRadioQueue.policeChannelTimer > 9) {
|
||||||
color1 = veh->m_currentColour1;
|
color1 = veh->m_currentColour1;
|
||||||
@@ -538,158 +463,207 @@ cAudioManager::SetupSuspectLastSeenReport()
|
|||||||
color_pre_modifier = gCarColourTable[color1][0];
|
color_pre_modifier = gCarColourTable[color1][0];
|
||||||
color_post_modifier = gCarColourTable[color1][2];
|
color_post_modifier = gCarColourTable[color1][2];
|
||||||
switch (veh->GetModelIndex()) {
|
switch (veh->GetModelIndex()) {
|
||||||
#ifdef FIX_BUGS
|
|
||||||
case MI_COLUMB:
|
|
||||||
main_color = SFX_POLICE_RADIO_BLUE;
|
|
||||||
color_pre_modifier = color_post_modifier = TOTAL_AUDIO_SAMPLES;
|
|
||||||
#endif
|
|
||||||
case MI_LANDSTAL:
|
case MI_LANDSTAL:
|
||||||
case MI_BLISTA: sample = SFX_POLICE_RADIO_CRUISER; break;
|
case MI_PATRIOT:
|
||||||
#ifdef FIX_BUGS
|
case MI_RANCHER:
|
||||||
case MI_YARDIE:
|
case MI_FBIRANCH:
|
||||||
color_pre_modifier = TOTAL_AUDIO_SAMPLES;
|
case MI_SANDKING:
|
||||||
main_color = SFX_POLICE_RADIO_RED;
|
sample = SFX_POLICE_RADIO_OFFROAD;
|
||||||
color_post_modifier = SFX_POLICE_RADIO_YELLOW;
|
break;
|
||||||
sample = SFX_POLICE_RADIO_CONVERTIBLE; break;
|
|
||||||
case MI_DIABLOS:
|
|
||||||
main_color = SFX_POLICE_RADIO_BLACK;
|
|
||||||
#endif
|
|
||||||
case MI_IDAHO:
|
case MI_IDAHO:
|
||||||
case MI_STALLION: sample = SFX_POLICE_RADIO_CONVERTIBLE; break;
|
case MI_MANANA:
|
||||||
#ifdef FIX_BUGS
|
case MI_ESPERANT:
|
||||||
case MI_YAKUZA:
|
case MI_CUBAN:
|
||||||
color_pre_modifier = TOTAL_AUDIO_SAMPLES;
|
case MI_STALLION:
|
||||||
main_color = SFX_POLICE_RADIO_SILVER;
|
case MI_SABRE:
|
||||||
color_post_modifier = SFX_POLICE_RADIO_RED;
|
case MI_SABRETUR:
|
||||||
#endif
|
case MI_VIRGO:
|
||||||
|
case MI_BLISTAC:
|
||||||
|
sample = SFX_POLICE_RADIO_2_DOOR;
|
||||||
|
break;
|
||||||
case MI_STINGER:
|
case MI_STINGER:
|
||||||
case MI_INFERNUS:
|
case MI_INFERNUS:
|
||||||
case MI_CHEETAH:
|
case MI_CHEETAH:
|
||||||
case MI_BANSHEE: sample = SFX_POLICE_RADIO_SPORTS_CAR; break;
|
case MI_BANSHEE:
|
||||||
#ifdef FIX_BUGS
|
case MI_PHEONIX:
|
||||||
case MI_MAFIA:
|
case MI_COMET:
|
||||||
color_pre_modifier = color_post_modifier = TOTAL_AUDIO_SAMPLES;
|
case MI_DELUXO:
|
||||||
main_color = SFX_POLICE_RADIO_GREY;
|
case MI_HOTRING:
|
||||||
case MI_KURUMA:
|
sample = SFX_POLICE_RADIO_SPORTS_CAR;
|
||||||
#endif
|
break;
|
||||||
case MI_PEREN:
|
|
||||||
case MI_SENTINEL:
|
|
||||||
case MI_FBICAR: sample = SFX_POLICE_RADIO_SALOON; break;
|
|
||||||
case MI_PATRIOT:
|
|
||||||
case MI_BOBCAT: sample = SFX_POLICE_RADIO_PICKUP; break;
|
|
||||||
case MI_FIRETRUCK: sample = SFX_POLICE_RADIO_FIRE_TRUCK; break;
|
|
||||||
#ifdef FIX_BUGS
|
|
||||||
case MI_LINERUN:
|
case MI_LINERUN:
|
||||||
case MI_FLATBED:
|
sample = SFX_POLICE_RADIO_RIG;
|
||||||
#endif
|
break;
|
||||||
|
case MI_PEREN:
|
||||||
|
case MI_REGINA:
|
||||||
|
sample = SFX_POLICE_RADIO_STATION_WAGON;
|
||||||
|
break;
|
||||||
|
case MI_SENTINEL:
|
||||||
|
case MI_FBICAR:
|
||||||
|
case MI_WASHING:
|
||||||
|
case MI_SENTXS:
|
||||||
|
case MI_ADMIRAL:
|
||||||
|
case MI_GLENDALE:
|
||||||
|
case MI_OCEANIC:
|
||||||
|
case MI_HERMES:
|
||||||
|
case MI_GREENWOO:
|
||||||
|
sample = SFX_POLICE_RADIO_SEDAN;
|
||||||
|
break;
|
||||||
|
case MI_RIO:
|
||||||
|
sample = SFX_POLICE_RADIO_CRUISER;
|
||||||
|
break;
|
||||||
|
case MI_FIRETRUCK:
|
||||||
|
sample = SFX_POLICE_RADIO_FIRE_TRUCK;
|
||||||
|
break;
|
||||||
case MI_TRASH:
|
case MI_TRASH:
|
||||||
case MI_BARRACKS: sample = SFX_POLICE_RADIO_TRUCK; break;
|
sample = SFX_POLICE_RADIO_GARBAGE_TRUCK;
|
||||||
case MI_STRETCH: sample = SFX_POLICE_RADIO_LIMO; break;
|
break;
|
||||||
#ifdef FIX_BUGS
|
case MI_STRETCH:
|
||||||
case MI_CORPSE:
|
case MI_LOVEFIST:
|
||||||
#endif
|
sample = SFX_POLICE_RADIO_STRETCH;
|
||||||
case MI_MANANA:
|
break;
|
||||||
case MI_ESPERANT: sample = SFX_POLICE_RADIO_2_DOOR; break;
|
case MI_VOODOO:
|
||||||
#ifdef FIX_BUGS
|
sample = SFX_POLICE_RADIO_LOWRIDER;
|
||||||
case MI_HOODS:
|
break;
|
||||||
color_pre_modifier = TOTAL_AUDIO_SAMPLES;
|
|
||||||
main_color = SFX_POLICE_RADIO_BLUE;
|
|
||||||
color_post_modifier = SFX_POLICE_RADIO_GREEN;
|
|
||||||
case MI_BELLYUP:
|
|
||||||
case MI_YANKEE:
|
|
||||||
case MI_TOYZ:
|
|
||||||
case MI_MRWONGS:
|
|
||||||
case MI_PANLANT:
|
|
||||||
#endif
|
|
||||||
case MI_PONY:
|
case MI_PONY:
|
||||||
case MI_MULE:
|
|
||||||
case MI_MOONBEAM:
|
case MI_MOONBEAM:
|
||||||
case MI_ENFORCER:
|
|
||||||
case MI_SECURICA:
|
case MI_SECURICA:
|
||||||
case MI_RUMPO: sample = SFX_POLICE_RADIO_VAN; break;
|
case MI_RUMPO:
|
||||||
case MI_AMBULAN: sample = SFX_POLICE_RADIO_AMBULANCE; break;
|
case MI_GANGBUR:
|
||||||
|
case MI_YANKEE:
|
||||||
|
case MI_TOPFUN:
|
||||||
|
case MI_BURRITO:
|
||||||
|
case MI_SPAND:
|
||||||
|
sample = SFX_POLICE_RADIO_VAN;
|
||||||
|
break;
|
||||||
|
case MI_MULE:
|
||||||
|
case MI_BARRACKS:
|
||||||
|
case MI_PACKER:
|
||||||
|
case MI_FLATBED:
|
||||||
|
sample = SFX_POLICE_RADIO_TRUCK;
|
||||||
|
break;
|
||||||
|
case MI_AMBULAN:
|
||||||
|
sample = SFX_POLICE_RADIO_AMBULANCE;
|
||||||
|
break;
|
||||||
case MI_TAXI:
|
case MI_TAXI:
|
||||||
case MI_CABBIE:
|
case MI_CABBIE:
|
||||||
case MI_BORGNINE: sample = SFX_POLICE_RADIO_TAXI; break;
|
case MI_BORGNINE:
|
||||||
|
sample = SFX_POLICE_RADIO_TAXI;
|
||||||
|
break;
|
||||||
|
case MI_BOBCAT:
|
||||||
|
case MI_WALTON:
|
||||||
|
sample = SFX_POLICE_RADIO_PICKUP;
|
||||||
|
break;
|
||||||
case MI_MRWHOOP:
|
case MI_MRWHOOP:
|
||||||
sample = SFX_POLICE_RADIO_ICE_CREAM_VAN;
|
sample = SFX_POLICE_RADIO_ICE_CREAM_VAN;
|
||||||
break;
|
break;
|
||||||
case MI_BFINJECT: sample = SFX_POLICE_RADIO_BUGGY; break;
|
case MI_BFINJECT:
|
||||||
case MI_POLICE: sample = SFX_POLICE_RADIO_POLICE_CAR; break;
|
sample = SFX_POLICE_RADIO_BUGGY;
|
||||||
#ifdef FIX_BUGS
|
break;
|
||||||
|
case MI_HUNTER:
|
||||||
|
case MI_CHOPPER:
|
||||||
|
case MI_SEASPAR:
|
||||||
|
case MI_SPARROW:
|
||||||
|
case MI_MAVERICK:
|
||||||
|
case MI_VCNMAV:
|
||||||
|
case MI_POLMAV:
|
||||||
|
sample = SFX_POLICE_RADIO_HELICOPTER;
|
||||||
|
break;
|
||||||
|
case MI_POLICE:
|
||||||
|
sample = SFX_POLICE_RADIO_POLICE_CAR;
|
||||||
|
break;
|
||||||
|
case MI_ENFORCER:
|
||||||
|
sample = SFX_POLICE_RADIO_SWAT_VAN;
|
||||||
|
break;
|
||||||
|
case MI_PREDATOR:
|
||||||
|
case MI_SQUALO:
|
||||||
case MI_SPEEDER:
|
case MI_SPEEDER:
|
||||||
case MI_REEFER:
|
sample = SFX_POLICE_RADIO_SPEEDBOAT;
|
||||||
case MI_GHOST:
|
break;
|
||||||
#endif
|
|
||||||
case MI_PREDATOR: sample = SFX_POLICE_RADIO_BOAT; break;
|
|
||||||
case MI_BUS:
|
case MI_BUS:
|
||||||
case MI_COACH: sample = SFX_POLICE_RADIO_BUS; break;
|
sample = SFX_POLICE_RADIO_BUS;
|
||||||
|
break;
|
||||||
case MI_RHINO:
|
case MI_RHINO:
|
||||||
sample = SFX_POLICE_RADIO_TANK;
|
sample = SFX_POLICE_RADIO_TANK;
|
||||||
main_color = TOTAL_AUDIO_SAMPLES;
|
|
||||||
color_post_modifier = TOTAL_AUDIO_SAMPLES;
|
|
||||||
break;
|
break;
|
||||||
case MI_TRAIN:
|
case MI_ANGEL:
|
||||||
sample = SFX_POLICE_RADIO_SUBWAY_CAR;
|
case MI_PCJ600:
|
||||||
main_color = TOTAL_AUDIO_SAMPLES;
|
case MI_FREEWAY:
|
||||||
color_post_modifier = TOTAL_AUDIO_SAMPLES;
|
case MI_SANCHEZ:
|
||||||
|
sample = SFX_POLICE_RADIO_MOTOBIKE;
|
||||||
|
break;
|
||||||
|
case MI_COACH:
|
||||||
|
sample = SFX_POLICE_RADIO_COACH;
|
||||||
|
break;
|
||||||
|
case MI_ROMERO:
|
||||||
|
sample = SFX_POLICE_RADIO_HEARSE;
|
||||||
|
break;
|
||||||
|
case MI_PIZZABOY:
|
||||||
|
case MI_FAGGIO:
|
||||||
|
sample = SFX_POLICE_RADIO_MOPED;
|
||||||
|
break;
|
||||||
|
case MI_DEADDODO:
|
||||||
|
case MI_SKIMMER:
|
||||||
|
sample = SFX_POLICE_RADIO_PLANE;
|
||||||
|
break;
|
||||||
|
case MI_REEFER:
|
||||||
|
case MI_TROPIC:
|
||||||
|
case MI_COASTG:
|
||||||
|
case MI_MARQUIS:
|
||||||
|
case MI_JETMAX:
|
||||||
|
sample = SFX_POLICE_RADIO_BOAT;
|
||||||
|
break;
|
||||||
|
case MI_CADDY:
|
||||||
|
sample = SFX_POLICE_RADIO_GOLF_CART;
|
||||||
|
break;
|
||||||
|
case MI_DINGHY:
|
||||||
|
sample = SFX_POLICE_RADIO_DINGHY;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
debug("\n *** UNKNOWN CAR MODEL INDEX %d *** ", veh->GetModelIndex());
|
//debug("\n *** UNKNOWN CAR MODEL INDEX %d *** ", veh->GetModelIndex());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_sPoliceRadioQueue.Add(m_anRandomTable[4] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
|
||||||
if (m_anRandomTable[3] % 2)
|
if (m_anRandomTable[3] % 2)
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_LAST_SEEN);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_LAST_SEEN);
|
||||||
#ifdef FIX_BUGS
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_IN_A);
|
||||||
if (main_color == SFX_POLICE_RADIO_ORANGE && color_pre_modifier == TOTAL_AUDIO_SAMPLES)
|
if (color_pre_modifier != NO_SAMPLE)
|
||||||
#else
|
|
||||||
if (main_color == SFX_POLICE_RADIO_ORANGE)
|
|
||||||
#endif
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_IN_AN);
|
|
||||||
else
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_IN_A);
|
|
||||||
if (color_pre_modifier != TOTAL_AUDIO_SAMPLES)
|
|
||||||
m_sPoliceRadioQueue.Add(color_pre_modifier);
|
m_sPoliceRadioQueue.Add(color_pre_modifier);
|
||||||
if (main_color != TOTAL_AUDIO_SAMPLES)
|
if (main_color != NO_SAMPLE)
|
||||||
m_sPoliceRadioQueue.Add(main_color);
|
m_sPoliceRadioQueue.Add(main_color);
|
||||||
if (color_post_modifier != TOTAL_AUDIO_SAMPLES)
|
if (color_post_modifier != NO_SAMPLE)
|
||||||
m_sPoliceRadioQueue.Add(color_post_modifier);
|
m_sPoliceRadioQueue.Add(color_post_modifier);
|
||||||
m_sPoliceRadioQueue.Add(sample);
|
m_sPoliceRadioQueue.Add(sample);
|
||||||
m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
|
m_sPoliceRadioQueue.Add(NO_SAMPLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (60 - m_sPoliceRadioQueue.policeChannelTimer > 4) {
|
} else if (60 - m_sPoliceRadioQueue.policeChannelTimer > 4) {
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_ON_FOOT);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_ON_FOOT);
|
||||||
m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
|
m_sPoliceRadioQueue.Add(NO_SAMPLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cAudioManager::ReportCrime(eCrimeType type, const CVector &pos)
|
cAudioManager::ReportCrime(eCrimeType type, const CVector &pos)
|
||||||
{
|
{
|
||||||
int32 lastCrime = ARRAY_SIZE(m_sPoliceRadioQueue.crimes);
|
int32 lastCrime = ARRAY_SIZE(m_sPoliceRadioQueue.crimes);
|
||||||
if (m_bIsInitialised && MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 &&
|
if (m_bIsInitialised && MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && FindPlayerPed()->m_pWanted->GetWantedLevel() > 0 &&
|
||||||
(type > CRIME_NONE || type < NUM_CRIME_TYPES) && m_FrameCounter >= gMinTimeToNextReport[type]) {
|
(type > CRIME_NONE || type < NUM_CRIME_TYPES) && m_FrameCounter >= gMinTimeToNextReport[type]) {
|
||||||
for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
|
for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
|
||||||
if (m_sPoliceRadioQueue.crimes[i].type) {
|
if (m_sPoliceRadioQueue.crimes[i].type != CRIME_NONE) {
|
||||||
if (m_sPoliceRadioQueue.crimes[i].type == type) {
|
if (m_sPoliceRadioQueue.crimes[i].type == type) {
|
||||||
m_sPoliceRadioQueue.crimes[i].position = pos;
|
m_sPoliceRadioQueue.crimes[i].position = pos;
|
||||||
m_sPoliceRadioQueue.crimes[i].timer = 0;
|
m_sPoliceRadioQueue.crimes[i].timer = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else
|
||||||
lastCrime = i;
|
lastCrime = i;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastCrime < ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) {
|
if (lastCrime < ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) {
|
||||||
@@ -725,41 +699,34 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
|
|||||||
for (int i = 0; i < NUMAUDIOZONES; i++) {
|
for (int i = 0; i < NUMAUDIOZONES; i++) {
|
||||||
if (strcmp(zone->name, ZoneSfx[i].m_aName) == 0) {
|
if (strcmp(zone->name, ZoneSfx[i].m_aName) == 0) {
|
||||||
sample = ZoneSfx[i].m_nSampleIndex;
|
sample = ZoneSfx[i].m_nSampleIndex;
|
||||||
m_sPoliceRadioQueue.Add(m_anRandomTable[4] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_LAST_SEEN);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_LAST_SEEN);
|
||||||
m_sPoliceRadioQueue.Add(SFX_IN);
|
m_sPoliceRadioQueue.Add(SFX_IN);
|
||||||
if (sample == SFX_POLICE_RADIO_SHORESIDE_VALE &&
|
rangeX = zone->maxx - zone->minx;
|
||||||
(strcmp(zone->name, SubZo2Label) == 0 ||
|
rangeY = zone->maxy - zone->miny;
|
||||||
strcmp(zone->name, SubZo3Label) == 0)) {
|
halfX = 0.5f * rangeX + zone->minx;
|
||||||
|
halfY = 0.5f * rangeY + zone->miny;
|
||||||
|
quarterX = 0.25f * rangeX;
|
||||||
|
quarterY = 0.25f * rangeY;
|
||||||
|
|
||||||
|
if (vec.y > halfY + quarterY) {
|
||||||
m_sPoliceRadioQueue.Add(SFX_NORTH);
|
m_sPoliceRadioQueue.Add(SFX_NORTH);
|
||||||
m_sPoliceRadioQueue.Add(SFX_EAST);
|
processed = true;
|
||||||
} else {
|
} else if (vec.y < halfY - quarterY) {
|
||||||
rangeX = zone->maxx - zone->minx;
|
m_sPoliceRadioQueue.Add(SFX_SOUTH);
|
||||||
rangeY = zone->maxy - zone->miny;
|
processed = true;
|
||||||
halfX = 0.5f * rangeX + zone->minx;
|
|
||||||
halfY = 0.5f * rangeY + zone->miny;
|
|
||||||
quarterX = 0.25f * rangeX;
|
|
||||||
quarterY = 0.25f * rangeY;
|
|
||||||
|
|
||||||
if (vec.y > halfY + quarterY) {
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_NORTH);
|
|
||||||
processed = true;
|
|
||||||
} else if (vec.y < halfY - quarterY) {
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_SOUTH);
|
|
||||||
processed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vec.x > halfX + quarterX)
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_EAST);
|
|
||||||
else if (vec.x < halfX - quarterX)
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_WEST);
|
|
||||||
else if (!processed)
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_CENTRAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vec.x > halfX + quarterX)
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_EAST);
|
||||||
|
else if (vec.x < halfX - quarterX)
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_WEST);
|
||||||
|
else if (!processed)
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_CENTRAL);
|
||||||
m_sPoliceRadioQueue.Add(sample);
|
m_sPoliceRadioQueue.Add(sample);
|
||||||
m_sPoliceRadioQueue.Add(m_anRandomTable[2] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
|
m_sPoliceRadioQueue.Add(NO_SAMPLE);
|
||||||
gSpecialSuspectLastSeenReport = true;
|
gSpecialSuspectLastSeenReport = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -773,7 +740,7 @@ cAudioManager::AgeCrimes()
|
|||||||
{
|
{
|
||||||
for (uint8 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
|
for (uint8 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
|
||||||
if (m_sPoliceRadioQueue.crimes[i].type != CRIME_NONE) {
|
if (m_sPoliceRadioQueue.crimes[i].type != CRIME_NONE) {
|
||||||
if (++m_sPoliceRadioQueue.crimes[i].timer > 1500) m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE;
|
if (++m_sPoliceRadioQueue.crimes[i].timer > 1200) m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Wanted.h"
|
#include "Crime.h"
|
||||||
|
|
||||||
struct cAMCrime {
|
struct cAMCrime {
|
||||||
int32 type;
|
int32 type;
|
||||||
@@ -43,4 +43,4 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(cPoliceRadioQueue, 444);
|
VALIDATE_SIZE(cPoliceRadioQueue, 0x1BC);
|
||||||
|
|||||||
@@ -2,17 +2,19 @@
|
|||||||
|
|
||||||
enum eRadioStation
|
enum eRadioStation
|
||||||
{
|
{
|
||||||
HEAD_RADIO,
|
WILDSTYLE,
|
||||||
DOUBLE_CLEF,
|
FLASH_FM,
|
||||||
JAH_RADIO,
|
KCHAT,
|
||||||
RISE_FM,
|
FEVER,
|
||||||
LIPS_106,
|
V_ROCK,
|
||||||
GAME_FM,
|
VCPR,
|
||||||
MSX_FM,
|
RADIO_ESPANTOSO,
|
||||||
FLASHBACK,
|
EMOTION,
|
||||||
CHATTERBOX,
|
WAVE,
|
||||||
USERTRACK,
|
USERTRACK,
|
||||||
POLICE_RADIO,
|
NUM_RADIOS = 11,
|
||||||
|
POLICE_RADIO = 11,
|
||||||
|
//TAXI_RADIO,
|
||||||
RADIO_OFF,
|
RADIO_OFF,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -25,204 +27,83 @@ enum eMusicMode
|
|||||||
MUSICMODE_DISABLED,
|
MUSICMODE_DISABLED,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum ePlayerMood
|
||||||
|
{
|
||||||
|
PLAYER_MOOD_CALM = 0,
|
||||||
|
PLAYER_MOOD_PISSED_OFF,
|
||||||
|
PLAYER_MOOD_ANGRY,
|
||||||
|
PLAYER_MOOD_WISECRACKING,
|
||||||
|
MAX_PLAYER_MOODS,
|
||||||
|
};
|
||||||
|
|
||||||
enum eStreamedSounds
|
enum eStreamedSounds
|
||||||
{
|
{
|
||||||
STREAMED_SOUND_RADIO_HEAD,
|
STREAMED_SOUND_RADIO_HEAD,
|
||||||
STREAMED_SOUND_RADIO_CLASSIC,
|
STREAMED_SOUND_RADIO_DOUBLE,
|
||||||
STREAMED_SOUND_RADIO_KJAH,
|
STREAMED_SOUND_RADIO_KJAH,
|
||||||
STREAMED_SOUND_RADIO_RISE,
|
STREAMED_SOUND_RADIO_RISE,
|
||||||
STREAMED_SOUND_RADIO_LIPS,
|
STREAMED_SOUND_RADIO_LIPS,
|
||||||
STREAMED_SOUND_RADIO_GAME,
|
STREAMED_SOUND_RADIO_MUNDO,
|
||||||
STREAMED_SOUND_RADIO_MSX,
|
STREAMED_SOUND_RADIO_MSX,
|
||||||
STREAMED_SOUND_RADIO_FLASH,
|
STREAMED_SOUND_RADIO_FLASH,
|
||||||
STREAMED_SOUND_RADIO_CHAT,
|
STREAMED_SOUND_RADIO_LCJ,
|
||||||
|
STREAMED_SOUND_RADIO_LCFR,
|
||||||
STREAMED_SOUND_RADIO_MP3_PLAYER,
|
STREAMED_SOUND_RADIO_MP3_PLAYER,
|
||||||
STREAMED_SOUND_RADIO_POLICE,
|
|
||||||
STREAMED_SOUND_CITY_AMBIENT,
|
STREAMED_SOUND_CITY_AMBIENT,
|
||||||
STREAMED_SOUND_WATER_AMBIENT,
|
STREAMED_SOUND_WATER_AMBIENT,
|
||||||
STREAMED_SOUND_ANNOUNCE_COMMERCIAL_OPEN,
|
STREAMED_SOUND_SAWMILL,
|
||||||
STREAMED_SOUND_ANNOUNCE_SUBURBAN_OPEN,
|
STREAMED_SOUND_HAVANA_CITY_AMBIENT, // CITY
|
||||||
STREAMED_SOUND_NEWS_INTRO,
|
STREAMED_SOUND_HAVANA_WATER_AMBIENT, // WATER
|
||||||
STREAMED_SOUND_BANK_INTRO,
|
STREAMED_SOUND_HAVANA_BEACH_AMBIENT, // WATER
|
||||||
STREAMED_SOUND_CUTSCENE_LUIGI1_LG,
|
STREAMED_SOUND_MALL_AMBIENT, // CITY
|
||||||
STREAMED_SOUND_CUTSCENE_LUIGI2_DSB,
|
STREAMED_SOUND_STRIPCLUB_AMBIENT, // CITY
|
||||||
STREAMED_SOUND_CUTSCENE_LUIGI3_DM,
|
STREAMED_SOUND_MALIBU_AMBIENT, // CITY
|
||||||
STREAMED_SOUND_CUTSCENE_LUIGI4_PAP,
|
STREAMED_SOUND_HOTEL_AMBIENT, // CITY
|
||||||
STREAMED_SOUND_CUTSCENE_LUIGI5_TFB,
|
STREAMED_SOUND_DIRTRING_AMBIENT, // CITY
|
||||||
STREAMED_SOUND_CUTSCENE_JOEY0_DM2,
|
STREAMED_SOUND_LAW4RIOT_AMBIENT, // CITY
|
||||||
STREAMED_SOUND_CUTSCENE_JOEY1_LFL,
|
STREAMED_SOUND_AMBSIL_AMBIENT, // CITY
|
||||||
STREAMED_SOUND_CUTSCENE_JOEY2_KCL,
|
STREAMED_SOUND_RADIO_POLICE,
|
||||||
STREAMED_SOUND_CUTSCENE_JOEY3_VH,
|
STREAMED_SOUND_RADIO_TAXI,
|
||||||
STREAMED_SOUND_CUTSCENE_JOEY4_ETH,
|
STREAMED_SOUND_NEWS_A,
|
||||||
STREAMED_SOUND_CUTSCENE_JOEY5_DST,
|
STREAMED_SOUND_NEWS_B,
|
||||||
STREAMED_SOUND_CUTSCENE_JOEY6_TBJ,
|
STREAMED_SOUND_NEWS_C,
|
||||||
STREAMED_SOUND_CUTSCENE_TONI1_TOL,
|
STREAMED_SOUND_NEWS_D,
|
||||||
STREAMED_SOUND_CUTSCENE_TONI2_TPU,
|
STREAMED_SOUND_NEWS_E,
|
||||||
STREAMED_SOUND_CUTSCENE_TONI3_MAS,
|
STREAMED_SOUND_NEWS_F,
|
||||||
STREAMED_SOUND_CUTSCENE_TONI4_TAT,
|
STREAMED_SOUND_NEWS_G,
|
||||||
STREAMED_SOUND_CUTSCENE_TONI5_BF,
|
STREAMED_SOUND_NEWS_H,
|
||||||
STREAMED_SOUND_CUTSCENE_SAL0_MAS,
|
STREAMED_SOUND_NEWS_I,
|
||||||
STREAMED_SOUND_CUTSCENE_SAL1_PF,
|
STREAMED_SOUND_NEWS_J,
|
||||||
STREAMED_SOUND_CUTSCENE_SAL2_CTG,
|
STREAMED_SOUND_NEWS_K,
|
||||||
STREAMED_SOUND_CUTSCENE_SAL3_RTC,
|
STREAMED_SOUND_NEWS_L,
|
||||||
STREAMED_SOUND_CUTSCENE_SAL5_LRQ,
|
STREAMED_SOUND_NEWS_M,
|
||||||
STREAMED_SOUND_CUTSCENE_SAL4_BDBA,
|
STREAMED_SOUND_NEWS_N,
|
||||||
STREAMED_SOUND_CUTSCENE_SAL4_BDBB,
|
STREAMED_SOUND_CUTSCENE_BIKER,
|
||||||
STREAMED_SOUND_CUTSCENE_SAL2_CTG2,
|
STREAMED_SOUND_CUTSCENE_BONEVOY,
|
||||||
STREAMED_SOUND_CUTSCENE_SAL4_BDBD,
|
STREAMED_SOUND_CUTSCENE_CAMPAIN,
|
||||||
STREAMED_SOUND_CUTSCENE_SAL5_LRQB,
|
STREAMED_SOUND_CUTSCENE_CASHCHP,
|
||||||
STREAMED_SOUND_CUTSCENE_SAL5_LRQC,
|
STREAMED_SOUND_CUTSCENE_CONTBAN,
|
||||||
STREAMED_SOUND_CUTSCENE_ASUKA_1_SSO,
|
STREAMED_SOUND_CUTSCENE_CRAZY69,
|
||||||
STREAMED_SOUND_CUTSCENE_ASUKA_2_PP,
|
STREAMED_SOUND_CUTSCENE_CUTTEST,
|
||||||
STREAMED_SOUND_CUTSCENE_ASUKA_3_SS,
|
STREAMED_SOUND_CUTSCENE_DEADLY,
|
||||||
STREAMED_SOUND_CUTSCENE_ASUKA_4_PDR,
|
STREAMED_SOUND_CUTSCENE_DONPROB,
|
||||||
STREAMED_SOUND_CUTSCENE_ASUKA_5_K2FT,
|
STREAMED_SOUND_CUTSCENE_DRIVNMR,
|
||||||
STREAMED_SOUND_CUTSCENE_KENJI1_KBO,
|
STREAMED_SOUND_CUTSCENE_ELECTON,
|
||||||
STREAMED_SOUND_CUTSCENE_KENJI2_GIS,
|
STREAMED_SOUND_CUTSCENE_FINAL,
|
||||||
STREAMED_SOUND_CUTSCENE_KENJI3_DS,
|
STREAMED_SOUND_CUTSCENE_FINAL_2,
|
||||||
STREAMED_SOUND_CUTSCENE_KENJI4_SHI,
|
STREAMED_SOUND_CUTSCENE_HOMSWET,
|
||||||
STREAMED_SOUND_CUTSCENE_KENJI5_SD,
|
STREAMED_SOUND_CUTSCENE_HOTWHEL,
|
||||||
STREAMED_SOUND_CUTSCENE_RAY0_PDR2,
|
STREAMED_SOUND_CUTSCENE_KIDNAPP,
|
||||||
STREAMED_SOUND_CUTSCENE_RAY1_SW,
|
STREAMED_SOUND_CUTSCENE_LANDGRB,
|
||||||
STREAMED_SOUND_CUTSCENE_RAY2_AP,
|
STREAMED_SOUND_CUTSCENE_MORGUE,
|
||||||
STREAMED_SOUND_CUTSCENE_RAY3_ED,
|
STREAMED_SOUND_CUTSCENE_OVERDOS,
|
||||||
STREAMED_SOUND_CUTSCENE_RAY4_GF,
|
STREAMED_SOUND_CUTSCENE_RUFJUST,
|
||||||
STREAMED_SOUND_CUTSCENE_RAY5_PB,
|
STREAMED_SOUND_CUTSCENE_SAYONAR,
|
||||||
STREAMED_SOUND_CUTSCENE_RAY6_MM,
|
STREAMED_SOUND_CUTSCENE_SICILAN,
|
||||||
STREAMED_SOUND_CUTSCENE_DONALD1_STOG,
|
STREAMED_SOUND_CUTSCENE_THEOFER,
|
||||||
STREAMED_SOUND_CUTSCENE_DONALD2_KK,
|
STREAMED_SOUND_CUTSCENE_INTRO,
|
||||||
STREAMED_SOUND_CUTSCENE_DONALD3_ADO,
|
STREAMED_SOUND_CUTSCENE_FINALE,
|
||||||
STREAMED_SOUND_CUTSCENE_DONALD5_ES,
|
|
||||||
STREAMED_SOUND_CUTSCENE_DONALD7_MLD,
|
|
||||||
STREAMED_SOUND_CUTSCENE_DONALD4_GTA,
|
|
||||||
STREAMED_SOUND_CUTSCENE_DONALD4_GTA2,
|
|
||||||
STREAMED_SOUND_CUTSCENE_DONALD6_STS,
|
|
||||||
STREAMED_SOUND_CUTSCENE_ASUKA6_BAIT,
|
|
||||||
STREAMED_SOUND_CUTSCENE_ASUKA7_ETG,
|
|
||||||
STREAMED_SOUND_CUTSCENE_ASUKA8_PS,
|
|
||||||
STREAMED_SOUND_CUTSCENE_ASUKA9_ASD,
|
|
||||||
STREAMED_SOUND_CUTSCENE_KENJI4_SHI2,
|
|
||||||
STREAMED_SOUND_CUTSCENE_CATALINA1_TEX,
|
|
||||||
STREAMED_SOUND_CUTSCENE_ELBURRO1_PH1,
|
|
||||||
STREAMED_SOUND_CUTSCENE_ELBURRO2_PH2,
|
|
||||||
STREAMED_SOUND_CUTSCENE_ELBURRO3_PH3,
|
|
||||||
STREAMED_SOUND_CUTSCENE_ELBURRO4_PH4,
|
|
||||||
STREAMED_SOUND_CUTSCENE_YARDIE_PH1,
|
|
||||||
STREAMED_SOUND_CUTSCENE_YARDIE_PH2,
|
|
||||||
STREAMED_SOUND_CUTSCENE_YARDIE_PH3,
|
|
||||||
STREAMED_SOUND_CUTSCENE_YARDIE_PH4,
|
|
||||||
STREAMED_SOUND_CUTSCENE_HOODS_PH1,
|
|
||||||
STREAMED_SOUND_CUTSCENE_HOODS_PH2,
|
|
||||||
STREAMED_SOUND_CUTSCENE_HOODS_PH3,
|
|
||||||
STREAMED_SOUND_CUTSCENE_HOODS_PH4,
|
|
||||||
STREAMED_SOUND_CUTSCENE_HOODS_PH5,
|
|
||||||
STREAMED_SOUND_CUTSCENE_MARTY_PH1,
|
|
||||||
STREAMED_SOUND_CUTSCENE_MARTY_PH2,
|
|
||||||
STREAMED_SOUND_CUTSCENE_MARTY_PH3,
|
|
||||||
STREAMED_SOUND_CUTSCENE_MARTY_PH4,
|
|
||||||
STREAMED_SOUND_MISSION_COMPLETED,
|
STREAMED_SOUND_MISSION_COMPLETED,
|
||||||
STREAMED_SOUND_GAME_COMPLETED,
|
|
||||||
STREAMED_SOUND_MISSION_LIB_A1,
|
|
||||||
STREAMED_SOUND_MISSION_LIB_A2,
|
|
||||||
STREAMED_SOUND_MISSION_LIB_A,
|
|
||||||
STREAMED_SOUND_MISSION_LIB_B,
|
|
||||||
STREAMED_SOUND_MISSION_LIB_C,
|
|
||||||
STREAMED_SOUND_MISSION_LIB_D,
|
|
||||||
STREAMED_SOUND_MISSION_L2_A,
|
|
||||||
STREAMED_SOUND_MISSION_J4T_1,
|
|
||||||
STREAMED_SOUND_MISSION_J4T_2,
|
|
||||||
STREAMED_SOUND_MISSION_J4T_3,
|
|
||||||
STREAMED_SOUND_MISSION_J4T_4,
|
|
||||||
STREAMED_SOUND_MISSION_J4_A,
|
|
||||||
STREAMED_SOUND_MISSION_J4_B,
|
|
||||||
STREAMED_SOUND_MISSION_J4_C,
|
|
||||||
STREAMED_SOUND_MISSION_J4_D,
|
|
||||||
STREAMED_SOUND_MISSION_J4_E,
|
|
||||||
STREAMED_SOUND_MISSION_J4_F,
|
|
||||||
STREAMED_SOUND_MISSION_J6_1,
|
|
||||||
STREAMED_SOUND_MISSION_J6_A,
|
|
||||||
STREAMED_SOUND_MISSION_J6_B,
|
|
||||||
STREAMED_SOUND_MISSION_J6_C,
|
|
||||||
STREAMED_SOUND_MISSION_J6_D,
|
|
||||||
STREAMED_SOUND_MISSION_T4_A,
|
|
||||||
STREAMED_SOUND_MISSION_S1_A,
|
|
||||||
STREAMED_SOUND_MISSION_S1_A1,
|
|
||||||
STREAMED_SOUND_MISSION_S1_B,
|
|
||||||
STREAMED_SOUND_MISSION_S1_C,
|
|
||||||
STREAMED_SOUND_MISSION_S1_C1,
|
|
||||||
STREAMED_SOUND_MISSION_S1_D,
|
|
||||||
STREAMED_SOUND_MISSION_S1_E,
|
|
||||||
STREAMED_SOUND_MISSION_S1_F,
|
|
||||||
STREAMED_SOUND_MISSION_S1_G,
|
|
||||||
STREAMED_SOUND_MISSION_S1_H,
|
|
||||||
STREAMED_SOUND_MISSION_S1_I,
|
|
||||||
STREAMED_SOUND_MISSION_S1_J,
|
|
||||||
STREAMED_SOUND_MISSION_S1_K,
|
|
||||||
STREAMED_SOUND_MISSION_S1_L,
|
|
||||||
STREAMED_SOUND_MISSION_S3_A,
|
|
||||||
STREAMED_SOUND_MISSION_S3_B,
|
|
||||||
STREAMED_SOUND_MISSION_EL3_A,
|
|
||||||
STREAMED_SOUND_MISSION_MF1_A,
|
|
||||||
STREAMED_SOUND_MISSION_MF2_A,
|
|
||||||
STREAMED_SOUND_MISSION_MF3_A,
|
|
||||||
STREAMED_SOUND_MISSION_MF3_B,
|
|
||||||
STREAMED_SOUND_MISSION_MF3_B1,
|
|
||||||
STREAMED_SOUND_MISSION_MF3_C,
|
|
||||||
STREAMED_SOUND_MISSION_MF4_A,
|
|
||||||
STREAMED_SOUND_MISSION_MF4_B,
|
|
||||||
STREAMED_SOUND_MISSION_MF4_C,
|
|
||||||
STREAMED_SOUND_MISSION_A1_A,
|
|
||||||
STREAMED_SOUND_MISSION_A3_A,
|
|
||||||
STREAMED_SOUND_MISSION_A5_A,
|
|
||||||
STREAMED_SOUND_MISSION_A4_A,
|
|
||||||
STREAMED_SOUND_MISSION_A4_B,
|
|
||||||
STREAMED_SOUND_MISSION_A4_C,
|
|
||||||
STREAMED_SOUND_MISSION_A4_D,
|
|
||||||
STREAMED_SOUND_MISSION_K1_A,
|
|
||||||
STREAMED_SOUND_MISSION_K3_A,
|
|
||||||
STREAMED_SOUND_MISSION_R1_A,
|
|
||||||
STREAMED_SOUND_MISSION_R2_A,
|
|
||||||
STREAMED_SOUND_MISSION_R2_B,
|
|
||||||
STREAMED_SOUND_MISSION_R2_C,
|
|
||||||
STREAMED_SOUND_MISSION_R2_D,
|
|
||||||
STREAMED_SOUND_MISSION_R2_E,
|
|
||||||
STREAMED_SOUND_MISSION_R2_F,
|
|
||||||
STREAMED_SOUND_MISSION_R2_G,
|
|
||||||
STREAMED_SOUND_MISSION_R2_H,
|
|
||||||
STREAMED_SOUND_MISSION_R5_A,
|
|
||||||
STREAMED_SOUND_MISSION_R6_A,
|
|
||||||
STREAMED_SOUND_MISSION_R6_A1,
|
|
||||||
STREAMED_SOUND_MISSION_R6_B,
|
|
||||||
STREAMED_SOUND_MISSION_LO2_A,
|
|
||||||
STREAMED_SOUND_MISSION_LO6_A,
|
|
||||||
STREAMED_SOUND_MISSION_YD2_A,
|
|
||||||
STREAMED_SOUND_MISSION_YD2_B,
|
|
||||||
STREAMED_SOUND_MISSION_YD2_C,
|
|
||||||
STREAMED_SOUND_MISSION_YD2_C1,
|
|
||||||
STREAMED_SOUND_MISSION_YD2_D,
|
|
||||||
STREAMED_SOUND_MISSION_YD2_E,
|
|
||||||
STREAMED_SOUND_MISSION_YD2_F,
|
|
||||||
STREAMED_SOUND_MISSION_YD2_G,
|
|
||||||
STREAMED_SOUND_MISSION_YD2_H,
|
|
||||||
STREAMED_SOUND_MISSION_YD2_ASS,
|
|
||||||
STREAMED_SOUND_MISSION_YD2_OK,
|
|
||||||
STREAMED_SOUND_MISSION_H5_A,
|
|
||||||
STREAMED_SOUND_MISSION_H5_B,
|
|
||||||
STREAMED_SOUND_MISSION_H5_C,
|
|
||||||
STREAMED_SOUND_MISSION_AMMU_A,
|
|
||||||
STREAMED_SOUND_MISSION_AMMU_B,
|
|
||||||
STREAMED_SOUND_MISSION_AMMU_C,
|
|
||||||
STREAMED_SOUND_MISSION_DOOR_1,
|
|
||||||
STREAMED_SOUND_MISSION_DOOR_2,
|
|
||||||
STREAMED_SOUND_MISSION_DOOR_3,
|
|
||||||
STREAMED_SOUND_MISSION_DOOR_4,
|
|
||||||
STREAMED_SOUND_MISSION_DOOR_5,
|
|
||||||
STREAMED_SOUND_MISSION_DOOR_6,
|
|
||||||
STREAMED_SOUND_MISSION_T3_A,
|
|
||||||
STREAMED_SOUND_MISSION_T3_B,
|
|
||||||
STREAMED_SOUND_MISSION_T3_C,
|
|
||||||
STREAMED_SOUND_MISSION_K1_B,
|
|
||||||
STREAMED_SOUND_MISSION_CAT1,
|
|
||||||
TOTAL_STREAMED_SOUNDS,
|
TOTAL_STREAMED_SOUNDS,
|
||||||
NO_TRACK,
|
NO_TRACK,
|
||||||
};
|
};
|
||||||
@@ -241,15 +122,18 @@ enum eAudioType
|
|||||||
AUDIOTYPE_EXPLOSION,
|
AUDIOTYPE_EXPLOSION,
|
||||||
AUDIOTYPE_FIRE,
|
AUDIOTYPE_FIRE,
|
||||||
AUDIOTYPE_WEATHER,
|
AUDIOTYPE_WEATHER,
|
||||||
AUDIOTYPE_CRANE,
|
|
||||||
AUDIOTYPE_SCRIPTOBJECT,
|
AUDIOTYPE_SCRIPTOBJECT,
|
||||||
|
#ifdef GTA_BRIDGE
|
||||||
AUDIOTYPE_BRIDGE,
|
AUDIOTYPE_BRIDGE,
|
||||||
|
#endif
|
||||||
AUDIOTYPE_COLLISION,
|
AUDIOTYPE_COLLISION,
|
||||||
AUDIOTYPE_FRONTEND,
|
AUDIOTYPE_FRONTEND,
|
||||||
AUDIOTYPE_PROJECTILE,
|
AUDIOTYPE_PROJECTILE,
|
||||||
AUDIOTYPE_GARAGE,
|
AUDIOTYPE_GARAGE,
|
||||||
AUDIOTYPE_FIREHYDRANT,
|
AUDIOTYPE_FIREHYDRANT,
|
||||||
AUDIOTYPE_WATERCANNON,
|
AUDIOTYPE_WATERCANNON,
|
||||||
|
AUDIOTYPE_ESCALATOR,
|
||||||
|
AUDIOTYPE_EXTRA_SOUNDS,
|
||||||
AUDIOTYPE_POLICERADIO,
|
AUDIOTYPE_POLICERADIO,
|
||||||
TOTAL_AUDIO_TYPES,
|
TOTAL_AUDIO_TYPES,
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
|||||||
#ifdef AUDIO_OAL
|
#ifdef AUDIO_OAL
|
||||||
#include <AL/al.h>
|
#include <AL/al.h>
|
||||||
|
|
||||||
#define NUM_STREAMBUFFERS 4
|
#define NUM_STREAMBUFFERS 8
|
||||||
|
|
||||||
class IDecoder
|
class IDecoder
|
||||||
{
|
{
|
||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
class CStream
|
class CStream
|
||||||
{
|
{
|
||||||
char m_aFilename[128];
|
char m_aFilename[128];
|
||||||
ALuint &m_alSource;
|
ALuint *m_pAlSources;
|
||||||
ALuint (&m_alBuffers)[NUM_STREAMBUFFERS];
|
ALuint (&m_alBuffers)[NUM_STREAMBUFFERS];
|
||||||
|
|
||||||
bool m_bPaused;
|
bool m_bPaused;
|
||||||
@@ -73,20 +73,20 @@ class CStream
|
|||||||
IDecoder *m_pSoundFile;
|
IDecoder *m_pSoundFile;
|
||||||
|
|
||||||
bool HasSource();
|
bool HasSource();
|
||||||
void SetPosition(float x, float y, float z);
|
void SetPosition(int i, float x, float y, float z);
|
||||||
void SetPitch(float pitch);
|
void SetPitch(float pitch);
|
||||||
void SetGain(float gain);
|
void SetGain(float gain);
|
||||||
void Pause();
|
void Pause();
|
||||||
void SetPlay(bool state);
|
void SetPlay(bool state);
|
||||||
|
|
||||||
bool FillBuffer(ALuint alBuffer);
|
bool FillBuffer(ALuint *alBuffer);
|
||||||
int32 FillBuffers();
|
int32 FillBuffers();
|
||||||
void ClearBuffers();
|
void ClearBuffers();
|
||||||
public:
|
public:
|
||||||
static void Initialise();
|
static void Initialise();
|
||||||
static void Terminate();
|
static void Terminate();
|
||||||
|
|
||||||
CStream(char *filename, ALuint &source, ALuint (&buffers)[NUM_STREAMBUFFERS]);
|
CStream(char *filename, ALuint *sources, ALuint (&buffers)[NUM_STREAMBUFFERS], uint32 overrideSampleRate = 32000);
|
||||||
~CStream();
|
~CStream();
|
||||||
void Delete();
|
void Delete();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "common.h"
|
|
||||||
#include "AudioSamples.h"
|
#include "AudioSamples.h"
|
||||||
|
|
||||||
#define MAX_VOLUME 127
|
#define MAX_VOLUME 127
|
||||||
@@ -23,78 +22,94 @@ struct tSample {
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
SFX_BANK_0,
|
SFX_BANK_0,
|
||||||
|
#ifdef GTA_PS2
|
||||||
|
SFX_BANK_GENERIC_EXTRA,
|
||||||
|
SFX_BANK_PED_COMMENTS,
|
||||||
|
SFX_BANK_FRONT_END_MENU,
|
||||||
|
#else
|
||||||
|
SFX_BANK_GENERIC_EXTRA = SFX_BANK_0,
|
||||||
|
SFX_BANK_FRONT_END_MENU = SFX_BANK_0,
|
||||||
|
|
||||||
|
SFX_BANK_PED_COMMENTS,
|
||||||
|
MAX_SFX_BANKS,
|
||||||
|
INVALID_SFX_BANK,
|
||||||
|
#endif
|
||||||
|
|
||||||
CAR_SFX_BANKS_OFFSET,
|
CAR_SFX_BANKS_OFFSET,
|
||||||
SFX_BANK_PACARD = CAR_SFX_BANKS_OFFSET,
|
SFX_BANK_PONTIAC = CAR_SFX_BANKS_OFFSET,
|
||||||
SFX_BANK_PATHFINDER,
|
|
||||||
SFX_BANK_PORSCHE,
|
SFX_BANK_PORSCHE,
|
||||||
SFX_BANK_SPIDER,
|
SFX_BANK_SPIDER,
|
||||||
SFX_BANK_MERC,
|
SFX_BANK_MERC,
|
||||||
SFX_BANK_TRUCK,
|
SFX_BANK_TRUCK,
|
||||||
SFX_BANK_HOTROD,
|
SFX_BANK_HOTROD,
|
||||||
SFX_BANK_COBRA,
|
SFX_BANK_COBRA,
|
||||||
SFX_BANK_NONE,
|
SFX_BANK_PONTIAC_SLOW,
|
||||||
|
SFX_BANK_CADILLAC,
|
||||||
|
SFX_BANK_PATHFINDER,
|
||||||
|
SFX_BANK_PACARD,
|
||||||
|
SFX_BANK_GOLF_CART,
|
||||||
|
SFX_BANK_CAR_CHAINSAW,
|
||||||
|
SFX_BANK_RC,
|
||||||
|
SFX_BANK_RC_HELI,
|
||||||
|
SFX_BANK_CAR_UNUSED_4,
|
||||||
|
|
||||||
PS2BANK(SFX_BANK_FRONT_END_MENU),
|
// bikes
|
||||||
|
SFX_BANK_VTWIN,
|
||||||
|
SFX_BANK_MOPED,
|
||||||
|
SFX_BANK_HONDA250,
|
||||||
|
SFX_BANK_SPORTS_BIKE,
|
||||||
|
SFX_BANK_BIKE_UNUSED_1,
|
||||||
|
SFX_BANK_BIKE_UNUSED_2,
|
||||||
|
SFX_BANK_BIKE_UNUSED_3,
|
||||||
|
SFX_BANK_BIKE_UNUSED_4,
|
||||||
|
SFX_BANK_BIKE_UNUSED_5,
|
||||||
|
SFX_BANK_BIKE_UNUSED_6,
|
||||||
|
|
||||||
PS2BANK(SFX_BANK_TRAIN),
|
// heli
|
||||||
|
SFX_BANK_HELI_APACHE,
|
||||||
|
SFX_BANK_HELI_UNUSED_1,
|
||||||
|
SFX_BANK_HELI_UNUSED_2,
|
||||||
|
SFX_BANK_HELI_UNUSED_3,
|
||||||
|
SFX_BANK_HELI_UNUSED_4,
|
||||||
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_CLUB_1),
|
// plane
|
||||||
PS2BANK(SFX_BANK_BUILDING_CLUB_2),
|
SFX_BANK_PLANE_SEAPLANE,
|
||||||
PS2BANK(SFX_BANK_BUILDING_CLUB_3),
|
SFX_BANK_PLANE_UNUSED_1,
|
||||||
PS2BANK(SFX_BANK_BUILDING_CLUB_4),
|
SFX_BANK_PLANE_UNUSED_2,
|
||||||
PS2BANK(SFX_BANK_BUILDING_CLUB_5),
|
SFX_BANK_PLANE_UNUSED_3,
|
||||||
PS2BANK(SFX_BANK_BUILDING_CLUB_6),
|
SFX_BANK_PLANE_UNUSED_4,
|
||||||
PS2BANK(SFX_BANK_BUILDING_CLUB_7),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_CLUB_8),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_CLUB_9),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_CLUB_10),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_CLUB_11),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_CLUB_12),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_CLUB_RAGGA),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_STRIP_CLUB_1),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_STRIP_CLUB_2),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_WORKSHOP),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_PIANO_BAR),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_SAWMILL),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_DOG_FOOD_FACTORY),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_LAUNDERETTE),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_RESTAURANT_CHINATOWN),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_RESTAURANT_ITALY),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_RESTAURANT_GENERIC_1),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_RESTAURANT_GENERIC_2),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_AIRPORT),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_SHOP),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_CINEMA),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_DOCKS),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_HOME),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_PORN_1),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_PORN_2),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_PORN_3),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_POLICE_BALL),
|
|
||||||
PS2BANK(SFX_BANK_BUILDING_BANK_ALARM),
|
PS2BANK(SFX_BANK_BUILDING_BANK_ALARM),
|
||||||
PS2BANK(SFX_BANK_BUILDING_RAVE_INDUSTRIAL),
|
PS2BANK(SFX_BANK_BUILDING_SNORING),
|
||||||
PS2BANK(SFX_BANK_BUILDING_RAVE_COMMERCIAL),
|
PS2BANK(SFX_BANK_BUILDING_BAR_1),
|
||||||
PS2BANK(SFX_BANK_BUILDING_RAVE_SUBURBAN),
|
PS2BANK(SFX_BANK_BUILDING_BAR_2),
|
||||||
PS2BANK(SFX_BANK_BUILDING_RAVE_COMMERCIAL_2),
|
PS2BANK(SFX_BANK_BUILDING_BAR_3),
|
||||||
|
PS2BANK(SFX_BANK_BUILDING_BAR_4),
|
||||||
PS2BANK(SFX_BANK_BUILDING_39),
|
PS2BANK(SFX_BANK_BUILDING_MALIBU_1),
|
||||||
PS2BANK(SFX_BANK_BUILDING_40),
|
PS2BANK(SFX_BANK_BUILDING_MALIBU_2),
|
||||||
PS2BANK(SFX_BANK_BUILDING_41),
|
PS2BANK(SFX_BANK_BUILDING_MALIBU_3),
|
||||||
PS2BANK(SFX_BANK_BUILDING_42),
|
PS2BANK(SFX_BANK_BUILDING_STRIP_1),
|
||||||
PS2BANK(SFX_BANK_BUILDING_43),
|
PS2BANK(SFX_BANK_BUILDING_STRIP_2),
|
||||||
PS2BANK(SFX_BANK_BUILDING_44),
|
PS2BANK(SFX_BANK_BUILDING_STRIP_3),
|
||||||
PS2BANK(SFX_BANK_BUILDING_45),
|
PS2BANK(SFX_BANK_BUILDING_CHURCH),
|
||||||
PS2BANK(SFX_BANK_BUILDING_46),
|
PS2BANK(SFX_BANK_BUILDING_FAN_1),
|
||||||
PS2BANK(SFX_BANK_BUILDING_47),
|
PS2BANK(SFX_BANK_BUILDING_FAN_2),
|
||||||
|
PS2BANK(SFX_BANK_BUILDING_INSECT_1),
|
||||||
PS2BANK(SFX_BANK_GENERIC_EXTRA),
|
PS2BANK(SFX_BANK_BUILDING_INSECT_2),
|
||||||
|
PS2BANK(SFX_BANK_BUILDING_18),
|
||||||
SFX_BANK_PED_COMMENTS,
|
PS2BANK(SFX_BANK_BUILDING_19),
|
||||||
|
PS2BANK(SFX_BANK_BUILDING_20),
|
||||||
|
PS2BANK(SFX_BANK_BUILDING_21),
|
||||||
|
PS2BANK(SFX_BANK_FOOTSTEPS_GRASS),
|
||||||
|
PS2BANK(SFX_BANK_FOOTSTEPS_GRAVEL),
|
||||||
|
PS2BANK(SFX_BANK_FOOTSTEPS_WOOD),
|
||||||
|
PS2BANK(SFX_BANK_FOOTSTEPS_METAL),
|
||||||
|
PS2BANK(SFX_BANK_FOOTSTEPS_WATER),
|
||||||
|
PS2BANK(SFX_BANK_FOOTSTEPS_SAND),
|
||||||
|
#ifdef GTA_PS2
|
||||||
MAX_SFX_BANKS,
|
MAX_SFX_BANKS,
|
||||||
INVALID_SFX_BANK
|
INVALID_SFX_BANK
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_PEDSFX 7
|
#define MAX_PEDSFX 7
|
||||||
#define PED_BLOCKSIZE 79000
|
#define PED_BLOCKSIZE 79000
|
||||||
|
|
||||||
@@ -105,7 +120,7 @@ enum
|
|||||||
#define MAX2DCHANNELS 1
|
#define MAX2DCHANNELS 1
|
||||||
#define CHANNEL2D MAXCHANNELS
|
#define CHANNEL2D MAXCHANNELS
|
||||||
|
|
||||||
#define MAX_STREAMS 2
|
#define MAX_STREAMS 3
|
||||||
|
|
||||||
#define DIGITALRATE 32000
|
#define DIGITALRATE 32000
|
||||||
#define DIGITALBITS 16
|
#define DIGITALBITS 16
|
||||||
@@ -117,15 +132,19 @@ class cSampleManager
|
|||||||
{
|
{
|
||||||
uint8 m_nEffectsVolume;
|
uint8 m_nEffectsVolume;
|
||||||
uint8 m_nMusicVolume;
|
uint8 m_nMusicVolume;
|
||||||
|
uint8 m_nMP3BoostVolume;
|
||||||
uint8 m_nEffectsFadeVolume;
|
uint8 m_nEffectsFadeVolume;
|
||||||
uint8 m_nMusicFadeVolume;
|
uint8 m_nMusicFadeVolume;
|
||||||
uint8 m_nMonoMode;
|
uint8 m_nMonoMode;
|
||||||
char unk;
|
|
||||||
char m_szCDRomRootPath[80];
|
char m_szCDRomRootPath[80];
|
||||||
bool m_bInitialised;
|
bool m_bInitialised;
|
||||||
uint8 m_nNumberOfProviders;
|
uint8 m_nNumberOfProviders;
|
||||||
char *m_aAudioProviders[MAXPROVIDERS];
|
char *m_aAudioProviders[MAXPROVIDERS];
|
||||||
tSample m_aSamples[TOTAL_AUDIO_SAMPLES];
|
tSample m_aSamples[TOTAL_AUDIO_SAMPLES];
|
||||||
|
char m_MiscomPath[260];
|
||||||
|
char m_WavFilesPath[260];
|
||||||
|
char m_MP3FilesPath[188];
|
||||||
|
void *m_aChannels[18];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -146,6 +165,8 @@ public:
|
|||||||
int8 GetCurrent3DProviderIndex(void);
|
int8 GetCurrent3DProviderIndex(void);
|
||||||
int8 SetCurrent3DProvider(uint8 which);
|
int8 SetCurrent3DProvider(uint8 which);
|
||||||
|
|
||||||
|
int8 AutoDetect3DProviders();
|
||||||
|
|
||||||
bool IsMP3RadioChannelAvailable(void);
|
bool IsMP3RadioChannelAvailable(void);
|
||||||
|
|
||||||
void ReleaseDigitalHandle (void);
|
void ReleaseDigitalHandle (void);
|
||||||
@@ -161,6 +182,7 @@ public:
|
|||||||
|
|
||||||
void SetEffectsMasterVolume(uint8 nVolume);
|
void SetEffectsMasterVolume(uint8 nVolume);
|
||||||
void SetMusicMasterVolume (uint8 nVolume);
|
void SetMusicMasterVolume (uint8 nVolume);
|
||||||
|
void SetMP3BoostVolume (uint8 nVolume);
|
||||||
void SetEffectsFadeVolume (uint8 nVolume);
|
void SetEffectsFadeVolume (uint8 nVolume);
|
||||||
void SetMusicFadeVolume (uint8 nVolume);
|
void SetMusicFadeVolume (uint8 nVolume);
|
||||||
void SetMonoMode (uint8 nMode);
|
void SetMonoMode (uint8 nMode);
|
||||||
@@ -196,10 +218,10 @@ public:
|
|||||||
void StartChannel (uint32 nChannel);
|
void StartChannel (uint32 nChannel);
|
||||||
void StopChannel (uint32 nChannel);
|
void StopChannel (uint32 nChannel);
|
||||||
|
|
||||||
void PreloadStreamedFile (uint8 nFile, uint8 nStream);
|
void PreloadStreamedFile (uint32 nFile, uint8 nStream);
|
||||||
void PauseStream (uint8 nPauseFlag, uint8 nStream);
|
void PauseStream (uint8 nPauseFlag, uint8 nStream);
|
||||||
void StartPreloadedStreamedFile (uint8 nStream);
|
void StartPreloadedStreamedFile (uint8 nStream);
|
||||||
bool StartStreamedFile (uint8 nFile, uint32 nPos, uint8 nStream);
|
bool StartStreamedFile (uint32 nFile, uint32 nPos, uint8 nStream);
|
||||||
void StopStreamedFile (uint8 nStream);
|
void StopStreamedFile (uint8 nStream);
|
||||||
int32 GetStreamedFilePosition (uint8 nStream);
|
int32 GetStreamedFilePosition (uint8 nStream);
|
||||||
void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream);
|
void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream);
|
||||||
@@ -209,16 +231,15 @@ public:
|
|||||||
void Service(void);
|
void Service(void);
|
||||||
#endif
|
#endif
|
||||||
bool InitialiseSampleBanks(void);
|
bool InitialiseSampleBanks(void);
|
||||||
|
|
||||||
|
uint8 GetMusicVolume() const { return m_nMusicVolume; }
|
||||||
|
void SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nStream);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern cSampleManager SampleManager;
|
extern cSampleManager SampleManager;
|
||||||
extern uint32 BankStartOffset[MAX_SFX_BANKS];
|
extern uint32 BankStartOffset[MAX_SFX_BANKS];
|
||||||
|
|
||||||
#ifdef AUDIO_OAL
|
#if defined(OPUS_AUDIO_PATHS)
|
||||||
extern int defaultProvider;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef AUDIO_OPUS
|
|
||||||
static char StreamedNameTable[][25] = {
|
static char StreamedNameTable[][25] = {
|
||||||
"AUDIO\\HEAD.OPUS", "AUDIO\\CLASS.OPUS", "AUDIO\\KJAH.OPUS", "AUDIO\\RISE.OPUS", "AUDIO\\LIPS.OPUS", "AUDIO\\GAME.OPUS",
|
"AUDIO\\HEAD.OPUS", "AUDIO\\CLASS.OPUS", "AUDIO\\KJAH.OPUS", "AUDIO\\RISE.OPUS", "AUDIO\\LIPS.OPUS", "AUDIO\\GAME.OPUS",
|
||||||
"AUDIO\\MSX.OPUS", "AUDIO\\FLASH.OPUS", "AUDIO\\CHAT.OPUS", "AUDIO\\HEAD.OPUS", "AUDIO\\POLICE.OPUS", "AUDIO\\CITY.OPUS",
|
"AUDIO\\MSX.OPUS", "AUDIO\\FLASH.OPUS", "AUDIO\\CHAT.OPUS", "AUDIO\\HEAD.OPUS", "AUDIO\\POLICE.OPUS", "AUDIO\\CITY.OPUS",
|
||||||
@@ -253,302 +274,181 @@ static char StreamedNameTable[][25] = {
|
|||||||
"AUDIO\\h5_b.OPUS", "AUDIO\\h5_c.OPUS", "AUDIO\\ammu_a.OPUS", "AUDIO\\ammu_b.OPUS", "AUDIO\\ammu_c.OPUS", "AUDIO\\door_1.OPUS",
|
"AUDIO\\h5_b.OPUS", "AUDIO\\h5_c.OPUS", "AUDIO\\ammu_a.OPUS", "AUDIO\\ammu_b.OPUS", "AUDIO\\ammu_c.OPUS", "AUDIO\\door_1.OPUS",
|
||||||
"AUDIO\\door_2.OPUS", "AUDIO\\door_3.OPUS", "AUDIO\\door_4.OPUS", "AUDIO\\door_5.OPUS", "AUDIO\\door_6.OPUS", "AUDIO\\t3_a.OPUS",
|
"AUDIO\\door_2.OPUS", "AUDIO\\door_3.OPUS", "AUDIO\\door_4.OPUS", "AUDIO\\door_5.OPUS", "AUDIO\\door_6.OPUS", "AUDIO\\t3_a.OPUS",
|
||||||
"AUDIO\\t3_b.OPUS", "AUDIO\\t3_c.OPUS", "AUDIO\\k1_b.OPUS", "AUDIO\\cat1.OPUS"};
|
"AUDIO\\t3_b.OPUS", "AUDIO\\t3_c.OPUS", "AUDIO\\k1_b.OPUS", "AUDIO\\cat1.OPUS"};
|
||||||
#else
|
#elif defined(PS2_AUDIO_PATHS)
|
||||||
static char StreamedNameTable[][25]=
|
static char StreamedNameTable[][40] =
|
||||||
{
|
{
|
||||||
#ifdef PS2_AUDIO
|
|
||||||
"AUDIO\\MUSIC\\HEAD.VB",
|
"AUDIO\\MUSIC\\HEAD.VB",
|
||||||
"AUDIO\\MUSIC\\CLASS.VB",
|
"AUDIO\\MUSIC\\DOUBLE.VB",
|
||||||
"AUDIO\\MUSIC\\KJAH.VB",
|
"AUDIO\\MUSIC\\KJAH.VB",
|
||||||
"AUDIO\\MUSIC\\RISE.VB",
|
"AUDIO\\MUSIC\\RISE.VB",
|
||||||
"AUDIO\\MUSIC\\LIPS.VB",
|
"AUDIO\\MUSIC\\LIPS.VB",
|
||||||
"AUDIO\\MUSIC\\GAME.VB",
|
"AUDIO\\MUSIC\\MUNDO.VB",
|
||||||
"AUDIO\\MUSIC\\MSX.VB",
|
"AUDIO\\MUSIC\\MSX.VB",
|
||||||
"AUDIO\\MUSIC\\FLASH.VB",
|
"AUDIO\\MUSIC\\FLASH.VB",
|
||||||
"AUDIO\\MUSIC\\CHAT.VB",
|
"AUDIO\\MUSIC\\LCJ.VB",
|
||||||
"AUDIO\\MUSIC\\HEAD.VB",
|
"AUDIO\\MUSIC\\LCFR.VB",
|
||||||
"AUDIO\\MUSIC\\POLICE.VB",
|
"AUDIO\\MUSIC\\MISCOM2.VB",
|
||||||
"AUDIO\\MUSIC\\CITY.VB",
|
"AUDIO\\MUSIC\\CITY.VB",
|
||||||
"AUDIO\\MUSIC\\WATER.VB",
|
"AUDIO\\MUSIC\\WATER.VB",
|
||||||
"AUDIO\\MUSIC\\COMOPEN.VB",
|
"AUDIO\\MUSIC\\SAWMILL.VB",
|
||||||
"AUDIO\\MUSIC\\SUBOPEN.VB",
|
"AUDIO\\MUSIC\\CITY.VB",
|
||||||
"AUDIO\\OTHER\\JB.VB",
|
"AUDIO\\MUSIC\\WATER.VB",
|
||||||
"AUDIO\\OTHER\\BET.VB",
|
"AUDIO\\MUSIC\\WATER.VB",
|
||||||
"AUDIO\\LUIGI\\L1_LG.VB",
|
"AUDIO\\MUSIC\\CITY.VB",
|
||||||
"AUDIO\\LUIGI\\L2_DSB.VB",
|
"AUDIO\\MUSIC\\CITY.VB",
|
||||||
"AUDIO\\LUIGI\\L3_DM.VB",
|
"AUDIO\\MUSIC\\CITY.VB",
|
||||||
"AUDIO\\LUIGI\\L4_PAP.VB",
|
"AUDIO\\MUSIC\\CITY.VB",
|
||||||
"AUDIO\\LUIGI\\L5_TFB.VB",
|
"AUDIO\\MUSIC\\CITY.VB",
|
||||||
"AUDIO\\JOEY\\J0_DM2.VB",
|
"AUDIO\\MUSIC\\CITY.VB",
|
||||||
"AUDIO\\JOEY\\J1_LFL.VB",
|
"AUDIO\\MUSIC\\CITY.VB",
|
||||||
"AUDIO\\JOEY\\J2_KCL.VB",
|
"AUDIO\\MUSIC\\POLICE.VB",
|
||||||
"AUDIO\\JOEY\\J3_VH.VB",
|
"AUDIO\\MUSIC\\TAXI.VB",
|
||||||
"AUDIO\\JOEY\\J4_ETH.VB",
|
"AUDIO\\NEWS\\NEWS_A.VB",
|
||||||
"AUDIO\\JOEY\\J5_DST.VB",
|
"AUDIO\\NEWS\\NEWS_B.VB",
|
||||||
"AUDIO\\JOEY\\J6_TBJ.VB",
|
"AUDIO\\NEWS\\NEWS_C.VB",
|
||||||
"AUDIO\\TONI\\T1_TOL.VB",
|
"AUDIO\\NEWS\\NEWS_D.VB",
|
||||||
"AUDIO\\TONI\\T2_TPU.VB",
|
"AUDIO\\NEWS\\NEWS_E.VB",
|
||||||
"AUDIO\\TONI\\T3_MAS.VB",
|
"AUDIO\\NEWS\\NEWS_F.VB",
|
||||||
"AUDIO\\TONI\\T4_TAT.VB",
|
"AUDIO\\NEWS\\NEWS_G.VB",
|
||||||
"AUDIO\\TONI\\T5_BF.VB",
|
"AUDIO\\NEWS\\NEWS_H.VB",
|
||||||
"AUDIO\\SAL\\S0_MAS.VB",
|
"AUDIO\\NEWS\\NEWS_I.VB",
|
||||||
"AUDIO\\SAL\\S1_PF.VB",
|
"AUDIO\\NEWS\\NEWS_J.VB",
|
||||||
"AUDIO\\SAL\\S2_CTG.VB",
|
"AUDIO\\NEWS\\NEWS_K.VB",
|
||||||
"AUDIO\\SAL\\S3_RTC.VB",
|
"AUDIO\\NEWS\\NEWS_L.VB",
|
||||||
"AUDIO\\SAL\\S5_LRQ.VB",
|
"AUDIO\\NEWS\\NEWS_M.VB",
|
||||||
"AUDIO\\EBALL\\S4_BDBA.VB",
|
"AUDIO\\NEWS\\NEWS_N.VB",
|
||||||
"AUDIO\\EBALL\\S4_BDBB.VB",
|
"AUDIO\\CUTSCENE\\BIKER.VB",
|
||||||
"AUDIO\\SAL\\S2_CTG2.VB",
|
"AUDIO\\CUTSCENE\\BONEVOY.VB",
|
||||||
"AUDIO\\SAL\\S4_BDBD.VB",
|
"AUDIO\\CUTSCENE\\CAMPAIN.VB",
|
||||||
"AUDIO\\SAL\\S5_LRQB.VB",
|
"AUDIO\\CUTSCENE\\CASHCHP.VB",
|
||||||
"AUDIO\\SAL\\S5_LRQC.VB",
|
"AUDIO\\CUTSCENE\\CONTBAN.VB",
|
||||||
"AUDIO\\ASUKA\\A1_SSO.VB",
|
"AUDIO\\CUTSCENE\\CRAZY69.VB",
|
||||||
"AUDIO\\ASUKA\\A2_PP.VB",
|
"AUDIO\\CUTSCENE\\CRAZY69.VB",
|
||||||
"AUDIO\\ASUKA\\A3_SS.VB",
|
"AUDIO\\CUTSCENE\\DEADLY.VB",
|
||||||
"AUDIO\\ASUKA\\A4_PDR.VB",
|
"AUDIO\\CUTSCENE\\DONPROB.VB",
|
||||||
"AUDIO\\ASUKA\\A5_K2FT.VB",
|
"AUDIO\\CUTSCENE\\DRIVNMR.VB",
|
||||||
"AUDIO\\KENJI\\K1_KBO.VB",
|
"AUDIO\\CUTSCENE\\ELECTON.VB",
|
||||||
"AUDIO\\KENJI\\K2_GIS.VB",
|
"AUDIO\\CUTSCENE\\FINAL.VB",
|
||||||
"AUDIO\\KENJI\\K3_DS.VB",
|
"AUDIO\\CUTSCENE\\FINAL_2.VB",
|
||||||
"AUDIO\\KENJI\\K4_SHI.VB",
|
"AUDIO\\CUTSCENE\\HOMSWET.VB",
|
||||||
"AUDIO\\KENJI\\K5_SD.VB",
|
"AUDIO\\CUTSCENE\\HOTWHEL.VB",
|
||||||
"AUDIO\\RAY\\R0_PDR2.VB",
|
"AUDIO\\CUTSCENE\\KIDNAPP.VB",
|
||||||
"AUDIO\\RAY\\R1_SW.VB",
|
"AUDIO\\CUTSCENE\\LANDGRB.VB",
|
||||||
"AUDIO\\RAY\\R2_AP.VB",
|
"AUDIO\\CUTSCENE\\MORGUE.VB",
|
||||||
"AUDIO\\RAY\\R3_ED.VB",
|
"AUDIO\\CUTSCENE\\OVERDOS.VB",
|
||||||
"AUDIO\\RAY\\R4_GF.VB",
|
"AUDIO\\CUTSCENE\\RUFJUST.VB",
|
||||||
"AUDIO\\RAY\\R5_PB.VB",
|
"AUDIO\\CUTSCENE\\SAYONAR.VB",
|
||||||
"AUDIO\\RAY\\R6_MM.VB",
|
"AUDIO\\CUTSCENE\\SICILAN.VB",
|
||||||
"AUDIO\\LOVE\\D1_STOG.VB",
|
"AUDIO\\CUTSCENE\\THEOFER.VB",
|
||||||
"AUDIO\\LOVE\\D2_KK.VB",
|
"AUDIO\\CUTSCENE\\INTRO.VB",
|
||||||
"AUDIO\\LOVE\\D3_ADO.VB",
|
"AUDIO\\MUSIC\\FINALE.VB",
|
||||||
"AUDIO\\LOVE\\D5_ES.VB",
|
"AUDIO\\MUSIC\\MISCOM2.VB"
|
||||||
"AUDIO\\LOVE\\D7_MLD.VB",
|
|
||||||
"AUDIO\\LOVE\\D4_GTA.VB",
|
|
||||||
"AUDIO\\LOVE\\D4_GTA2.VB",
|
|
||||||
"AUDIO\\LOVE\\D6_STS.VB",
|
|
||||||
"AUDIO\\ASUKA\\A6_BAIT.VB",
|
|
||||||
"AUDIO\\ASUKA\\A7_ETG.VB",
|
|
||||||
"AUDIO\\ASUKA\\A8_PS.VB",
|
|
||||||
"AUDIO\\ASUKA\\A9_ASD.VB",
|
|
||||||
"AUDIO\\SHOP\\K4_SHI2.VB",
|
|
||||||
"AUDIO\\OTHER\\C1_TEX.VB",
|
|
||||||
"AUDIO\\PHONE\\EL_PH1.VB",
|
|
||||||
"AUDIO\\PHONE\\EL_PH2.VB",
|
|
||||||
"AUDIO\\PHONE\\EL_PH3.VB",
|
|
||||||
"AUDIO\\PHONE\\EL_PH4.VB",
|
|
||||||
"AUDIO\\PHONE\\YD_PH1.VB",
|
|
||||||
"AUDIO\\PHONE\\YD_PH2.VB",
|
|
||||||
"AUDIO\\PHONE\\YD_PH3.VB",
|
|
||||||
"AUDIO\\PHONE\\YD_PH4.VB",
|
|
||||||
"AUDIO\\PHONE\\HD_PH1.VB",
|
|
||||||
"AUDIO\\PHONE\\HD_PH2.VB",
|
|
||||||
"AUDIO\\PHONE\\HD_PH3.VB",
|
|
||||||
"AUDIO\\PHONE\\HD_PH4.VB",
|
|
||||||
"AUDIO\\PHONE\\HD_PH5.VB",
|
|
||||||
"AUDIO\\PHONE\\MT_PH1.VB",
|
|
||||||
"AUDIO\\PHONE\\MT_PH2.VB",
|
|
||||||
"AUDIO\\PHONE\\MT_PH3.VB",
|
|
||||||
"AUDIO\\PHONE\\MT_PH4.VB",
|
|
||||||
"AUDIO\\MUSIC\\MISCOM.VB",
|
|
||||||
"AUDIO\\MUSIC\\END.VB",
|
|
||||||
#else
|
#else
|
||||||
"AUDIO\\HEAD.WAV",
|
static char StreamedNameTable[][25] =
|
||||||
"AUDIO\\CLASS.WAV",
|
{
|
||||||
"AUDIO\\KJAH.WAV",
|
"AUDIO\\WILD.ADF",
|
||||||
"AUDIO\\RISE.WAV",
|
"AUDIO\\FLASH.ADF",
|
||||||
"AUDIO\\LIPS.WAV",
|
"AUDIO\\KCHAT.ADF",
|
||||||
"AUDIO\\GAME.WAV",
|
"AUDIO\\FEVER.ADF",
|
||||||
"AUDIO\\MSX.WAV",
|
"AUDIO\\VROCK.ADF",
|
||||||
"AUDIO\\FLASH.WAV",
|
"AUDIO\\VCPR.ADF",
|
||||||
"AUDIO\\CHAT.WAV",
|
"AUDIO\\ESPANT.ADF",
|
||||||
"AUDIO\\HEAD.WAV",
|
"AUDIO\\EMOTION.ADF",
|
||||||
"AUDIO\\POLICE.WAV",
|
"AUDIO\\WAVE.ADF",
|
||||||
"AUDIO\\CITY.WAV",
|
"AUDIO\\MISCOM.MP3",
|
||||||
"AUDIO\\WATER.WAV",
|
"AUDIO\\CITY.MP3",
|
||||||
"AUDIO\\COMOPEN.WAV",
|
"AUDIO\\WATER.MP3",
|
||||||
"AUDIO\\SUBOPEN.WAV",
|
"AUDIO\\BEACHAMB.MP3",
|
||||||
"AUDIO\\JB.MP3",
|
"AUDIO\\HCITY.MP3",
|
||||||
"AUDIO\\BET.MP3",
|
"AUDIO\\HWATER.MP3",
|
||||||
"AUDIO\\L1_LG.MP3",
|
"AUDIO\\HBEACH.MP3",
|
||||||
"AUDIO\\L2_DSB.MP3",
|
"AUDIO\\MALLAMB.MP3",
|
||||||
"AUDIO\\L3_DM.MP3",
|
"AUDIO\\STRIP.MP3",
|
||||||
"AUDIO\\L4_PAP.MP3",
|
"AUDIO\\MALIBU.MP3",
|
||||||
"AUDIO\\L5_TFB.MP3",
|
"AUDIO\\HOTEL.MP3",
|
||||||
"AUDIO\\J0_DM2.MP3",
|
"AUDIO\\DIRTRING.MP3",
|
||||||
"AUDIO\\J1_LFL.MP3",
|
"AUDIO\\LAW4RIOT.MP3",
|
||||||
"AUDIO\\J2_KCL.MP3",
|
"AUDIO\\AMBSIL.MP3",
|
||||||
"AUDIO\\J3_VH.MP3",
|
"AUDIO\\POLICE.MP3",
|
||||||
"AUDIO\\J4_ETH.MP3",
|
"AUDIO\\TAXI.MP3",
|
||||||
"AUDIO\\J5_DST.MP3",
|
"AUDIO\\BCLOSED.MP3",
|
||||||
"AUDIO\\J6_TBJ.MP3",
|
"AUDIO\\BOPEN.MP3",
|
||||||
"AUDIO\\T1_TOL.MP3",
|
"AUDIO\\ASS_1.MP3",
|
||||||
"AUDIO\\T2_TPU.MP3",
|
"AUDIO\\ASS_2.MP3",
|
||||||
"AUDIO\\T3_MAS.MP3",
|
"AUDIO\\BANK_1.MP3",
|
||||||
"AUDIO\\T4_TAT.MP3",
|
"AUDIO\\BANK_2A.MP3",
|
||||||
"AUDIO\\T5_BF.MP3",
|
"AUDIO\\BANK_2B.MP3",
|
||||||
"AUDIO\\S0_MAS.MP3",
|
"AUDIO\\BANK_3A.MP3",
|
||||||
"AUDIO\\S1_PF.MP3",
|
"AUDIO\\BANK_3B.MP3",
|
||||||
"AUDIO\\S2_CTG.MP3",
|
"AUDIO\\BANK_4.MP3",
|
||||||
"AUDIO\\S3_RTC.MP3",
|
"AUDIO\\BIKE_1.MP3",
|
||||||
"AUDIO\\S5_LRQ.MP3",
|
"AUDIO\\BIKE_2.MP3",
|
||||||
"AUDIO\\S4_BDBA.MP3",
|
"AUDIO\\BIKE_3.MP3",
|
||||||
"AUDIO\\S4_BDBB.MP3",
|
"AUDIO\\BUD_1.MP3",
|
||||||
"AUDIO\\S2_CTG2.MP3",
|
"AUDIO\\BUD_2.MP3",
|
||||||
"AUDIO\\S4_BDBD.MP3",
|
"AUDIO\\BUD_3.MP3",
|
||||||
"AUDIO\\S5_LRQB.MP3",
|
"AUDIO\\CAP_1.MP3",
|
||||||
"AUDIO\\S5_LRQC.MP3",
|
"AUDIO\\CAR_1.MP3",
|
||||||
"AUDIO\\A1_SSO.WAV",
|
"AUDIO\\CNT_1A.MP3",
|
||||||
"AUDIO\\A2_PP.WAV",
|
"AUDIO\\CNT_1B.MP3",
|
||||||
"AUDIO\\A3_SS.WAV",
|
"AUDIO\\CNT_2.MP3",
|
||||||
"AUDIO\\A4_PDR.WAV",
|
"AUDIO\\COK_1.MP3",
|
||||||
"AUDIO\\A5_K2FT.WAV",
|
"AUDIO\\COK_2A.MP3",
|
||||||
"AUDIO\\K1_KBO.MP3",
|
"AUDIO\\COK_2B.MP3",
|
||||||
"AUDIO\\K2_GIS.MP3",
|
"AUDIO\\COK_3.MP3",
|
||||||
"AUDIO\\K3_DS.MP3",
|
"AUDIO\\COK_4A.MP3",
|
||||||
"AUDIO\\K4_SHI.MP3",
|
"AUDIO\\COK_4A2.MP3",
|
||||||
"AUDIO\\K5_SD.MP3",
|
"AUDIO\\COK_4B.MP3",
|
||||||
"AUDIO\\R0_PDR2.MP3",
|
"AUDIO\\COL_1.MP3",
|
||||||
"AUDIO\\R1_SW.MP3",
|
"AUDIO\\COL_2.MP3",
|
||||||
"AUDIO\\R2_AP.MP3",
|
"AUDIO\\COL_3A.MP3",
|
||||||
"AUDIO\\R3_ED.MP3",
|
"AUDIO\\COL_4A.MP3",
|
||||||
"AUDIO\\R4_GF.MP3",
|
"AUDIO\\COL_5A.MP3",
|
||||||
"AUDIO\\R5_PB.MP3",
|
"AUDIO\\COL_5B.MP3",
|
||||||
"AUDIO\\R6_MM.MP3",
|
"AUDIO\\CUB_1.MP3",
|
||||||
"AUDIO\\D1_STOG.MP3",
|
"AUDIO\\CUB_2.MP3",
|
||||||
"AUDIO\\D2_KK.MP3",
|
"AUDIO\\CUB_3.MP3",
|
||||||
"AUDIO\\D3_ADO.MP3",
|
"AUDIO\\CUB_4.MP3",
|
||||||
"AUDIO\\D5_ES.MP3",
|
"AUDIO\\DRUG_1.MP3",
|
||||||
"AUDIO\\D7_MLD.MP3",
|
"AUDIO\\FIN.MP3",
|
||||||
"AUDIO\\D4_GTA.MP3",
|
"AUDIO\\FIN2.MP3",
|
||||||
"AUDIO\\D4_GTA2.MP3",
|
"AUDIO\\FINALE.MP3",
|
||||||
"AUDIO\\D6_STS.MP3",
|
"AUDIO\\HAT_1.MP3",
|
||||||
"AUDIO\\A6_BAIT.WAV",
|
"AUDIO\\HAT_2.MP3",
|
||||||
"AUDIO\\A7_ETG.WAV",
|
"AUDIO\\HAT_3.MP3",
|
||||||
"AUDIO\\A8_PS.WAV",
|
"AUDIO\\ICE_1.MP3",
|
||||||
"AUDIO\\A9_ASD.WAV",
|
"AUDIO\\INT_A.MP3",
|
||||||
"AUDIO\\K4_SHI2.MP3",
|
"AUDIO\\INT_B.MP3",
|
||||||
"AUDIO\\C1_TEX.MP3",
|
"AUDIO\\INT_D.MP3",
|
||||||
"AUDIO\\EL_PH1.MP3",
|
"AUDIO\\INT_M.MP3",
|
||||||
"AUDIO\\EL_PH2.MP3",
|
"AUDIO\\LAW_1A.MP3",
|
||||||
"AUDIO\\EL_PH3.MP3",
|
"AUDIO\\LAW_1B.MP3",
|
||||||
"AUDIO\\EL_PH4.MP3",
|
"AUDIO\\LAW_2A.MP3",
|
||||||
"AUDIO\\YD_PH1.MP3",
|
"AUDIO\\LAW_2B.MP3",
|
||||||
"AUDIO\\YD_PH2.MP3",
|
"AUDIO\\LAW_2C.MP3",
|
||||||
"AUDIO\\YD_PH3.MP3",
|
"AUDIO\\LAW_3.MP3",
|
||||||
"AUDIO\\YD_PH4.MP3",
|
"AUDIO\\LAW_4.MP3",
|
||||||
"AUDIO\\HD_PH1.MP3",
|
"AUDIO\\PHIL_1.MP3",
|
||||||
"AUDIO\\HD_PH2.MP3",
|
"AUDIO\\PHIL_2.MP3",
|
||||||
"AUDIO\\HD_PH3.MP3",
|
"AUDIO\\PORN_1.MP3",
|
||||||
"AUDIO\\HD_PH4.MP3",
|
"AUDIO\\PORN_2.MP3",
|
||||||
"AUDIO\\HD_PH5.MP3",
|
"AUDIO\\PORN_3.MP3",
|
||||||
"AUDIO\\MT_PH1.MP3",
|
"AUDIO\\PORN_4.MP3",
|
||||||
"AUDIO\\MT_PH2.MP3",
|
"AUDIO\\RESC_1A.MP3",
|
||||||
"AUDIO\\MT_PH3.MP3",
|
"AUDIO\\ROK_1.MP3",
|
||||||
"AUDIO\\MT_PH4.MP3",
|
"AUDIO\\ROK_2.MP3",
|
||||||
"AUDIO\\MISCOM.WAV",
|
"AUDIO\\ROK_3A.MP3",
|
||||||
"AUDIO\\END.MP3",
|
"AUDIO\\STRIPA.MP3",
|
||||||
|
"AUDIO\\TAX_1.MP3",
|
||||||
|
"AUDIO\\TEX_1.MP3",
|
||||||
|
"AUDIO\\TEX_2.MP3",
|
||||||
|
"AUDIO\\TEX_3.MP3",
|
||||||
|
"AUDIO\\GLIGHT.MP3",
|
||||||
|
"AUDIO\\FIST.MP3",
|
||||||
|
"AUDIO\\MISCOM.MP3",
|
||||||
|
"AUDIO\\MISCOM.MP3",
|
||||||
|
"AUDIO\\MISCOM.MP3",
|
||||||
|
"AUDIO\\MISCOM.MP3",
|
||||||
#endif
|
#endif
|
||||||
"AUDIO\\lib_a1.WAV",
|
|
||||||
"AUDIO\\lib_a2.WAV",
|
|
||||||
"AUDIO\\lib_a.WAV",
|
|
||||||
"AUDIO\\lib_b.WAV",
|
|
||||||
"AUDIO\\lib_c.WAV",
|
|
||||||
"AUDIO\\lib_d.WAV",
|
|
||||||
"AUDIO\\l2_a.WAV",
|
|
||||||
"AUDIO\\j4t_1.WAV",
|
|
||||||
"AUDIO\\j4t_2.WAV",
|
|
||||||
"AUDIO\\j4t_3.WAV",
|
|
||||||
"AUDIO\\j4t_4.WAV",
|
|
||||||
"AUDIO\\j4_a.WAV",
|
|
||||||
"AUDIO\\j4_b.WAV",
|
|
||||||
"AUDIO\\j4_c.WAV",
|
|
||||||
"AUDIO\\j4_d.WAV",
|
|
||||||
"AUDIO\\j4_e.WAV",
|
|
||||||
"AUDIO\\j4_f.WAV",
|
|
||||||
"AUDIO\\j6_1.WAV",
|
|
||||||
"AUDIO\\j6_a.WAV",
|
|
||||||
"AUDIO\\j6_b.WAV",
|
|
||||||
"AUDIO\\j6_c.WAV",
|
|
||||||
"AUDIO\\j6_d.WAV",
|
|
||||||
"AUDIO\\t4_a.WAV",
|
|
||||||
"AUDIO\\s1_a.WAV",
|
|
||||||
"AUDIO\\s1_a1.WAV",
|
|
||||||
"AUDIO\\s1_b.WAV",
|
|
||||||
"AUDIO\\s1_c.WAV",
|
|
||||||
"AUDIO\\s1_c1.WAV",
|
|
||||||
"AUDIO\\s1_d.WAV",
|
|
||||||
"AUDIO\\s1_e.WAV",
|
|
||||||
"AUDIO\\s1_f.WAV",
|
|
||||||
"AUDIO\\s1_g.WAV",
|
|
||||||
"AUDIO\\s1_h.WAV",
|
|
||||||
"AUDIO\\s1_i.WAV",
|
|
||||||
"AUDIO\\s1_j.WAV",
|
|
||||||
"AUDIO\\s1_k.WAV",
|
|
||||||
"AUDIO\\s1_l.WAV",
|
|
||||||
"AUDIO\\s3_a.WAV",
|
|
||||||
"AUDIO\\s3_b.WAV",
|
|
||||||
"AUDIO\\el3_a.WAV",
|
|
||||||
"AUDIO\\mf1_a.WAV",
|
|
||||||
"AUDIO\\mf2_a.WAV",
|
|
||||||
"AUDIO\\mf3_a.WAV",
|
|
||||||
"AUDIO\\mf3_b.WAV",
|
|
||||||
"AUDIO\\mf3_b1.WAV",
|
|
||||||
"AUDIO\\mf3_c.WAV",
|
|
||||||
"AUDIO\\mf4_a.WAV",
|
|
||||||
"AUDIO\\mf4_b.WAV",
|
|
||||||
"AUDIO\\mf4_c.WAV",
|
|
||||||
"AUDIO\\a1_a.WAV",
|
|
||||||
"AUDIO\\a3_a.WAV",
|
|
||||||
"AUDIO\\a5_a.WAV",
|
|
||||||
"AUDIO\\a4_a.WAV",
|
|
||||||
"AUDIO\\a4_b.WAV",
|
|
||||||
"AUDIO\\a4_c.WAV",
|
|
||||||
"AUDIO\\a4_d.WAV",
|
|
||||||
"AUDIO\\k1_a.WAV",
|
|
||||||
"AUDIO\\k3_a.WAV",
|
|
||||||
"AUDIO\\r1_a.WAV",
|
|
||||||
"AUDIO\\r2_a.WAV",
|
|
||||||
"AUDIO\\r2_b.WAV",
|
|
||||||
"AUDIO\\r2_c.WAV",
|
|
||||||
"AUDIO\\r2_d.WAV",
|
|
||||||
"AUDIO\\r2_e.WAV",
|
|
||||||
"AUDIO\\r2_f.WAV",
|
|
||||||
"AUDIO\\r2_g.WAV",
|
|
||||||
"AUDIO\\r2_h.WAV",
|
|
||||||
"AUDIO\\r5_a.WAV",
|
|
||||||
"AUDIO\\r6_a.WAV",
|
|
||||||
"AUDIO\\r6_a1.WAV",
|
|
||||||
"AUDIO\\r6_b.WAV",
|
|
||||||
"AUDIO\\lo2_a.WAV",
|
|
||||||
"AUDIO\\lo6_a.WAV",
|
|
||||||
"AUDIO\\yd2_a.WAV",
|
|
||||||
"AUDIO\\yd2_b.WAV",
|
|
||||||
"AUDIO\\yd2_c.WAV",
|
|
||||||
"AUDIO\\yd2_c1.WAV",
|
|
||||||
"AUDIO\\yd2_d.WAV",
|
|
||||||
"AUDIO\\yd2_e.WAV",
|
|
||||||
"AUDIO\\yd2_f.WAV",
|
|
||||||
"AUDIO\\yd2_g.WAV",
|
|
||||||
"AUDIO\\yd2_h.WAV",
|
|
||||||
"AUDIO\\yd2_ass.WAV",
|
|
||||||
"AUDIO\\yd2_ok.WAV",
|
|
||||||
"AUDIO\\h5_a.WAV",
|
|
||||||
"AUDIO\\h5_b.WAV",
|
|
||||||
"AUDIO\\h5_c.WAV",
|
|
||||||
"AUDIO\\ammu_a.WAV",
|
|
||||||
"AUDIO\\ammu_b.WAV",
|
|
||||||
"AUDIO\\ammu_c.WAV",
|
|
||||||
"AUDIO\\door_1.WAV",
|
|
||||||
"AUDIO\\door_2.WAV",
|
|
||||||
"AUDIO\\door_3.WAV",
|
|
||||||
"AUDIO\\door_4.WAV",
|
|
||||||
"AUDIO\\door_5.WAV",
|
|
||||||
"AUDIO\\door_6.WAV",
|
|
||||||
"AUDIO\\t3_a.WAV",
|
|
||||||
"AUDIO\\t3_b.WAV",
|
|
||||||
"AUDIO\\t3_c.WAV",
|
|
||||||
"AUDIO\\k1_b.WAV",
|
|
||||||
"AUDIO\\cat1.WAV"
|
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#ifdef AUDIO_MSS
|
#ifdef AUDIO_MSS
|
||||||
#include <windows.h>
|
#include <shlobj.h>
|
||||||
#include <shobjidl.h>
|
|
||||||
#include <shlguid.h>
|
#include <shlguid.h>
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@@ -16,7 +15,7 @@
|
|||||||
#include "MusicManager.h"
|
#include "MusicManager.h"
|
||||||
#include "Frontend.h"
|
#include "Frontend.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
|
#include "crossplatform.h"
|
||||||
|
|
||||||
#pragma comment( lib, "mss32.lib" )
|
#pragma comment( lib, "mss32.lib" )
|
||||||
|
|
||||||
@@ -61,14 +60,10 @@ char _mp3DirectoryPath[MAX_PATH];
|
|||||||
HSTREAM mp3Stream [MAX_STREAMS];
|
HSTREAM mp3Stream [MAX_STREAMS];
|
||||||
int8 nStreamPan [MAX_STREAMS];
|
int8 nStreamPan [MAX_STREAMS];
|
||||||
int8 nStreamVolume[MAX_STREAMS];
|
int8 nStreamVolume[MAX_STREAMS];
|
||||||
|
uint8 nStreamLoopedFlag[MAX_STREAMS];
|
||||||
uint32 _CurMP3Index;
|
uint32 _CurMP3Index;
|
||||||
int32 _CurMP3Pos;
|
int32 _CurMP3Pos;
|
||||||
bool _bIsMp3Active;
|
bool _bIsMp3Active;
|
||||||
|
|
||||||
#if GTA_VERSION >= GTA3_PC_11 || defined(NO_CDCHECK)
|
|
||||||
bool _bUseHDDAudio;
|
|
||||||
char _aHDDPath[MAX_PATH];
|
|
||||||
#endif
|
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -264,10 +259,63 @@ set_new_provider(S32 index)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
U32 RadioHandlers[9];
|
||||||
|
|
||||||
|
U32 WINAPI vfs_open_callback(char const* Filename, U32* FileHandle)
|
||||||
|
{
|
||||||
|
*FileHandle = (U32)fopen(Filename, "rb");
|
||||||
|
|
||||||
|
// couldn't they just use stricmp once? and strlen? this is very inefficient
|
||||||
|
if ((strcmp(Filename + strlen(Filename) - 4, ".adf") == 0) || (strcmp(Filename + strlen(Filename) - 4, ".ADF") == 0)) {
|
||||||
|
for (int i = 0; i < ARRAY_SIZE(RadioHandlers); i++) {
|
||||||
|
if (RadioHandlers[i] == NULL) {
|
||||||
|
RadioHandlers[i] = *FileHandle;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
strcpy((char*)Filename + strlen(Filename) - 4, ".mp3");
|
||||||
|
}
|
||||||
|
return *FileHandle;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WINAPI vfs_close_callback(U32 FileHandle)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < ARRAY_SIZE(RadioHandlers); i++) {
|
||||||
|
if (RadioHandlers[i] == FileHandle) {
|
||||||
|
RadioHandlers[i] = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fclose((FILE*)FileHandle);
|
||||||
|
}
|
||||||
|
|
||||||
|
S32 WINAPI vfs_seek_callback(U32 FileHandle, S32 Offset, U32 Type)
|
||||||
|
{
|
||||||
|
fseek((FILE*)FileHandle, Offset, Type);
|
||||||
|
return ftell((FILE*)FileHandle);
|
||||||
|
}
|
||||||
|
|
||||||
|
U32 WINAPI vfs_read_callback(U32 FileHandle, void* Buffer, U32 Bytes)
|
||||||
|
{
|
||||||
|
fread(Buffer, Bytes, 1, (FILE*)FileHandle);
|
||||||
|
uint8* _Buffer = (uint8*)Buffer;
|
||||||
|
|
||||||
|
for (int i = 0; i < ARRAY_SIZE(RadioHandlers); i++) {
|
||||||
|
if (FileHandle == RadioHandlers[i]) {
|
||||||
|
for (U32 k = 0; k < Bytes; k++)
|
||||||
|
_Buffer[k] ^= 0x22;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Bytes;
|
||||||
|
}
|
||||||
|
|
||||||
cSampleManager::cSampleManager(void) :
|
cSampleManager::cSampleManager(void) :
|
||||||
m_nNumberOfProviders(0)
|
m_nNumberOfProviders(0)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
|
|
||||||
|
AIL_set_file_callbacks(vfs_open_callback, vfs_close_callback, vfs_seek_callback, vfs_read_callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
cSampleManager::~cSampleManager(void)
|
cSampleManager::~cSampleManager(void)
|
||||||
@@ -354,6 +402,63 @@ cSampleManager::SetCurrent3DProvider(uint8 nProvider)
|
|||||||
return curprovider;
|
return curprovider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int8
|
||||||
|
cSampleManager::AutoDetect3DProviders()
|
||||||
|
{
|
||||||
|
if (!AudioManager.IsAudioInitialised())
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
int eax = -1, eax2 = -1, eax3 = -1, ds3dh = -1, ds3ds = -1;
|
||||||
|
|
||||||
|
for (uint32 i = 0; i < GetNum3DProvidersAvailable(); i++)
|
||||||
|
{
|
||||||
|
char* providername = Get3DProviderName(i);
|
||||||
|
|
||||||
|
if (!strcasecmp(providername, "CREATIVE LABS EAX (TM)")) {
|
||||||
|
AudioManager.SetCurrent3DProvider(i);
|
||||||
|
if (GetCurrent3DProviderIndex() == i)
|
||||||
|
eax = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcasecmp(providername, "CREATIVE LABS EAX 2 (TM)")) {
|
||||||
|
AudioManager.SetCurrent3DProvider(i);
|
||||||
|
if (GetCurrent3DProviderIndex() == i)
|
||||||
|
eax2 = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcasecmp(providername, "CREATIVE LABS EAX 3 (TM)")) {
|
||||||
|
AudioManager.SetCurrent3DProvider(i);
|
||||||
|
if (GetCurrent3DProviderIndex() == i) {
|
||||||
|
eax3 = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcasecmp(providername, "DIRECTSOUND3D HARDWARE SUPPORT")) {
|
||||||
|
AudioManager.SetCurrent3DProvider(i);
|
||||||
|
if (GetCurrent3DProviderIndex() == i)
|
||||||
|
ds3dh = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strcasecmp(providername, "DIRECTSOUND3D SOFTWARE EMULATION")) {
|
||||||
|
AudioManager.SetCurrent3DProvider(i);
|
||||||
|
if (GetCurrent3DProviderIndex() == i)
|
||||||
|
ds3ds = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (eax3 != -1)
|
||||||
|
return eax3;
|
||||||
|
if (eax2 != -1)
|
||||||
|
return eax2;
|
||||||
|
if (eax != -1)
|
||||||
|
return eax;
|
||||||
|
if (ds3dh != -1)
|
||||||
|
return ds3dh;
|
||||||
|
if (ds3ds != -1)
|
||||||
|
return ds3ds;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_ResolveLink(char const *path, char *out)
|
_ResolveLink(char const *path, char *out)
|
||||||
{
|
{
|
||||||
@@ -450,15 +555,6 @@ _FindMP3s(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE *f = fopen("MP3\\MP3Report.txt", "w");
|
|
||||||
|
|
||||||
if ( f )
|
|
||||||
{
|
|
||||||
fprintf(f, "MP3 Report File\n\n");
|
|
||||||
fprintf(f, "\"%s\"", fd.cFileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ( filepathlen > 4 )
|
if ( filepathlen > 4 )
|
||||||
{
|
{
|
||||||
if ( !strcmp(&filepath[filepathlen - 4], ".lnk") )
|
if ( !strcmp(&filepath[filepathlen - 4], ".lnk") )
|
||||||
@@ -467,12 +563,6 @@ _FindMP3s(void)
|
|||||||
{
|
{
|
||||||
OutputDebugString("Resolving Link");
|
OutputDebugString("Resolving Link");
|
||||||
OutputDebugString(filepath);
|
OutputDebugString(filepath);
|
||||||
|
|
||||||
if ( f ) fprintf(f, " - shortcut to \"%s\"", filepath);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( f ) fprintf(f, " - couldn't resolve shortcut");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bShortcut = true;
|
bShortcut = true;
|
||||||
@@ -496,10 +586,6 @@ _FindMP3s(void)
|
|||||||
if ( _pMP3List == NULL )
|
if ( _pMP3List == NULL )
|
||||||
{
|
{
|
||||||
FindClose(hFind);
|
FindClose(hFind);
|
||||||
|
|
||||||
if ( f )
|
|
||||||
fclose(f);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -522,9 +608,6 @@ _FindMP3s(void)
|
|||||||
{
|
{
|
||||||
_pMP3List->pLinkPath = NULL;
|
_pMP3List->pLinkPath = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( f ) fprintf(f, " - OK\n");
|
|
||||||
|
|
||||||
bInitFirstEntry = false;
|
bInitFirstEntry = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -533,8 +616,6 @@ _FindMP3s(void)
|
|||||||
|
|
||||||
OutputDebugString(filepath);
|
OutputDebugString(filepath);
|
||||||
|
|
||||||
if ( f ) fprintf(f, " - not an MP3 or supported MP3 type\n");
|
|
||||||
|
|
||||||
bInitFirstEntry = true;
|
bInitFirstEntry = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -550,8 +631,6 @@ _FindMP3s(void)
|
|||||||
|
|
||||||
int32 filepathlen = strlen(filepath);
|
int32 filepathlen = strlen(filepath);
|
||||||
|
|
||||||
if ( f ) fprintf(f, "\"%s\"", fd.cFileName);
|
|
||||||
|
|
||||||
if ( filepathlen > 0 )
|
if ( filepathlen > 0 )
|
||||||
{
|
{
|
||||||
if ( filepathlen > 4 )
|
if ( filepathlen > 4 )
|
||||||
@@ -562,12 +641,6 @@ _FindMP3s(void)
|
|||||||
{
|
{
|
||||||
OutputDebugString("Resolving Link");
|
OutputDebugString("Resolving Link");
|
||||||
OutputDebugString(filepath);
|
OutputDebugString(filepath);
|
||||||
|
|
||||||
if ( f ) fprintf(f, " - shortcut to \"%s\"", filepath);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( f ) fprintf(f, " - couldn't resolve shortcut");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bShortcut = true;
|
bShortcut = true;
|
||||||
@@ -578,8 +651,6 @@ _FindMP3s(void)
|
|||||||
|
|
||||||
if ( filepathlen > MAX_PATH )
|
if ( filepathlen > MAX_PATH )
|
||||||
{
|
{
|
||||||
if ( f ) fprintf(f, " - Filename and path too long - %s - IGNORED)\n", filepath);
|
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -619,16 +690,12 @@ _FindMP3s(void)
|
|||||||
|
|
||||||
pList = _pMP3List;
|
pList = _pMP3List;
|
||||||
|
|
||||||
if ( f ) fprintf(f, " - OK\n");
|
|
||||||
|
|
||||||
bInitFirstEntry = false;
|
bInitFirstEntry = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcat(filepath, " - NOT A VALID MP3");
|
strcat(filepath, " - NOT A VALID MP3");
|
||||||
OutputDebugString(filepath);
|
OutputDebugString(filepath);
|
||||||
|
|
||||||
if ( f ) fprintf(f, " - not an MP3 or supported MP3 type\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -641,8 +708,6 @@ _FindMP3s(void)
|
|||||||
|
|
||||||
if ( filepathlen > 0 )
|
if ( filepathlen > 0 )
|
||||||
{
|
{
|
||||||
if ( f ) fprintf(f, "\"%s\"", fd.cFileName);
|
|
||||||
|
|
||||||
if ( filepathlen > 4 )
|
if ( filepathlen > 4 )
|
||||||
{
|
{
|
||||||
if ( !strcmp(&filepath[filepathlen - 4], ".lnk") )
|
if ( !strcmp(&filepath[filepathlen - 4], ".lnk") )
|
||||||
@@ -651,12 +716,6 @@ _FindMP3s(void)
|
|||||||
{
|
{
|
||||||
OutputDebugString("Resolving Link");
|
OutputDebugString("Resolving Link");
|
||||||
OutputDebugString(filepath);
|
OutputDebugString(filepath);
|
||||||
|
|
||||||
if ( f ) fprintf(f, " - shortcut to \"%s\"", filepath);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( f ) fprintf(f, " - couldn't resolve shortcut");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bShortcut = true;
|
bShortcut = true;
|
||||||
@@ -701,26 +760,16 @@ _FindMP3s(void)
|
|||||||
nNumMP3s++;
|
nNumMP3s++;
|
||||||
|
|
||||||
OutputDebugString(fd.cFileName);
|
OutputDebugString(fd.cFileName);
|
||||||
|
|
||||||
if ( f ) fprintf(f, " - OK\n");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcat(filepath, " - NOT A VALID MP3");
|
strcat(filepath, " - NOT A VALID MP3");
|
||||||
OutputDebugString(filepath);
|
OutputDebugString(filepath);
|
||||||
|
|
||||||
if ( f ) fprintf(f, " - not an MP3 or supported MP3 type\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( f )
|
|
||||||
{
|
|
||||||
fprintf(f, "\nTOTAL SUPPORTED MP3s: %d\n", nNumMP3s);
|
|
||||||
fclose(f);
|
|
||||||
}
|
|
||||||
|
|
||||||
FindClose(hFind);
|
FindClose(hFind);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -933,53 +982,36 @@ cSampleManager::Initialise(void)
|
|||||||
AIL_set_preference(DIG_MIXER_CHANNELS, MAX_DIGITAL_MIXER_CHANNELS);
|
AIL_set_preference(DIG_MIXER_CHANNELS, MAX_DIGITAL_MIXER_CHANNELS);
|
||||||
|
|
||||||
DIG = AIL_open_digital_driver(DIGITALRATE, DIGITALBITS, DIGITALCHANNELS, 0);
|
DIG = AIL_open_digital_driver(DIGITALRATE, DIGITALBITS, DIGITALCHANNELS, 0);
|
||||||
if ( DIG == NULL )
|
|
||||||
{
|
|
||||||
OutputDebugString(AIL_last_error());
|
|
||||||
Terminate();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
add_providers();
|
|
||||||
|
|
||||||
if ( !InitialiseSampleBanks() )
|
|
||||||
{
|
|
||||||
Terminate();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
nSampleBankMemoryStartAddress[SFX_BANK_0] = (int32)AIL_mem_alloc_lock(nSampleBankSize[SFX_BANK_0]);
|
|
||||||
if ( !nSampleBankMemoryStartAddress[SFX_BANK_0] )
|
|
||||||
{
|
|
||||||
Terminate();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = (int32)AIL_mem_alloc_lock(PED_BLOCKSIZE*MAX_PEDSFX);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef AUDIO_CACHE
|
#ifdef AUDIO_CACHE
|
||||||
TRACE("cache");
|
TRACE("cache");
|
||||||
FILE *cacheFile = fopen("audio\\sound.cache", "rb");
|
FILE *cacheFile = fcaseopen("audio\\sound.cache", "rb");
|
||||||
|
bool CreateCache = false;
|
||||||
if (cacheFile) {
|
if (cacheFile) {
|
||||||
fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
||||||
fclose(cacheFile);
|
fclose(cacheFile);
|
||||||
m_bInitialised = true;
|
}else
|
||||||
}else {
|
CreateCache = true;
|
||||||
#endif
|
#endif
|
||||||
TRACE("cdrom");
|
|
||||||
|
|
||||||
S32 tatalms;
|
|
||||||
char filepath[MAX_PATH];
|
char filepath[MAX_PATH];
|
||||||
|
bool bFileNotFound;
|
||||||
|
S32 tatalms;
|
||||||
|
|
||||||
|
TRACE("cdrom");
|
||||||
{
|
{
|
||||||
m_bInitialised = false;
|
m_bInitialised = false;
|
||||||
|
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Find path of WAVs (originally in HDD)
|
||||||
int32 drive = 'C';
|
int32 drive = 'C';
|
||||||
|
|
||||||
|
#ifndef NO_CDCHECK
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
char latter[2];
|
char latter[2];
|
||||||
@@ -1000,50 +1032,148 @@ cSampleManager::Initialise(void)
|
|||||||
if ( f )
|
if ( f )
|
||||||
{
|
{
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
strcpy(m_MiscomPath, m_szCDRomRootPath);
|
||||||
bool bFileNotFound = false;
|
break;
|
||||||
|
|
||||||
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
|
||||||
{
|
|
||||||
strcpy(filepath, m_szCDRomRootPath);
|
|
||||||
strcat(filepath, StreamedNameTable[i]);
|
|
||||||
|
|
||||||
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
|
|
||||||
|
|
||||||
if ( mp3Stream[0] )
|
|
||||||
{
|
|
||||||
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
|
|
||||||
|
|
||||||
AIL_close_stream(mp3Stream[0]);
|
|
||||||
mp3Stream[0] = NULL;
|
|
||||||
|
|
||||||
nStreamLength[i] = tatalms;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bFileNotFound = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !bFileNotFound )
|
|
||||||
{
|
|
||||||
m_bInitialised = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_bInitialised = false;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} while ( ++drive <= 'Z' );
|
} while ( ++drive <= 'Z' );
|
||||||
|
#else
|
||||||
|
m_MiscomPath[0] = '\0';
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if ( DIG == NULL )
|
||||||
|
{
|
||||||
|
OutputDebugString(AIL_last_error());
|
||||||
|
Terminate();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
add_providers();
|
||||||
|
|
||||||
|
m_szCDRomRootPath[0] = '\0';
|
||||||
|
|
||||||
|
strcpy(m_WavFilesPath, m_szCDRomRootPath);
|
||||||
|
/*
|
||||||
|
#ifdef AUDIO_CACHE
|
||||||
|
if ( CreateCache )
|
||||||
|
#endif
|
||||||
|
for ( int32 i = STREAMED_SOUND_MISSION_MOBR1; i < TOTAL_STREAMED_SOUNDS; i++ )
|
||||||
|
{
|
||||||
|
strcpy(filepath, m_szCDRomRootPath);
|
||||||
|
strcat(filepath, StreamedNameTable[i]);
|
||||||
|
|
||||||
|
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
|
||||||
|
|
||||||
|
if ( mp3Stream[0] )
|
||||||
|
{
|
||||||
|
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
|
||||||
|
|
||||||
|
AIL_close_stream(mp3Stream[0]);
|
||||||
|
mp3Stream[0] = NULL;
|
||||||
|
|
||||||
|
nStreamLength[i] = tatalms;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_bInitialised = false;
|
||||||
|
Terminate();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
// Find path of MP3s (originally in CD-Rom)
|
||||||
|
// if NO_CDCHECK is NOT defined but AUDIO_CACHE is defined, we still need to find MP3s' path, but will exit after the first file
|
||||||
|
#ifndef NO_CDCHECK
|
||||||
|
int32 drive = 'C';
|
||||||
|
do
|
||||||
|
{
|
||||||
|
latter[0] = drive;
|
||||||
|
latter[1] = '\0';
|
||||||
|
|
||||||
|
strcpy(m_szCDRomRootPath, latter);
|
||||||
|
strcat(m_szCDRomRootPath, ":");
|
||||||
|
strcat(m_MP3FilesPath, m_szCDRomRootPath);
|
||||||
|
#else
|
||||||
|
m_MP3FilesPath[0] = '\0';
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
|
for (int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++)
|
||||||
|
{
|
||||||
|
strcpy(filepath, m_MP3FilesPath);
|
||||||
|
strcat(filepath, StreamedNameTable[i]);
|
||||||
|
|
||||||
|
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
|
||||||
|
|
||||||
|
if (mp3Stream[0])
|
||||||
|
{
|
||||||
|
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
|
||||||
|
|
||||||
|
AIL_close_stream(mp3Stream[0]);
|
||||||
|
mp3Stream[0] = NULL;
|
||||||
|
|
||||||
|
bFileNotFound = false;
|
||||||
|
#ifdef AUDIO_CACHE
|
||||||
|
if (!CreateCache)
|
||||||
|
break;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
nStreamLength[i] = tatalms;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bFileNotFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef NO_CDCHECK
|
||||||
|
if (!bFileNotFound) // otherwise try next drive
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
while (++drive <= 'Z');
|
||||||
|
#else
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if ( !bFileNotFound ) {
|
||||||
|
/*
|
||||||
|
#ifdef AUDIO_CACHE
|
||||||
|
if ( CreateCache )
|
||||||
|
#endif
|
||||||
|
for ( int32 i = STREAMED_SOUND_MISSION_COMPLETED4; i < STREAMED_SOUND_MISSION_PAGER; i++ )
|
||||||
|
{
|
||||||
|
strcpy(filepath, m_MiscomPath);
|
||||||
|
strcat(filepath, StreamedNameTable[i]);
|
||||||
|
|
||||||
|
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
|
||||||
|
|
||||||
|
if ( mp3Stream[0] )
|
||||||
|
{
|
||||||
|
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
|
||||||
|
|
||||||
|
AIL_close_stream(mp3Stream[0]);
|
||||||
|
mp3Stream[0] = NULL;
|
||||||
|
|
||||||
|
nStreamLength[i] = tatalms;
|
||||||
|
bFileNotFound = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bFileNotFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
m_bInitialised = !bFileNotFound;
|
||||||
|
|
||||||
if ( !m_bInitialised )
|
if ( !m_bInitialised )
|
||||||
{
|
{
|
||||||
#if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
|
#if !defined(GTA3_STEAM_PATCH) && !defined(NO_CDCHECK)
|
||||||
FrontEndMenuManager.WaitForUserCD();
|
FrontEndMenuManager.WaitForUserCD();
|
||||||
if ( FrontEndMenuManager.m_bQuitGameNoCD )
|
if ( FrontEndMenuManager.m_bQuitGameNoCD )
|
||||||
{
|
{
|
||||||
@@ -1060,77 +1190,31 @@ cSampleManager::Initialise(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GTA_VERSION >= GTA3_PC_11 || defined(NO_CDCHECK)
|
|
||||||
// hddaudio
|
|
||||||
/**
|
|
||||||
Option for user to play audio files directly from hard disk.
|
|
||||||
Copy the contents of the PLAY discs Audio directory into your installed Grand Theft Auto III Audio directory.
|
|
||||||
Grand Theft Auto III still requires the presence of the PLAY disc when started.
|
|
||||||
This may give better performance on some machines (though worse on others).
|
|
||||||
**/
|
|
||||||
TRACE("hddaudio 1.1 patch");
|
|
||||||
{
|
|
||||||
int32 streamLength[TOTAL_STREAMED_SOUNDS];
|
|
||||||
|
|
||||||
bool bFileNotFound = false;
|
|
||||||
char rootpath[MAX_PATH];
|
|
||||||
|
|
||||||
strcpy(_aHDDPath, m_szCDRomRootPath);
|
|
||||||
rootpath[0] = '\0';
|
|
||||||
|
|
||||||
FILE *f = fopen(StreamedNameTable[0], "rb");
|
|
||||||
|
|
||||||
if ( f )
|
|
||||||
{
|
|
||||||
fclose(f);
|
|
||||||
|
|
||||||
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
|
||||||
{
|
|
||||||
strcpy(filepath, rootpath);
|
|
||||||
strcat(filepath, StreamedNameTable[i]);
|
|
||||||
|
|
||||||
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
|
|
||||||
|
|
||||||
if ( mp3Stream[0] )
|
|
||||||
{
|
|
||||||
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
|
|
||||||
|
|
||||||
AIL_close_stream(mp3Stream[0]);
|
|
||||||
mp3Stream[0] = NULL;
|
|
||||||
|
|
||||||
streamLength[i] = tatalms;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bFileNotFound = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
bFileNotFound = true;
|
|
||||||
|
|
||||||
if ( !bFileNotFound )
|
|
||||||
{
|
|
||||||
strcpy(m_szCDRomRootPath, rootpath);
|
|
||||||
|
|
||||||
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
|
||||||
nStreamLength[i] = streamLength[i];
|
|
||||||
|
|
||||||
_bUseHDDAudio = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
_bUseHDDAudio = false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#ifdef AUDIO_CACHE
|
#ifdef AUDIO_CACHE
|
||||||
cacheFile = fopen("audio\\sound.cache", "wb");
|
if (CreateCache) {
|
||||||
fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
cacheFile = fcaseopen("audio\\sound.cache", "wb");
|
||||||
fclose(cacheFile);
|
fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
||||||
|
fclose(cacheFile);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if ( !InitialiseSampleBanks() )
|
||||||
|
{
|
||||||
|
Terminate();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
nSampleBankMemoryStartAddress[SFX_BANK_0] = (int32)AIL_mem_alloc_lock(nSampleBankSize[SFX_BANK_0]);
|
||||||
|
if ( !nSampleBankMemoryStartAddress[SFX_BANK_0] )
|
||||||
|
{
|
||||||
|
Terminate();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = (int32)AIL_mem_alloc_lock(PED_BLOCKSIZE*MAX_PEDSFX);
|
||||||
|
|
||||||
|
LoadSampleBank(SFX_BANK_0);
|
||||||
|
|
||||||
TRACE("stream");
|
TRACE("stream");
|
||||||
{
|
{
|
||||||
for ( int32 i = 0; i < MAX_STREAMS; i++ )
|
for ( int32 i = 0; i < MAX_STREAMS; i++ )
|
||||||
@@ -1159,7 +1243,7 @@ cSampleManager::Initialise(void)
|
|||||||
|
|
||||||
while ( n < m_nNumberOfProviders )
|
while ( n < m_nNumberOfProviders )
|
||||||
{
|
{
|
||||||
if ( !strcmp(providers[n].name, "Miles Fast 2D Positional Audio") )
|
if ( !strcmp(strupr(providers[n].name), "DIRECTSOUND3D SOFTWARE EMULATION") )
|
||||||
{
|
{
|
||||||
set_new_provider(n);
|
set_new_provider(n);
|
||||||
break;
|
break;
|
||||||
@@ -1174,10 +1258,6 @@ cSampleManager::Initialise(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("bank");
|
|
||||||
|
|
||||||
LoadSampleBank(SFX_BANK_0);
|
|
||||||
|
|
||||||
// mp3
|
// mp3
|
||||||
TRACE("mp3");
|
TRACE("mp3");
|
||||||
{
|
{
|
||||||
@@ -1297,60 +1377,42 @@ cSampleManager::Terminate(void)
|
|||||||
bool
|
bool
|
||||||
cSampleManager::CheckForAnAudioFileOnCD(void)
|
cSampleManager::CheckForAnAudioFileOnCD(void)
|
||||||
{
|
{
|
||||||
#if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
|
#if !defined(NO_CDCHECK) // TODO: check steam, probably GTAVC_STEAM_PATCH needs to be added
|
||||||
char filepath[MAX_PATH];
|
char filepath[MAX_PATH];
|
||||||
|
|
||||||
#if GTA_VERSION >= GTA3_PC_11
|
strcpy(filepath, m_MiscomPath);
|
||||||
if (_bUseHDDAudio)
|
strcat(filepath, StreamedNameTable[STREAMED_SOUND_MISSION_COMPLETED4]);
|
||||||
strcpy(filepath, _aHDDPath);
|
|
||||||
else
|
|
||||||
strcpy(filepath, m_szCDRomRootPath);
|
|
||||||
#else
|
|
||||||
strcpy(filepath, m_szCDRomRootPath);
|
|
||||||
#endif // #if GTA_VERSION >= GTA3_PC_11
|
|
||||||
|
|
||||||
strcat(filepath, StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]);
|
|
||||||
|
|
||||||
FILE *f = fopen(filepath, "rb");
|
FILE *f = fopen(filepath, "rb");
|
||||||
|
|
||||||
if ( f )
|
if ( f )
|
||||||
{
|
{
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
DMAudio.SetMusicMasterVolume(FrontEndMenuManager.m_PrefsMusicVolume);
|
||||||
|
DMAudio.SetEffectsMasterVolume(FrontEndMenuManager.m_PrefsSfxVolume);
|
||||||
|
DMAudio.Service();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DMAudio.SetMusicMasterVolume(0);
|
||||||
|
DMAudio.SetEffectsMasterVolume(0);
|
||||||
|
DMAudio.Service();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
return true;
|
return true;
|
||||||
#endif // #if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
|
#endif // #if !defined(NO_CDCHECK)
|
||||||
}
|
}
|
||||||
|
|
||||||
char
|
char
|
||||||
cSampleManager::GetCDAudioDriveLetter(void)
|
cSampleManager::GetCDAudioDriveLetter(void)
|
||||||
{
|
{
|
||||||
#if GTA_VERSION >= GTA3_PC_11 || defined(NO_CDCHECK)
|
if ( strlen(m_MiscomPath) != 0 )
|
||||||
if (_bUseHDDAudio)
|
return m_MiscomPath[0];
|
||||||
{
|
|
||||||
if ( strlen(_aHDDPath) != 0 )
|
|
||||||
return _aHDDPath[0];
|
|
||||||
else
|
|
||||||
return '\0';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( strlen(m_szCDRomRootPath) != 0 )
|
|
||||||
return m_szCDRomRootPath[0];
|
|
||||||
else
|
|
||||||
return '\0';
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if ( strlen(m_szCDRomRootPath) != 0 )
|
|
||||||
return m_szCDRomRootPath[0];
|
|
||||||
else
|
else
|
||||||
return '\0';
|
return '\0';
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1402,6 +1464,12 @@ cSampleManager::SetMusicMasterVolume(uint8 nVolume)
|
|||||||
m_nMusicVolume = nVolume;
|
m_nMusicVolume = nVolume;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cSampleManager::SetMP3BoostVolume(uint8 nVolume)
|
||||||
|
{
|
||||||
|
m_nMP3BoostVolume = nVolume;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::SetEffectsFadeVolume(uint8 nVolume)
|
cSampleManager::SetEffectsFadeVolume(uint8 nVolume)
|
||||||
{
|
{
|
||||||
@@ -1512,14 +1580,6 @@ cSampleManager::LoadPedComment(uint32 nComment)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case MUSICMODE_FRONTEND:
|
|
||||||
{
|
|
||||||
if ( MusicManager.GetCurrentTrack() == STREAMED_SOUND_GAME_COMPLETED )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1583,68 +1643,44 @@ cSampleManager::UpdateReverb(void)
|
|||||||
if ( AudioManager.GetFrameCounter() & 15 )
|
if ( AudioManager.GetFrameCounter() & 15 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
float y = AudioManager.GetReflectionsDistance(REFLECTION_TOP) + AudioManager.GetReflectionsDistance(REFLECTION_BOTTOM);
|
float fRatio = 0.0f;
|
||||||
float x = AudioManager.GetReflectionsDistance(REFLECTION_LEFT) + AudioManager.GetReflectionsDistance(REFLECTION_RIGHT);
|
|
||||||
float z = AudioManager.GetReflectionsDistance(REFLECTION_UP);
|
|
||||||
|
|
||||||
float normy = norm(y, 5.0f, 40.0f);
|
#define MIN_DIST 0.5f
|
||||||
float normx = norm(x, 5.0f, 40.0f);
|
#define CALCULATE_RATIO(value, maxDist, maxRatio) (value > MIN_DIST && value < maxDist ? value / maxDist * maxRatio : 0)
|
||||||
float normz = norm(z, 5.0f, 40.0f);
|
|
||||||
|
|
||||||
float fRatio;
|
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_NORTH), 10.0f, 1/2.f);
|
||||||
|
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_SOUTH), 10.0f, 1/2.f);
|
||||||
|
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_WEST), 10.0f, 1/2.f);
|
||||||
|
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_EAST), 10.0f, 1/2.f);
|
||||||
|
|
||||||
if ( normy == 0.0f )
|
fRatio += CALCULATE_RATIO((AudioManager.GetReflectionsDistance(REFLECTION_NORTH) + AudioManager.GetReflectionsDistance(REFLECTION_SOUTH)) / 2.f, 4.0f, 1/3.f);
|
||||||
{
|
fRatio += CALCULATE_RATIO((AudioManager.GetReflectionsDistance(REFLECTION_WEST) + AudioManager.GetReflectionsDistance(REFLECTION_EAST)) / 2.f, 4.0f, 1/3.f);
|
||||||
if ( normx == 0.0f )
|
|
||||||
{
|
|
||||||
if ( normz == 0.0f )
|
|
||||||
fRatio = 0.3f;
|
|
||||||
else
|
|
||||||
fRatio = 0.5f;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fRatio = 0.3f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( normx == 0.0f )
|
|
||||||
{
|
|
||||||
if ( normz == 0.0f )
|
|
||||||
fRatio = 0.3f;
|
|
||||||
else
|
|
||||||
fRatio = 0.5f;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( normz == 0.0f )
|
|
||||||
fRatio = 0.3f;
|
|
||||||
else
|
|
||||||
fRatio = (normy+normx+normz) / 3.0f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fRatio = clamp(fRatio, usingEAX3==1 ? 0.0f : 0.30f, 1.0f);
|
#undef CALCULATE_RATIO
|
||||||
|
#undef MIN_DIST
|
||||||
|
|
||||||
|
fRatio = clamp(fRatio, 0.0f, 0.6f);
|
||||||
|
|
||||||
if ( fRatio == _fPrevEaxRatioDestination )
|
if ( fRatio == _fPrevEaxRatioDestination )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ( usingEAX3 )
|
if ( usingEAX3 )
|
||||||
{
|
{
|
||||||
|
fRatio = Min(fRatio * 1.67f, 1.0f);
|
||||||
if ( EAX3ListenerInterpolate(&StartEAX3, &FinishEAX3, fRatio, &EAX3Params, false) )
|
if ( EAX3ListenerInterpolate(&StartEAX3, &FinishEAX3, fRatio, &EAX3Params, false) )
|
||||||
{
|
{
|
||||||
AIL_set_3D_provider_preference(opened_provider, "EAX all parameters", &EAX3Params);
|
AIL_set_3D_provider_preference(opened_provider, "EAX all parameters", &EAX3Params);
|
||||||
_fEffectsLevel = 1.0f - fRatio * 0.5f;
|
_fEffectsLevel = fRatio * 0.75f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( _usingMilesFast2D )
|
if ( _usingMilesFast2D )
|
||||||
_fEffectsLevel = (1.0f - fRatio) * 0.4f;
|
_fEffectsLevel = fRatio * 0.8f;
|
||||||
else
|
else
|
||||||
_fEffectsLevel = (1.0f - fRatio) * 0.7f;
|
_fEffectsLevel = fRatio * 0.22f;
|
||||||
}
|
}
|
||||||
|
_fEffectsLevel = Min(_fEffectsLevel, 1.0f);
|
||||||
|
|
||||||
_fPrevEaxRatioDestination = fRatio;
|
_fPrevEaxRatioDestination = fRatio;
|
||||||
|
|
||||||
@@ -1753,11 +1789,11 @@ cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume)
|
|||||||
nChannelVolume[nChannel] = vol;
|
nChannelVolume[nChannel] = vol;
|
||||||
|
|
||||||
// increase the volume for JB.MP3 and S4_BDBD.MP3
|
// increase the volume for JB.MP3 and S4_BDBD.MP3
|
||||||
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
|
if (MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE ) {
|
||||||
&& MusicManager.GetCurrentTrack() != STREAMED_SOUND_NEWS_INTRO
|
if (MusicManager.GetCurrentTrack() == STREAMED_SOUND_CUTSCENE_FINALE)
|
||||||
&& MusicManager.GetCurrentTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
|
nChannelVolume[nChannel] = 0;
|
||||||
{
|
else
|
||||||
nChannelVolume[nChannel] >>= 2;
|
nChannelVolume[nChannel] >>= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( opened_samples[nChannel] )
|
if ( opened_samples[nChannel] )
|
||||||
@@ -1793,8 +1829,7 @@ cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume)
|
|||||||
|
|
||||||
// increase the volume for JB.MP3 and S4_BDBD.MP3
|
// increase the volume for JB.MP3 and S4_BDBD.MP3
|
||||||
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
|
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
|
||||||
&& MusicManager.GetCurrentTrack() != STREAMED_SOUND_NEWS_INTRO
|
&& MusicManager.GetCurrentTrack() != STREAMED_SOUND_CUTSCENE_FINALE )
|
||||||
&& MusicManager.GetCurrentTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
|
|
||||||
{
|
{
|
||||||
nChannelVolume[nChannel] >>= 2;
|
nChannelVolume[nChannel] >>= 2;
|
||||||
}
|
}
|
||||||
@@ -1994,7 +2029,7 @@ cSampleManager::StopChannel(uint32 nChannel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
|
cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
|
||||||
{
|
{
|
||||||
if ( m_bInitialised )
|
if ( m_bInitialised )
|
||||||
{
|
{
|
||||||
@@ -2008,7 +2043,7 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
|
|||||||
|
|
||||||
char filepath[MAX_PATH];
|
char filepath[MAX_PATH];
|
||||||
|
|
||||||
strcpy(filepath, m_szCDRomRootPath);
|
strcpy(filepath, m_MP3FilesPath);
|
||||||
strcat(filepath, StreamedNameTable[nFile]);
|
strcat(filepath, StreamedNameTable[nFile]);
|
||||||
|
|
||||||
mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
|
mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
|
||||||
@@ -2045,7 +2080,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
||||||
{
|
{
|
||||||
uint32 position = nPos;
|
uint32 position = nPos;
|
||||||
char filename[MAX_PATH];
|
char filename[MAX_PATH];
|
||||||
@@ -2074,14 +2109,15 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
if(mp3 == NULL) {
|
if(mp3 == NULL) {
|
||||||
_bIsMp3Active = false;
|
_bIsMp3Active = false;
|
||||||
nFile = 0;
|
nFile = 0;
|
||||||
strcpy(filename, m_szCDRomRootPath);
|
strcpy(filename, m_MiscomPath);
|
||||||
strcat(filename, StreamedNameTable[nFile]);
|
strcat(filename, StreamedNameTable[nFile]);
|
||||||
|
|
||||||
mp3Stream[nStream] =
|
mp3Stream[nStream] =
|
||||||
AIL_open_stream(DIG, filename, 0);
|
AIL_open_stream(DIG, filename, 0);
|
||||||
if(mp3Stream[nStream]) {
|
if(mp3Stream[nStream]) {
|
||||||
AIL_set_stream_loop_count(
|
AIL_set_stream_loop_count(
|
||||||
mp3Stream[nStream], 1);
|
mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
|
||||||
|
nStreamLoopedFlag[nStream] = true;
|
||||||
AIL_set_stream_ms_position(
|
AIL_set_stream_ms_position(
|
||||||
mp3Stream[nStream], position);
|
mp3Stream[nStream], position);
|
||||||
AIL_pause_stream(mp3Stream[nStream],
|
AIL_pause_stream(mp3Stream[nStream],
|
||||||
@@ -2123,15 +2159,14 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
if ( e == NULL )
|
if ( e == NULL )
|
||||||
{
|
{
|
||||||
nFile = 0;
|
nFile = 0;
|
||||||
strcpy(filename, m_szCDRomRootPath);
|
strcpy(filename, m_MiscomPath);
|
||||||
strcat(filename, StreamedNameTable[nFile]);
|
strcat(filename, StreamedNameTable[nFile]);
|
||||||
mp3Stream[nStream] =
|
mp3Stream[nStream] =
|
||||||
AIL_open_stream(DIG, filename, 0);
|
AIL_open_stream(DIG, filename, 0);
|
||||||
if(mp3Stream[nStream]) {
|
if(mp3Stream[nStream]) {
|
||||||
AIL_set_stream_loop_count(
|
AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
|
||||||
mp3Stream[nStream], 1);
|
nStreamLoopedFlag[nStream] = true;
|
||||||
AIL_set_stream_ms_position(
|
AIL_set_stream_ms_position(mp3Stream[nStream], position);
|
||||||
mp3Stream[nStream], position);
|
|
||||||
AIL_pause_stream(mp3Stream[nStream], 0);
|
AIL_pause_stream(mp3Stream[nStream], 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -2169,13 +2204,14 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
nFile = 0;
|
nFile = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(filename, m_szCDRomRootPath);
|
strcpy(filename, m_MiscomPath);
|
||||||
strcat(filename, StreamedNameTable[nFile]);
|
strcat(filename, StreamedNameTable[nFile]);
|
||||||
|
|
||||||
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
|
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
|
||||||
if ( mp3Stream[nStream] )
|
if ( mp3Stream[nStream] )
|
||||||
{
|
{
|
||||||
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
|
AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
|
||||||
|
nStreamLoopedFlag[nStream] = true;
|
||||||
AIL_set_stream_ms_position(mp3Stream[nStream], position);
|
AIL_set_stream_ms_position(mp3Stream[nStream], position);
|
||||||
AIL_pause_stream(mp3Stream[nStream], 0);
|
AIL_pause_stream(mp3Stream[nStream], 0);
|
||||||
return true;
|
return true;
|
||||||
@@ -2239,11 +2275,14 @@ void
|
|||||||
cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream)
|
cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream)
|
||||||
{
|
{
|
||||||
uint8 vol = nVolume;
|
uint8 vol = nVolume;
|
||||||
|
float boostMult = 0.0f;
|
||||||
|
|
||||||
if ( m_bInitialised )
|
if ( m_bInitialised )
|
||||||
{
|
{
|
||||||
if ( vol > MAX_VOLUME ) vol = MAX_VOLUME;
|
if ( vol > MAX_VOLUME ) vol = MAX_VOLUME;
|
||||||
if ( vol > MAX_VOLUME ) vol = MAX_VOLUME;
|
|
||||||
|
if ( MusicManager.GetRadioInCar() == USERTRACK && !MusicManager.CheckForMusicInterruptions() )
|
||||||
|
boostMult = m_nMP3BoostVolume / 64.f;
|
||||||
|
|
||||||
nStreamVolume[nStream] = vol;
|
nStreamVolume[nStream] = vol;
|
||||||
nStreamPan[nStream] = nPan;
|
nStreamPan[nStream] = nPan;
|
||||||
@@ -2251,9 +2290,14 @@ cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffect
|
|||||||
if ( mp3Stream[nStream] )
|
if ( mp3Stream[nStream] )
|
||||||
{
|
{
|
||||||
if ( nEffectFlag )
|
if ( nEffectFlag )
|
||||||
AIL_set_stream_volume(mp3Stream[nStream], m_nEffectsFadeVolume*vol*m_nEffectsVolume >> 14);
|
{
|
||||||
|
if ( nStream == 1 || nStream == 2 )
|
||||||
|
AIL_set_stream_volume(mp3Stream[nStream], 128*vol*m_nEffectsVolume >> 14);
|
||||||
|
else
|
||||||
|
AIL_set_stream_volume(mp3Stream[nStream], m_nEffectsFadeVolume*vol*m_nEffectsVolume >> 14);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
AIL_set_stream_volume(mp3Stream[nStream], m_nMusicFadeVolume*vol*m_nMusicVolume >> 14);
|
AIL_set_stream_volume(mp3Stream[nStream], (m_nMusicFadeVolume*vol*(uint32)(m_nMusicVolume * boostMult + m_nMusicVolume)) >> 14);
|
||||||
|
|
||||||
AIL_set_stream_pan(mp3Stream[nStream], nPan);
|
AIL_set_stream_pan(mp3Stream[nStream], nPan);
|
||||||
}
|
}
|
||||||
@@ -2331,4 +2375,12 @@ cSampleManager::InitialiseSampleBanks(void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
cSampleManager::SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nChannel)
|
||||||
|
{
|
||||||
|
if (m_bInitialised)
|
||||||
|
nStreamLoopedFlag[nChannel] = nLoopFlag;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -113,6 +113,11 @@ cSampleManager::SetMusicMasterVolume(uint8 nVolume)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cSampleManager::SetMusicMasterVolume(uint8 nVolume)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::SetEffectsFadeVolume(uint8 nVolume)
|
cSampleManager::SetEffectsFadeVolume(uint8 nVolume)
|
||||||
{
|
{
|
||||||
@@ -297,7 +302,7 @@ cSampleManager::StopChannel(uint32 nChannel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
|
cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
|
||||||
{
|
{
|
||||||
ASSERT( nStream < MAX_STREAMS );
|
ASSERT( nStream < MAX_STREAMS );
|
||||||
}
|
}
|
||||||
@@ -315,7 +320,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
||||||
{
|
{
|
||||||
ASSERT( nStream < MAX_STREAMS );
|
ASSERT( nStream < MAX_STREAMS );
|
||||||
|
|
||||||
@@ -365,4 +370,14 @@ cSampleManager::InitialiseSampleBanks(void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cSampleManager::SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nChannel)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
int8 cSampleManager::AutoDetect3DProviders()
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,17 +1,11 @@
|
|||||||
//#define JUICY_OAL
|
//#define JUICY_OAL
|
||||||
|
|
||||||
#ifdef AUDIO_OAL
|
#ifdef AUDIO_OAL
|
||||||
#include "sampman.h"
|
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "eax.h"
|
#include "eax.h"
|
||||||
#include "eax-util.h"
|
#include "eax-util.h"
|
||||||
|
|
||||||
#define WITHWINDOWS
|
|
||||||
#include "common.h"
|
|
||||||
#include "crossplatform.h"
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <AL/al.h>
|
#include <AL/al.h>
|
||||||
@@ -19,8 +13,24 @@
|
|||||||
#include <AL/alext.h>
|
#include <AL/alext.h>
|
||||||
#include <AL/efx.h>
|
#include <AL/efx.h>
|
||||||
#include <AL/efx-presets.h>
|
#include <AL/efx-presets.h>
|
||||||
|
|
||||||
|
// for user MP3s
|
||||||
|
#include <direct.h>
|
||||||
|
#include <shlobj.h>
|
||||||
|
#include <shlguid.h>
|
||||||
|
#else
|
||||||
|
#define _getcwd getcwd
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK
|
||||||
|
#pragma comment( lib, "OpenAL32.lib" )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "crossplatform.h"
|
||||||
|
|
||||||
|
#include "sampman.h"
|
||||||
|
|
||||||
#include "oal/oal_utils.h"
|
#include "oal/oal_utils.h"
|
||||||
#include "oal/aldlist.h"
|
#include "oal/aldlist.h"
|
||||||
#include "oal/channel.h"
|
#include "oal/channel.h"
|
||||||
@@ -30,7 +40,7 @@
|
|||||||
#include "MusicManager.h"
|
#include "MusicManager.h"
|
||||||
#include "Frontend.h"
|
#include "Frontend.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
#ifdef AUDIO_OPUS
|
#ifdef AUDIO_OAL_USE_OPUS
|
||||||
#include <opusfile.h>
|
#include <opusfile.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -38,19 +48,6 @@
|
|||||||
//TODO: max channels
|
//TODO: max channels
|
||||||
//TODO: loop count
|
//TODO: loop count
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#pragma comment( lib, "OpenAL32.lib" )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// for user MP3s
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <direct.h>
|
|
||||||
#include <shobjidl.h>
|
|
||||||
#include <shlguid.h>
|
|
||||||
#else
|
|
||||||
#define _getcwd getcwd
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cSampleManager SampleManager;
|
cSampleManager SampleManager;
|
||||||
bool _bSampmanInitialised = false;
|
bool _bSampmanInitialised = false;
|
||||||
|
|
||||||
@@ -83,7 +80,7 @@ char SampleBankDescFilename[] = "audio/sfx.SDT";
|
|||||||
char SampleBankDataFilename[] = "audio/sfx.RAW";
|
char SampleBankDataFilename[] = "audio/sfx.RAW";
|
||||||
|
|
||||||
FILE *fpSampleDescHandle;
|
FILE *fpSampleDescHandle;
|
||||||
#ifdef AUDIO_OPUS
|
#ifdef OPUS_SFX
|
||||||
OggOpusFile *fpSampleDataHandle;
|
OggOpusFile *fpSampleDataHandle;
|
||||||
#else
|
#else
|
||||||
FILE *fpSampleDataHandle;
|
FILE *fpSampleDataHandle;
|
||||||
@@ -102,7 +99,7 @@ CChannel aChannel[MAXCHANNELS+MAX2DCHANNELS];
|
|||||||
uint8 nChannelVolume[MAXCHANNELS+MAX2DCHANNELS];
|
uint8 nChannelVolume[MAXCHANNELS+MAX2DCHANNELS];
|
||||||
|
|
||||||
uint32 nStreamLength[TOTAL_STREAMED_SOUNDS];
|
uint32 nStreamLength[TOTAL_STREAMED_SOUNDS];
|
||||||
ALuint ALStreamSources[MAX_STREAMS];
|
ALuint ALStreamSources[MAX_STREAMS][2];
|
||||||
ALuint ALStreamBuffers[MAX_STREAMS][NUM_STREAMBUFFERS];
|
ALuint ALStreamBuffers[MAX_STREAMS][NUM_STREAMBUFFERS];
|
||||||
|
|
||||||
struct tMP3Entry
|
struct tMP3Entry
|
||||||
@@ -245,9 +242,9 @@ release_existing()
|
|||||||
if (stream)
|
if (stream)
|
||||||
stream->ProviderTerm();
|
stream->ProviderTerm();
|
||||||
|
|
||||||
alDeleteSources(1, &ALStreamSources[i]);
|
|
||||||
alDeleteBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]);
|
alDeleteBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]);
|
||||||
}
|
}
|
||||||
|
alDeleteSources(MAX_STREAMS*2, ALStreamSources[0]);
|
||||||
|
|
||||||
CChannel::DestroyChannels();
|
CChannel::DestroyChannels();
|
||||||
|
|
||||||
@@ -287,7 +284,10 @@ set_new_provider(int index)
|
|||||||
//TODO:
|
//TODO:
|
||||||
_maxSamples = MAXCHANNELS;
|
_maxSamples = MAXCHANNELS;
|
||||||
|
|
||||||
ALCint attr[] = {ALC_FREQUENCY,MAX_FREQ,0};
|
ALCint attr[] = {ALC_FREQUENCY,MAX_FREQ,
|
||||||
|
ALC_MONO_SOURCES, MAX_STREAMS * 2 + MAXCHANNELS,
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
|
||||||
ALDevice = alcOpenDevice(providers[index].id);
|
ALDevice = alcOpenDevice(providers[index].id);
|
||||||
ASSERT(ALDevice != NULL);
|
ASSERT(ALDevice != NULL);
|
||||||
@@ -320,10 +320,16 @@ set_new_provider(int index)
|
|||||||
alGenEffects(1, &ALEffect);
|
alGenEffects(1, &ALEffect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alGenSources(MAX_STREAMS*2, ALStreamSources[0]);
|
||||||
for ( int32 i = 0; i < MAX_STREAMS; i++ )
|
for ( int32 i = 0; i < MAX_STREAMS; i++ )
|
||||||
{
|
{
|
||||||
alGenSources(1, &ALStreamSources[i]);
|
|
||||||
alGenBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]);
|
alGenBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]);
|
||||||
|
alSourcei(ALStreamSources[i][0], AL_SOURCE_RELATIVE, AL_TRUE);
|
||||||
|
alSource3f(ALStreamSources[i][0], AL_POSITION, 0.0f, 0.0f, 0.0f);
|
||||||
|
alSourcef(ALStreamSources[i][0], AL_GAIN, 1.0f);
|
||||||
|
alSourcei(ALStreamSources[i][1], AL_SOURCE_RELATIVE, AL_TRUE);
|
||||||
|
alSource3f(ALStreamSources[i][1], AL_POSITION, 0.0f, 0.0f, 0.0f);
|
||||||
|
alSourcef(ALStreamSources[i][1], AL_GAIN, 1.0f);
|
||||||
|
|
||||||
CStream *stream = aStream[i];
|
CStream *stream = aStream[i];
|
||||||
if (stream)
|
if (stream)
|
||||||
@@ -384,6 +390,12 @@ set_new_provider(int index)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
|
IsThisTrackAt16KHz(uint32 track)
|
||||||
|
{
|
||||||
|
return false;// track == STREAMED_SOUND_RADIO_KCHAT || track == STREAMED_SOUND_RADIO_VCPR || track == STREAMED_SOUND_RADIO_POLICE;
|
||||||
|
}
|
||||||
|
|
||||||
cSampleManager::cSampleManager(void)
|
cSampleManager::cSampleManager(void)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
@@ -446,6 +458,31 @@ int8 cSampleManager::SetCurrent3DProvider(uint8 nProvider)
|
|||||||
return curprovider;
|
return curprovider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int8
|
||||||
|
cSampleManager::AutoDetect3DProviders()
|
||||||
|
{
|
||||||
|
if (!AudioManager.IsAudioInitialised())
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (defaultProvider >= 0 && defaultProvider < m_nNumberOfProviders) {
|
||||||
|
if (set_new_provider(defaultProvider))
|
||||||
|
return defaultProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (uint32 i = 0; i < GetNum3DProvidersAvailable(); i++)
|
||||||
|
{
|
||||||
|
char* providername = Get3DProviderName(i);
|
||||||
|
|
||||||
|
if (!strcasecmp(providername, "OPENAL SOFT")) {
|
||||||
|
SetCurrent3DProvider(i);
|
||||||
|
if (GetCurrent3DProviderIndex() == i)
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_ResolveLink(char const *path, char *out)
|
_ResolveLink(char const *path, char *out)
|
||||||
{
|
{
|
||||||
@@ -956,15 +993,17 @@ cSampleManager::Initialise(void)
|
|||||||
#ifdef AUDIO_CACHE
|
#ifdef AUDIO_CACHE
|
||||||
FILE *cacheFile = fcaseopen("audio\\sound.cache", "rb");
|
FILE *cacheFile = fcaseopen("audio\\sound.cache", "rb");
|
||||||
if (cacheFile) {
|
if (cacheFile) {
|
||||||
|
debug("Loadind audio cache (If game crashes around here, then your cache is corrupted, remove audio/sound.cache)\n");
|
||||||
fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
||||||
fclose(cacheFile);
|
fclose(cacheFile);
|
||||||
} else
|
} else
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
|
debug("Cannot load audio cache\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
||||||
{
|
{
|
||||||
aStream[0] = new CStream(StreamedNameTable[i], ALStreamSources[0], ALStreamBuffers[0]);
|
aStream[0] = new CStream(StreamedNameTable[i], ALStreamSources[0], ALStreamBuffers[0], IsThisTrackAt16KHz(i) ? 16000 : 32000);
|
||||||
|
|
||||||
if ( aStream[0] && aStream[0]->IsOpened() )
|
if ( aStream[0] && aStream[0]->IsOpened() )
|
||||||
{
|
{
|
||||||
@@ -979,10 +1018,15 @@ cSampleManager::Initialise(void)
|
|||||||
}
|
}
|
||||||
#ifdef AUDIO_CACHE
|
#ifdef AUDIO_CACHE
|
||||||
cacheFile = fcaseopen("audio\\sound.cache", "wb");
|
cacheFile = fcaseopen("audio\\sound.cache", "wb");
|
||||||
fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
if(cacheFile) {
|
||||||
fclose(cacheFile);
|
debug("Saving audio cache\n");
|
||||||
#endif
|
fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
||||||
|
fclose(cacheFile);
|
||||||
|
} else {
|
||||||
|
debug("Cannot save audio cache\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
if ( !InitialiseSampleBanks() )
|
if ( !InitialiseSampleBanks() )
|
||||||
@@ -1165,6 +1209,12 @@ cSampleManager::SetMusicMasterVolume(uint8 nVolume)
|
|||||||
m_nMusicVolume = nVolume;
|
m_nMusicVolume = nVolume;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cSampleManager::SetMP3BoostVolume(uint8 nVolume)
|
||||||
|
{
|
||||||
|
m_nMP3BoostVolume = nVolume;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::SetEffectsFadeVolume(uint8 nVolume)
|
cSampleManager::SetEffectsFadeVolume(uint8 nVolume)
|
||||||
{
|
{
|
||||||
@@ -1199,7 +1249,7 @@ cSampleManager::LoadSampleBank(uint8 nBank)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef AUDIO_OPUS
|
#ifdef OPUS_SFX
|
||||||
int samplesRead = 0;
|
int samplesRead = 0;
|
||||||
int samplesSize = nSampleBankSize[nBank] / 2;
|
int samplesSize = nSampleBankSize[nBank] / 2;
|
||||||
op_pcm_seek(fpSampleDataHandle, 0);
|
op_pcm_seek(fpSampleDataHandle, 0);
|
||||||
@@ -1301,23 +1351,15 @@ cSampleManager::LoadPedComment(uint32 nComment)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case MUSICMODE_FRONTEND:
|
|
||||||
{
|
|
||||||
if ( MusicManager.GetCurrentTrack() == STREAMED_SOUND_GAME_COMPLETED )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef AUDIO_OPUS
|
#ifdef OPUS_SFX
|
||||||
int samplesRead = 0;
|
int samplesRead = 0;
|
||||||
int samplesSize = m_aSamples[nComment].nSize / 2;
|
int samplesSize = m_aSamples[nComment].nSize / 2;
|
||||||
op_pcm_seek(fpSampleDataHandle, m_aSamples[nComment].nOffset / 2);
|
op_pcm_seek(fpSampleDataHandle, m_aSamples[nComment].nOffset / 2);
|
||||||
while (samplesSize > 0) {
|
while (samplesSize > 0) {
|
||||||
int size = op_read(fpSampleDataHandle, (opus_int16 *)(nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE * nCurrentPedSlot + samplesRead),
|
int size = op_read(fpSampleDataHandle, (opus_int16 *)(nSampleBankMemoryStartAddress[SAMPLEBANK_PED] + PED_BLOCKSIZE * nCurrentPedSlot + samplesRead),
|
||||||
samplesSize, NULL);
|
samplesSize, NULL);
|
||||||
if (size <= 0) {
|
if (size <= 0) {
|
||||||
return false;
|
return false;
|
||||||
@@ -1389,23 +1431,23 @@ bool cSampleManager::UpdateReverb(void)
|
|||||||
if ( AudioManager.GetFrameCounter() & 15 )
|
if ( AudioManager.GetFrameCounter() & 15 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
float y = AudioManager.GetReflectionsDistance(REFLECTION_TOP) + AudioManager.GetReflectionsDistance(REFLECTION_BOTTOM);
|
float fRatio = 0.0f;
|
||||||
float x = AudioManager.GetReflectionsDistance(REFLECTION_LEFT) + AudioManager.GetReflectionsDistance(REFLECTION_RIGHT);
|
|
||||||
float z = AudioManager.GetReflectionsDistance(REFLECTION_UP);
|
|
||||||
|
|
||||||
float normy = norm(y, 5.0f, 40.0f);
|
#define MIN_DIST 0.5f
|
||||||
float normx = norm(x, 5.0f, 40.0f);
|
#define CALCULATE_RATIO(value, maxDist, maxRatio) (value > MIN_DIST && value < maxDist ? value / maxDist * maxRatio : 0)
|
||||||
float normz = norm(z, 5.0f, 40.0f);
|
|
||||||
|
|
||||||
#define ZR(v, a, b) (((v)==0)?(a):(b))
|
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_NORTH), 10.0f, 1/2.f);
|
||||||
#define CALCRATIO(x,y,z,min,max,val) (ZR(y, ZR(x, ZR(z, min, max), min), ZR(x, ZR(z, min, max), ZR(z, min, val))))
|
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_SOUTH), 10.0f, 1/2.f);
|
||||||
|
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_WEST), 10.0f, 1/2.f);
|
||||||
|
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_EAST), 10.0f, 1/2.f);
|
||||||
|
|
||||||
float fRatio = CALCRATIO(normx, normy, normz, 0.3f, 0.5f, (normy+normx+normz)/3.0f);
|
fRatio += CALCULATE_RATIO((AudioManager.GetReflectionsDistance(REFLECTION_NORTH) + AudioManager.GetReflectionsDistance(REFLECTION_SOUTH)) / 2.f, 4.0f, 1/3.f);
|
||||||
|
fRatio += CALCULATE_RATIO((AudioManager.GetReflectionsDistance(REFLECTION_WEST) + AudioManager.GetReflectionsDistance(REFLECTION_EAST)) / 2.f, 4.0f, 1/3.f);
|
||||||
|
|
||||||
#undef CALCRATIO
|
#undef CALCULATE_RATIO
|
||||||
#undef ZE
|
#undef MIN_DIST
|
||||||
|
|
||||||
fRatio = clamp(fRatio, usingEAX3==1 ? 0.0f : 0.30f, 1.0f);
|
fRatio = clamp(fRatio, 0.0f, 0.6f);
|
||||||
|
|
||||||
if ( fRatio == _fPrevEaxRatioDestination )
|
if ( fRatio == _fPrevEaxRatioDestination )
|
||||||
return false;
|
return false;
|
||||||
@@ -1416,6 +1458,7 @@ bool cSampleManager::UpdateReverb(void)
|
|||||||
if ( usingEAX3 )
|
if ( usingEAX3 )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
fRatio = Min(fRatio * 1.67f, 1.0f);
|
||||||
if ( EAX3ListenerInterpolate(&StartEAX3, &FinishEAX3, fRatio, &EAX3Params, false) )
|
if ( EAX3ListenerInterpolate(&StartEAX3, &FinishEAX3, fRatio, &EAX3Params, false) )
|
||||||
{
|
{
|
||||||
EAX_SetAll(&EAX3Params);
|
EAX_SetAll(&EAX3Params);
|
||||||
@@ -1430,16 +1473,17 @@ bool cSampleManager::UpdateReverb(void)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_fEffectsLevel = 1.0f - fRatio * 0.5f;
|
_fEffectsLevel = fRatio * 0.75f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( _usingEFX )
|
if ( _usingEFX )
|
||||||
_fEffectsLevel = (1.0f - fRatio) * 0.4f;
|
_fEffectsLevel = fRatio * 0.8f;
|
||||||
else
|
else
|
||||||
_fEffectsLevel = (1.0f - fRatio) * 0.7f;
|
_fEffectsLevel = fRatio * 0.22f;
|
||||||
}
|
}
|
||||||
|
_fEffectsLevel = Min(_fEffectsLevel, 1.0f);
|
||||||
|
|
||||||
_fPrevEaxRatioDestination = fRatio;
|
_fPrevEaxRatioDestination = fRatio;
|
||||||
|
|
||||||
@@ -1517,12 +1561,11 @@ cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume)
|
|||||||
|
|
||||||
nChannelVolume[nChannel] = vol;
|
nChannelVolume[nChannel] = vol;
|
||||||
|
|
||||||
// reduce channel volume when JB.MP3 or S4_BDBD.MP3 playing
|
if (MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE ) {
|
||||||
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
|
if (MusicManager.GetCurrentTrack() == STREAMED_SOUND_CUTSCENE_FINALE)
|
||||||
&& MusicManager.GetCurrentTrack() != STREAMED_SOUND_NEWS_INTRO
|
nChannelVolume[nChannel] = 0;
|
||||||
&& MusicManager.GetCurrentTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
|
else
|
||||||
{
|
nChannelVolume[nChannel] >>= 2;
|
||||||
nChannelVolume[nChannel] = vol / 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// no idea, does this one looks like a bug or it's SetChannelVolume ?
|
// no idea, does this one looks like a bug or it's SetChannelVolume ?
|
||||||
@@ -1559,12 +1602,12 @@ cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume)
|
|||||||
|
|
||||||
nChannelVolume[nChannel] = vol;
|
nChannelVolume[nChannel] = vol;
|
||||||
|
|
||||||
// reduce the volume for JB.MP3 and S4_BDBD.MP3
|
// increase the volume for JB.MP3 and S4_BDBD.MP3
|
||||||
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
|
if (MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE ) {
|
||||||
&& MusicManager.GetCurrentTrack() != STREAMED_SOUND_NEWS_INTRO
|
if (MusicManager.GetCurrentTrack() == STREAMED_SOUND_CUTSCENE_FINALE)
|
||||||
&& MusicManager.GetCurrentTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
|
nChannelVolume[nChannel] = 0;
|
||||||
{
|
else
|
||||||
nChannelVolume[nChannel] = vol / 4;
|
nChannelVolume[nChannel] >>= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
aChannel[nChannel].SetVolume(m_nEffectsFadeVolume*vol*m_nEffectsVolume >> 14);
|
aChannel[nChannel].SetVolume(m_nEffectsFadeVolume*vol*m_nEffectsVolume >> 14);
|
||||||
@@ -1632,7 +1675,7 @@ cSampleManager::StopChannel(uint32 nChannel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
|
cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
|
||||||
{
|
{
|
||||||
char filename[MAX_PATH];
|
char filename[MAX_PATH];
|
||||||
|
|
||||||
@@ -1648,7 +1691,7 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
|
|||||||
|
|
||||||
strcpy(filename, StreamedNameTable[nFile]);
|
strcpy(filename, StreamedNameTable[nFile]);
|
||||||
|
|
||||||
CStream *stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream]);
|
CStream *stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
||||||
ASSERT(stream != NULL);
|
ASSERT(stream != NULL);
|
||||||
|
|
||||||
aStream[nStream] = stream;
|
aStream[nStream] = stream;
|
||||||
@@ -1690,7 +1733,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
||||||
{
|
{
|
||||||
uint32 position = nPos;
|
uint32 position = nPos;
|
||||||
char filename[256];
|
char filename[256];
|
||||||
@@ -1723,7 +1766,7 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
nFile = 0;
|
nFile = 0;
|
||||||
strcat(filename, StreamedNameTable[nFile]);
|
strcat(filename, StreamedNameTable[nFile]);
|
||||||
|
|
||||||
CStream* stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream]);
|
CStream* stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
||||||
ASSERT(stream != NULL);
|
ASSERT(stream != NULL);
|
||||||
|
|
||||||
aStream[nStream] = stream;
|
aStream[nStream] = stream;
|
||||||
@@ -1747,12 +1790,12 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mp3->pLinkPath != NULL)
|
if (mp3->pLinkPath != NULL)
|
||||||
aStream[nStream] = new CStream(mp3->pLinkPath, ALStreamSources[nStream], ALStreamBuffers[nStream]);
|
aStream[nStream] = new CStream(mp3->pLinkPath, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
||||||
else {
|
else {
|
||||||
strcpy(filename, _mp3DirectoryPath);
|
strcpy(filename, _mp3DirectoryPath);
|
||||||
strcat(filename, mp3->aFilename);
|
strcat(filename, mp3->aFilename);
|
||||||
|
|
||||||
aStream[nStream] = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream]);
|
aStream[nStream] = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aStream[nStream]->IsOpened()) {
|
if (aStream[nStream]->IsOpened()) {
|
||||||
@@ -1779,7 +1822,7 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
{
|
{
|
||||||
nFile = 0;
|
nFile = 0;
|
||||||
strcat(filename, StreamedNameTable[nFile]);
|
strcat(filename, StreamedNameTable[nFile]);
|
||||||
CStream* stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream]);
|
CStream* stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
||||||
ASSERT(stream != NULL);
|
ASSERT(stream != NULL);
|
||||||
|
|
||||||
aStream[nStream] = stream;
|
aStream[nStream] = stream;
|
||||||
@@ -1803,7 +1846,7 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (e->pLinkPath != NULL)
|
if (e->pLinkPath != NULL)
|
||||||
aStream[nStream] = new CStream(e->pLinkPath, ALStreamSources[nStream], ALStreamBuffers[nStream]);
|
aStream[nStream] = new CStream(e->pLinkPath, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
||||||
else {
|
else {
|
||||||
strcpy(filename, _mp3DirectoryPath);
|
strcpy(filename, _mp3DirectoryPath);
|
||||||
strcat(filename, e->aFilename);
|
strcat(filename, e->aFilename);
|
||||||
@@ -1836,7 +1879,7 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
|
|
||||||
strcpy(filename, StreamedNameTable[nFile]);
|
strcpy(filename, StreamedNameTable[nFile]);
|
||||||
|
|
||||||
CStream *stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream]);
|
CStream *stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
||||||
ASSERT(stream != NULL);
|
ASSERT(stream != NULL);
|
||||||
|
|
||||||
aStream[nStream] = stream;
|
aStream[nStream] = stream;
|
||||||
@@ -1893,12 +1936,17 @@ cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffect
|
|||||||
{
|
{
|
||||||
ASSERT( nStream < MAX_STREAMS );
|
ASSERT( nStream < MAX_STREAMS );
|
||||||
|
|
||||||
|
float boostMult = 0.0f;
|
||||||
|
|
||||||
if ( nVolume > MAX_VOLUME )
|
if ( nVolume > MAX_VOLUME )
|
||||||
nVolume = MAX_VOLUME;
|
nVolume = MAX_VOLUME;
|
||||||
|
|
||||||
if ( nPan > MAX_VOLUME )
|
if ( nPan > MAX_VOLUME )
|
||||||
nPan = MAX_VOLUME;
|
nPan = MAX_VOLUME;
|
||||||
|
|
||||||
|
if ( MusicManager.GetRadioInCar() == USERTRACK && !MusicManager.CheckForMusicInterruptions() )
|
||||||
|
boostMult = m_nMP3BoostVolume / 64.f;
|
||||||
|
|
||||||
nStreamVolume[nStream] = nVolume;
|
nStreamVolume[nStream] = nVolume;
|
||||||
nStreamPan [nStream] = nPan;
|
nStreamPan [nStream] = nPan;
|
||||||
|
|
||||||
@@ -1906,10 +1954,14 @@ cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffect
|
|||||||
|
|
||||||
if ( stream )
|
if ( stream )
|
||||||
{
|
{
|
||||||
if ( nEffectFlag )
|
if ( nEffectFlag ) {
|
||||||
stream->SetVolume(m_nEffectsFadeVolume*nVolume*m_nEffectsVolume >> 14);
|
if ( nStream == 1 || nStream == 2 )
|
||||||
|
stream->SetVolume(128*nVolume*m_nEffectsVolume >> 14);
|
||||||
|
else
|
||||||
|
stream->SetVolume(m_nEffectsFadeVolume*nVolume*m_nEffectsVolume >> 14);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
stream->SetVolume(m_nMusicFadeVolume*nVolume*m_nMusicVolume >> 14);
|
stream->SetVolume((m_nMusicFadeVolume*nVolume*(uint32)(m_nMusicVolume * boostMult + m_nMusicVolume)) >> 14);
|
||||||
|
|
||||||
stream->SetPan(nPan);
|
stream->SetPan(nPan);
|
||||||
}
|
}
|
||||||
@@ -1959,7 +2011,7 @@ cSampleManager::InitialiseSampleBanks(void)
|
|||||||
fpSampleDescHandle = fcaseopen(SampleBankDescFilename, "rb");
|
fpSampleDescHandle = fcaseopen(SampleBankDescFilename, "rb");
|
||||||
if ( fpSampleDescHandle == NULL )
|
if ( fpSampleDescHandle == NULL )
|
||||||
return false;
|
return false;
|
||||||
#ifndef AUDIO_OPUS
|
#ifndef OPUS_SFX
|
||||||
fpSampleDataHandle = fcaseopen(SampleBankDataFilename, "rb");
|
fpSampleDataHandle = fcaseopen(SampleBankDataFilename, "rb");
|
||||||
if ( fpSampleDataHandle == NULL )
|
if ( fpSampleDataHandle == NULL )
|
||||||
{
|
{
|
||||||
@@ -1977,7 +2029,7 @@ cSampleManager::InitialiseSampleBanks(void)
|
|||||||
fpSampleDataHandle = op_open_file(SampleBankDataFilename, &e);
|
fpSampleDataHandle = op_open_file(SampleBankDataFilename, &e);
|
||||||
#endif
|
#endif
|
||||||
fread(m_aSamples, sizeof(tSample), TOTAL_AUDIO_SAMPLES, fpSampleDescHandle);
|
fread(m_aSamples, sizeof(tSample), TOTAL_AUDIO_SAMPLES, fpSampleDescHandle);
|
||||||
#ifdef AUDIO_OPUS
|
#ifdef OPUS_SFX
|
||||||
int32 _nSampleDataEndOffset = m_aSamples[TOTAL_AUDIO_SAMPLES - 1].nOffset + m_aSamples[TOTAL_AUDIO_SAMPLES - 1].nSize;
|
int32 _nSampleDataEndOffset = m_aSamples[TOTAL_AUDIO_SAMPLES - 1].nOffset + m_aSamples[TOTAL_AUDIO_SAMPLES - 1].nSize;
|
||||||
#endif
|
#endif
|
||||||
fclose(fpSampleDescHandle);
|
fclose(fpSampleDescHandle);
|
||||||
@@ -2000,4 +2052,11 @@ cSampleManager::InitialiseSampleBanks(void)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cSampleManager::SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nChannel)
|
||||||
|
{
|
||||||
|
nStreamLoopedFlag[nChannel] = nLoopFlag;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -16,8 +16,10 @@ enum eSound
|
|||||||
SOUND_CAR_DOOR_OPEN_BACK_RIGHT,
|
SOUND_CAR_DOOR_OPEN_BACK_RIGHT,
|
||||||
SOUND_CAR_WINDSHIELD_CRACK,
|
SOUND_CAR_WINDSHIELD_CRACK,
|
||||||
SOUND_CAR_JUMP,
|
SOUND_CAR_JUMP,
|
||||||
SOUND_E,
|
SOUND_CAR_JUMP_2,
|
||||||
SOUND_F,
|
SOUND_CAR_TYRE_POP,
|
||||||
|
SOUND_16,
|
||||||
|
SOUND_17,
|
||||||
SOUND_CAR_ENGINE_START,
|
SOUND_CAR_ENGINE_START,
|
||||||
SOUND_CAR_LIGHT_BREAK,
|
SOUND_CAR_LIGHT_BREAK,
|
||||||
SOUND_CAR_HYDRAULIC_1,
|
SOUND_CAR_HYDRAULIC_1,
|
||||||
@@ -31,29 +33,33 @@ enum eSound
|
|||||||
SOUND_CAR_TANK_TURRET_ROTATE,
|
SOUND_CAR_TANK_TURRET_ROTATE,
|
||||||
SOUND_CAR_BOMB_TICK,
|
SOUND_CAR_BOMB_TICK,
|
||||||
SOUND_PLANE_ON_GROUND,
|
SOUND_PLANE_ON_GROUND,
|
||||||
|
SOUND_HELI_BLADE,
|
||||||
|
SOUND_32,
|
||||||
SOUND_STEP_START,
|
SOUND_STEP_START,
|
||||||
SOUND_STEP_END,
|
SOUND_STEP_END,
|
||||||
SOUND_FALL_LAND,
|
SOUND_FALL_LAND,
|
||||||
SOUND_FALL_COLLAPSE,
|
SOUND_FALL_COLLAPSE,
|
||||||
SOUND_FIGHT_PUNCH_33,
|
SOUND_FIGHT_37,
|
||||||
SOUND_FIGHT_KICK_34,
|
SOUND_FIGHT_38,
|
||||||
SOUND_FIGHT_HEADBUTT_35,
|
SOUND_FIGHT_39,
|
||||||
SOUND_FIGHT_PUNCH_36,
|
SOUND_FIGHT_40,
|
||||||
SOUND_FIGHT_PUNCH_37,
|
SOUND_FIGHT_41,
|
||||||
SOUND_FIGHT_CLOSE_PUNCH_38,
|
SOUND_FIGHT_42,
|
||||||
SOUND_FIGHT_PUNCH_39,
|
SOUND_FIGHT_43,
|
||||||
SOUND_FIGHT_PUNCH_OR_KICK_BELOW_40,
|
SOUND_FIGHT_44,
|
||||||
SOUND_FIGHT_PUNCH_41,
|
SOUND_FIGHT_45,
|
||||||
SOUND_FIGHT_PUNCH_FROM_BEHIND_42,
|
SOUND_FIGHT_46,
|
||||||
SOUND_FIGHT_KNEE_OR_KICK_43,
|
SOUND_FIGHT_47,
|
||||||
SOUND_FIGHT_KICK_44,
|
SOUND_FIGHT_48,
|
||||||
SOUND_2D,
|
SOUND_49,
|
||||||
SOUND_WEAPON_BAT_ATTACK,
|
SOUND_WEAPON_BAT_ATTACK,
|
||||||
|
SOUND_WEAPON_KNIFE_ATTACK,
|
||||||
|
SOUND_WEAPON_CHAINSAW_ATTACK,
|
||||||
|
SOUND_WEAPON_CHAINSAW_IDLE,
|
||||||
|
SOUND_WEAPON_CHAINSAW_MADECONTACT,
|
||||||
SOUND_WEAPON_SHOT_FIRED,
|
SOUND_WEAPON_SHOT_FIRED,
|
||||||
SOUND_WEAPON_RELOAD,
|
SOUND_WEAPON_RELOAD,
|
||||||
SOUND_WEAPON_AK47_BULLET_ECHO,
|
SOUND_WEAPON_AK47_BULLET_ECHO,
|
||||||
SOUND_WEAPON_UZI_BULLET_ECHO,
|
|
||||||
SOUND_WEAPON_M16_BULLET_ECHO,
|
|
||||||
SOUND_WEAPON_FLAMETHROWER_FIRE,
|
SOUND_WEAPON_FLAMETHROWER_FIRE,
|
||||||
SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM,
|
SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM,
|
||||||
SOUND_WEAPON_ROCKET_SHOT_NO_ZOOM,
|
SOUND_WEAPON_ROCKET_SHOT_NO_ZOOM,
|
||||||
@@ -66,8 +72,8 @@ enum eSound
|
|||||||
SOUND_GARAGE_BOMB1_SET,
|
SOUND_GARAGE_BOMB1_SET,
|
||||||
SOUND_GARAGE_BOMB2_SET,
|
SOUND_GARAGE_BOMB2_SET,
|
||||||
SOUND_GARAGE_BOMB3_SET,
|
SOUND_GARAGE_BOMB3_SET,
|
||||||
SOUND_40,
|
SOUND_70,
|
||||||
SOUND_41,
|
SOUND_71,
|
||||||
SOUND_GARAGE_VEHICLE_DECLINED,
|
SOUND_GARAGE_VEHICLE_DECLINED,
|
||||||
SOUND_GARAGE_VEHICLE_ACCEPTED,
|
SOUND_GARAGE_VEHICLE_ACCEPTED,
|
||||||
SOUND_GARAGE_DOOR_CLOSED,
|
SOUND_GARAGE_DOOR_CLOSED,
|
||||||
@@ -76,8 +82,8 @@ enum eSound
|
|||||||
SOUND_PICKUP_WEAPON_BOUGHT,
|
SOUND_PICKUP_WEAPON_BOUGHT,
|
||||||
SOUND_PICKUP_WEAPON,
|
SOUND_PICKUP_WEAPON,
|
||||||
SOUND_PICKUP_HEALTH,
|
SOUND_PICKUP_HEALTH,
|
||||||
SOUND_PICKUP_ERROR,
|
SOUND_80,
|
||||||
SOUND_4B,
|
SOUND_81,
|
||||||
SOUND_PICKUP_ADRENALINE,
|
SOUND_PICKUP_ADRENALINE,
|
||||||
SOUND_PICKUP_ARMOUR,
|
SOUND_PICKUP_ARMOUR,
|
||||||
SOUND_PICKUP_BONUS,
|
SOUND_PICKUP_BONUS,
|
||||||
@@ -87,7 +93,7 @@ enum eSound
|
|||||||
SOUND_PICKUP_PACMAN_PACKAGE,
|
SOUND_PICKUP_PACMAN_PACKAGE,
|
||||||
SOUND_PICKUP_FLOAT_PACKAGE,
|
SOUND_PICKUP_FLOAT_PACKAGE,
|
||||||
SOUND_BOMB_TIMED_ACTIVATED,
|
SOUND_BOMB_TIMED_ACTIVATED,
|
||||||
SOUND_55,
|
SOUND_91,
|
||||||
SOUND_BOMB_ONIGNITION_ACTIVATED,
|
SOUND_BOMB_ONIGNITION_ACTIVATED,
|
||||||
SOUND_BOMB_TICK,
|
SOUND_BOMB_TICK,
|
||||||
SOUND_RAMPAGE_START,
|
SOUND_RAMPAGE_START,
|
||||||
@@ -104,12 +110,16 @@ enum eSound
|
|||||||
SOUND_PED_HIT,
|
SOUND_PED_HIT,
|
||||||
SOUND_PED_LAND,
|
SOUND_PED_LAND,
|
||||||
SOUND_PED_BULLET_HIT,
|
SOUND_PED_BULLET_HIT,
|
||||||
SOUND_PED_BOMBER,
|
|
||||||
SOUND_PED_BURNING,
|
SOUND_PED_BURNING,
|
||||||
SOUND_PED_ARREST_FBI,
|
SOUND_PED_PLAYER_REACTTOCOP,
|
||||||
SOUND_PED_ARREST_SWAT,
|
|
||||||
SOUND_PED_ARREST_COP,
|
SOUND_PED_ARREST_COP,
|
||||||
SOUND_PED_HELI_PLAYER_FOUND,
|
SOUND_PED_MIAMIVICE_EXITING_CAR,
|
||||||
|
SOUND_PED_COP_HELIPILOTPHRASE,
|
||||||
|
SOUND_PED_PULLOUTWEAPON,
|
||||||
|
SOUND_PED_HELI_PLAYER_FOUND = 114,
|
||||||
|
SOUND_PED_VCPA_PLAYER_FOUND = 115,
|
||||||
|
SOUND_PED_ON_FIRE,
|
||||||
|
SOUND_PED_AIMING,
|
||||||
SOUND_PED_HANDS_UP,
|
SOUND_PED_HANDS_UP,
|
||||||
SOUND_PED_HANDS_COWER,
|
SOUND_PED_HANDS_COWER,
|
||||||
SOUND_PED_FLEE_SPRINT,
|
SOUND_PED_FLEE_SPRINT,
|
||||||
@@ -117,30 +127,40 @@ enum eSound
|
|||||||
SOUND_PED_MUGGING,
|
SOUND_PED_MUGGING,
|
||||||
SOUND_PED_CAR_JACKED,
|
SOUND_PED_CAR_JACKED,
|
||||||
SOUND_PED_ROBBED,
|
SOUND_PED_ROBBED,
|
||||||
|
SOUND_PED_ACCIDENTREACTION1,
|
||||||
|
SOUND_PED_UNK_126,
|
||||||
|
SOUND_PED_PLAYER_AFTERSEX,
|
||||||
|
SOUND_PED_PLAYER_BEFORESEX,
|
||||||
|
SOUND_PED_COP_UNK_129, // also used for medics
|
||||||
|
SOUND_PED_COP_MANYCOPSAROUND, // also used for medics
|
||||||
|
SOUND_PED_GUNAIMEDAT2,
|
||||||
|
SOUND_PED_COP_ALONE, // also used for medics
|
||||||
|
SOUND_PED_GUNAIMEDAT3,
|
||||||
|
SOUND_PED_COP_REACTION,
|
||||||
|
SOUND_PED_COP_LITTLECOPSAROUND, // also used for medics
|
||||||
|
SOUND_PED_PLAYER_FARFROMCOPS, // also used for medics
|
||||||
SOUND_PED_TAXI_WAIT,
|
SOUND_PED_TAXI_WAIT,
|
||||||
SOUND_PED_ATTACK,
|
SOUND_PED_ATTACK,
|
||||||
SOUND_PED_DEFEND,
|
SOUND_PED_DEFEND,
|
||||||
SOUND_PED_PURSUIT_ARMY,
|
|
||||||
SOUND_PED_PURSUIT_FBI,
|
|
||||||
SOUND_PED_PURSUIT_SWAT,
|
|
||||||
SOUND_PED_PURSUIT_COP,
|
|
||||||
SOUND_PED_HEALING,
|
SOUND_PED_HEALING,
|
||||||
SOUND_PED_7B,
|
|
||||||
SOUND_PED_LEAVE_VEHICLE,
|
SOUND_PED_LEAVE_VEHICLE,
|
||||||
SOUND_PED_EVADE,
|
SOUND_PED_EVADE,
|
||||||
SOUND_PED_FLEE_RUN,
|
SOUND_PED_FLEE_RUN,
|
||||||
|
SOUND_PED_CRASH_VEHICLE,
|
||||||
|
SOUND_PED_CRASH_CAR,
|
||||||
SOUND_PED_ANNOYED_DRIVER,
|
SOUND_PED_ANNOYED_DRIVER,
|
||||||
|
SOUND_PED_147,
|
||||||
SOUND_PED_SOLICIT,
|
SOUND_PED_SOLICIT,
|
||||||
|
SOUND_PED_149,
|
||||||
|
SOUND_PED_150,
|
||||||
SOUND_PED_EXTINGUISHING_FIRE,
|
SOUND_PED_EXTINGUISHING_FIRE,
|
||||||
SOUND_PED_WAIT_DOUBLEBACK,
|
SOUND_PED_WAIT_DOUBLEBACK,
|
||||||
|
SOUND_153,
|
||||||
SOUND_PED_CHAT_SEXY,
|
SOUND_PED_CHAT_SEXY,
|
||||||
SOUND_PED_CHAT_EVENT,
|
SOUND_PED_CHAT_EVENT,
|
||||||
|
SOUND_PED_PED_COLLISION,
|
||||||
SOUND_PED_CHAT,
|
SOUND_PED_CHAT,
|
||||||
SOUND_PED_BODYCAST_HIT,
|
|
||||||
SOUND_PED_TAXI_CALL,
|
SOUND_PED_TAXI_CALL,
|
||||||
SOUND_INJURED_PED_MALE_OUCH,
|
|
||||||
SOUND_INJURED_PED_FEMALE,
|
|
||||||
SOUND_INJURED_PED_MALE_PRISON,
|
|
||||||
SOUND_RACE_START_3,
|
SOUND_RACE_START_3,
|
||||||
SOUND_RACE_START_2,
|
SOUND_RACE_START_2,
|
||||||
SOUND_RACE_START_1,
|
SOUND_RACE_START_1,
|
||||||
@@ -151,143 +171,101 @@ enum eSound
|
|||||||
SOUND_CAR_PED_COLLISION,
|
SOUND_CAR_PED_COLLISION,
|
||||||
SOUND_CLOCK_TICK,
|
SOUND_CLOCK_TICK,
|
||||||
SOUND_PART_MISSION_COMPLETE,
|
SOUND_PART_MISSION_COMPLETE,
|
||||||
SOUND_FRONTEND_MENU_STARTING,
|
SOUND_FRONTEND_MENU_STARTING, // same with SOUND_HUD_SOUND
|
||||||
SOUND_FRONTEND_MENU_NEW_PAGE,
|
|
||||||
SOUND_FRONTEND_MENU_NAVIGATION,
|
// TODO(Miami): What are 170-175??
|
||||||
SOUND_FRONTEND_MENU_SETTING_CHANGE,
|
|
||||||
SOUND_FRONTEND_MENU_BACK,
|
SOUND_FRONTEND_NO_RADIO = 176, // those 3 are all same sound
|
||||||
SOUND_FRONTEND_STEREO,
|
|
||||||
SOUND_FRONTEND_MONO,
|
|
||||||
SOUND_FRONTEND_AUDIO_TEST,
|
|
||||||
SOUND_FRONTEND_FAIL,
|
|
||||||
SOUND_FRONTEND_NO_RADIO,
|
|
||||||
SOUND_FRONTEND_RADIO_CHANGE,
|
SOUND_FRONTEND_RADIO_CHANGE,
|
||||||
SOUND_HUD,
|
SOUND_FRONTEND_RADIO_CHANGE_2,
|
||||||
SOUND_AMMUNATION_WELCOME_1,
|
SOUND_HUD_SOUND,
|
||||||
SOUND_AMMUNATION_WELCOME_2,
|
SOUND_180,
|
||||||
SOUND_AMMUNATION_WELCOME_3,
|
SOUND_181,
|
||||||
|
SOUND_182,
|
||||||
SOUND_LIGHTNING,
|
SOUND_LIGHTNING,
|
||||||
SOUND_A5,
|
SOUND_BULLETTRACE_1,
|
||||||
SOUND_TOTAL_SOUNDS,
|
SOUND_BULLETTRACE_2,
|
||||||
SOUND_NO_SOUND,
|
SOUND_186, // makes same sound with 40
|
||||||
|
SOUND_187, // makes same sound with 46
|
||||||
|
SOUND_MELEE_ATTACK_START,
|
||||||
|
SOUND_SKATING,
|
||||||
|
SOUND_WEAPON_MINIGUN_ATTACK,
|
||||||
|
SOUND_WEAPON_MINIGUN_2,
|
||||||
|
SOUND_WEAPON_MINIGUN_3,
|
||||||
|
SOUND_AMMUNATION_IMRAN_ARM_BOMB,
|
||||||
|
SOUND_RADIO_CHANGE,
|
||||||
|
SOUND_FRONTEND_HIGHLIGHT_OPTION,
|
||||||
|
SOUND_FRONTEND_ENTER_OR_ADJUST,
|
||||||
|
SOUND_FRONTEND_BACK,
|
||||||
|
SOUND_FRONTEND_FAIL,
|
||||||
|
SOUND_FRONTEND_AUDIO_TEST,
|
||||||
|
SOUND_INJURED_PED_MALE_OUCH,
|
||||||
|
SOUND_INJURED_PED_FEMALE,
|
||||||
|
SOUND_SHIRT_WIND_FLAP,
|
||||||
|
SOUND_SET_203,
|
||||||
|
SOUND_TOTAL_SOUNDS = 204,
|
||||||
|
SOUND_NO_SOUND = 205,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
enum eScriptSounds {
|
enum eScriptSounds {
|
||||||
SCRIPT_SOUND_0 = 0,
|
SCRIPT_SOUND_BANK_ALARM_LOOP = 0,
|
||||||
SCRIPT_SOUND_1,
|
|
||||||
SCRIPT_SOUND_2,
|
|
||||||
SCRIPT_SOUND_3,
|
|
||||||
SCRIPT_SOUND_PARTY_1_LOOP_S,
|
|
||||||
SCRIPT_SOUND_PARTY_1_LOOP_L,
|
|
||||||
SCRIPT_SOUND_PARTY_2_LOOP_S,
|
|
||||||
SCRIPT_SOUND_PARTY_2_LOOP_L,
|
|
||||||
SCRIPT_SOUND_PARTY_3_LOOP_S,
|
|
||||||
SCRIPT_SOUND_PARTY_3_LOOP_L,
|
|
||||||
SCRIPT_SOUND_PARTY_4_LOOP_S,
|
|
||||||
SCRIPT_SOUND_PARTY_4_LOOP_L,
|
|
||||||
SCRIPT_SOUND_PARTY_5_LOOP_S,
|
|
||||||
SCRIPT_SOUND_PARTY_5_LOOP_L,
|
|
||||||
SCRIPT_SOUND_PARTY_6_LOOP_S,
|
|
||||||
SCRIPT_SOUND_PARTY_6_LOOP_L,
|
|
||||||
SCRIPT_SOUND_PARTY_7_LOOP_S,
|
|
||||||
SCRIPT_SOUND_PARTY_7_LOOP_L,
|
|
||||||
SCRIPT_SOUND_PARTY_8_LOOP_S,
|
|
||||||
SCRIPT_SOUND_PARTY_8_LOOP_L,
|
|
||||||
SCRIPT_SOUND_PARTY_9_LOOP_S,
|
|
||||||
SCRIPT_SOUND_PARTY_9_LOOP_L,
|
|
||||||
SCRIPT_SOUND_PARTY_10_LOOP_S,
|
|
||||||
SCRIPT_SOUND_PARTY_10_LOOP_L,
|
|
||||||
SCRIPT_SOUND_PARTY_11_LOOP_S,
|
|
||||||
SCRIPT_SOUND_PARTY_11_LOOP_L,
|
|
||||||
SCRIPT_SOUND_PARTY_12_LOOP_S,
|
|
||||||
SCRIPT_SOUND_PARTY_12_LOOP_L,
|
|
||||||
SCRIPT_SOUND_PARTY_13_LOOP_S,
|
|
||||||
SCRIPT_SOUND_PARTY_13_LOOP_L,
|
|
||||||
SCRIPT_SOUND_STRIP_CLUB_LOOP_1_S,
|
|
||||||
SCRIPT_SOUND_STRIP_CLUB_LOOP_1_L,
|
|
||||||
SCRIPT_SOUND_STRIP_CLUB_LOOP_2_S,
|
|
||||||
SCRIPT_SOUND_STRIP_CLUB_LOOP_2_L,
|
|
||||||
SCRIPT_SOUND_WORK_SHOP_LOOP_S,
|
|
||||||
SCRIPT_SOUND_WORK_SHOP_LOOP_L,
|
|
||||||
SCRIPT_SOUND_SAWMILL_LOOP_S,
|
|
||||||
SCRIPT_SOUND_SAWMILL_LOOP_L,
|
|
||||||
SCRIPT_SOUND_38,
|
|
||||||
SCRIPT_SOUND_39,
|
|
||||||
SCRIPT_SOUND_LAUNDERETTE_LOOP_S,
|
|
||||||
SCRIPT_SOUND_LAUNDERETTE_LOOP_L,
|
|
||||||
SCRIPT_SOUND_CHINATOWN_RESTAURANT_S,
|
|
||||||
SCRIPT_SOUND_CHINATOWN_RESTAURANT_L,
|
|
||||||
SCRIPT_SOUND_CIPRIANI_RESAURANT_S,
|
|
||||||
SCRIPT_SOUND_CIPRIANI_RESAURANT_L,
|
|
||||||
SCRIPT_SOUND_46_S,
|
|
||||||
SCRIPT_SOUND_47_L,
|
|
||||||
SCRIPT_SOUND_MARCO_BISTRO_S,
|
|
||||||
SCRIPT_SOUND_MARCO_BISTRO_L,
|
|
||||||
SCRIPT_SOUND_AIRPORT_LOOP_S,
|
|
||||||
SCRIPT_SOUND_AIRPORT_LOOP_L,
|
|
||||||
SCRIPT_SOUND_SHOP_LOOP_S,
|
|
||||||
SCRIPT_SOUND_SHOP_LOOP_L,
|
|
||||||
SCRIPT_SOUND_CINEMA_LOOP_S,
|
|
||||||
SCRIPT_SOUND_CINEMA_LOOP_L,
|
|
||||||
SCRIPT_SOUND_DOCKS_LOOP_S,
|
|
||||||
SCRIPT_SOUND_DOCKS_LOOP_L,
|
|
||||||
SCRIPT_SOUND_HOME_LOOP_S,
|
|
||||||
SCRIPT_SOUND_HOME_LOOP_L,
|
|
||||||
SCRIPT_SOUND_FRANKIE_PIANO,
|
|
||||||
SCRIPT_SOUND_PARTY_1_LOOP,
|
|
||||||
SCRIPT_SOUND_PORN_CINEMA_1_S,
|
|
||||||
SCRIPT_SOUND_PORN_CINEMA_1_L,
|
|
||||||
SCRIPT_SOUND_PORN_CINEMA_2_S,
|
|
||||||
SCRIPT_SOUND_PORN_CINEMA_2_L,
|
|
||||||
SCRIPT_SOUND_PORN_CINEMA_3_S,
|
|
||||||
SCRIPT_SOUND_PORN_CINEMA_3_L,
|
|
||||||
SCRIPT_SOUND_BANK_ALARM_LOOP_S,
|
|
||||||
SCRIPT_SOUND_BANK_ALARM_LOOP_L,
|
|
||||||
SCRIPT_SOUND_POLICE_BALL_LOOP_S,
|
|
||||||
SCRIPT_SOUND_POLICE_BALL_LOOP_L,
|
|
||||||
SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_S,
|
|
||||||
SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_L,
|
|
||||||
SCRIPT_SOUND_74,
|
|
||||||
SCRIPT_SOUND_75,
|
|
||||||
SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_S,
|
|
||||||
SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_L,
|
|
||||||
SCRIPT_SOUND_INJURED_PED_MALE_OUCH_S,
|
|
||||||
SCRIPT_SOUND_INJURED_PED_MALE_OUCH_L,
|
|
||||||
SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_S,
|
|
||||||
SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_L,
|
|
||||||
SCRIPT_SOUND_EVIDENCE_PICKUP,
|
|
||||||
SCRIPT_SOUND_UNLOAD_GOLD,
|
|
||||||
SCRIPT_SOUND_RAVE_1_LOOP_S,
|
|
||||||
SCRIPT_SOUND_RAVE_1_LOOP_L,
|
|
||||||
SCRIPT_SOUND_RAVE_2_LOOP_S,
|
|
||||||
SCRIPT_SOUND_RAVE_2_LOOP_L,
|
|
||||||
SCRIPT_SOUND_RAVE_3_LOOP_S,
|
|
||||||
SCRIPT_SOUND_RAVE_3_LOOP_L,
|
|
||||||
SCRIPT_SOUND_MISTY_SEX_S,
|
|
||||||
SCRIPT_SOUND_MISTY_SEX_L,
|
|
||||||
SCRIPT_SOUND_GATE_START_CLUNK,
|
|
||||||
SCRIPT_SOUND_GATE_STOP_CLUNK,
|
|
||||||
SCRIPT_SOUND_PART_MISSION_COMPLETE,
|
SCRIPT_SOUND_PART_MISSION_COMPLETE,
|
||||||
SCRIPT_SOUND_CHUNKY_RUN_SHOUT,
|
SCRIPT_SOUND_POLICE_CELL_DOOR_SLIDING_LOOP,
|
||||||
SCRIPT_SOUND_SECURITY_GUARD_AWAY_SHOUT,
|
SCRIPT_SOUND_POLICE_CELL_DOOR_CLUNK,
|
||||||
|
SCRIPT_SOUND_GARAGE_DOOR_SLIDING_LOOP,
|
||||||
|
SCRIPT_SOUND_GARAGE_DOOR_CLUNK,
|
||||||
|
SCRIPT_SOUND_SNORING_LOOP,
|
||||||
SCRIPT_SOUND_RACE_START_3,
|
SCRIPT_SOUND_RACE_START_3,
|
||||||
SCRIPT_SOUND_RACE_START_2,
|
SCRIPT_SOUND_RACE_START_2,
|
||||||
SCRIPT_SOUND_RACE_START_1,
|
SCRIPT_SOUND_RACE_START_1,
|
||||||
SCRIPT_SOUND_RACE_START_GO,
|
SCRIPT_SOUND_RACE_START_GO,
|
||||||
SCRIPT_SOUND_SWAT_PED_SHOUT,
|
SCRIPT_SOUND_SHOOTING_RANGE_TARGET_MOVING_LOOP,
|
||||||
SCRIPT_SOUND_PRETEND_FIRE_LOOP,
|
SCRIPT_SOUND_SHOOTING_RANGE_TARGET_HIT,
|
||||||
SCRIPT_SOUND_AMMUNATION_CHAT_1,
|
SCRIPT_SOUND_AMMUNATION_BUY_WEAPON,
|
||||||
SCRIPT_SOUND_AMMUNATION_CHAT_2,
|
SCRIPT_SOUND_AMMUNATION_BUY_WEAPON_DENIED,
|
||||||
SCRIPT_SOUND_AMMUNATION_CHAT_3,
|
SCRIPT_SOUND_WMYCW_TICKET_SPEECH,
|
||||||
|
SCRIPT_SOUND_IMRAN_ARM_BOMB,
|
||||||
|
SCRIPT_SOUND_ANDY_SNIPER_SHOT,
|
||||||
|
SCRIPT_SOUND_WILLIE_CARD_SWIPE,
|
||||||
|
SCRIPT_SOUND_MALE_AMBULANCE_OUCH,
|
||||||
|
SCRIPT_SOUND_FEMALE_AMBULANCE_OUCH,
|
||||||
|
SCRIPT_SOUND_BUILDING_BAR_1,
|
||||||
|
SCRIPT_SOUND_BUILDING_BAR_2,
|
||||||
|
SCRIPT_SOUND_BUILDING_BAR_3,
|
||||||
|
SCRIPT_SOUND_BUILDING_BAR_4,
|
||||||
|
SCRIPT_SOUND_BUILDING_BIKER_BAR,
|
||||||
|
SCRIPT_SOUND_BUILDING_CHURCH,
|
||||||
|
SCRIPT_SOUND_BUILDING_CLUB,
|
||||||
|
SCRIPT_SOUND_BUILDING_CUBA_1,
|
||||||
|
SCRIPT_SOUND_BUILDING_CUBA_2,
|
||||||
|
SCRIPT_SOUND_BUILDING_VOODOO,
|
||||||
|
SCRIPT_SOUND_BUILDING_MUSIC_SHOP,
|
||||||
|
SCRIPT_SOUND_BUILDING_STRIPCLUB_1,
|
||||||
|
SCRIPT_SOUND_BUILDING_STRIPCLUB_2,
|
||||||
|
SCRIPT_SOUND_BUILDING_SUPERSWEEP,
|
||||||
|
SCRIPT_SOUND_SEAPLANE_LOW_FUEL,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_BAR_1,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_BAR_2,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_BAR_3,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_BAR_4,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_MALIBU_1,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_MALIBU_2,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_MALIBU_3,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_STRIP_1,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_STRIP_2,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_STRIP_3,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_CHURCH,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_FAN_1,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_FAN_2,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_INSECT_1,
|
||||||
|
SCRIPT_SOUND_NEW_BUILDING_INSECT_2,
|
||||||
|
SCRIPT_SOUND_NEW_WATERFALL,
|
||||||
SCRIPT_SOUND_BULLET_HIT_GROUND_1,
|
SCRIPT_SOUND_BULLET_HIT_GROUND_1,
|
||||||
SCRIPT_SOUND_BULLET_HIT_GROUND_2,
|
SCRIPT_SOUND_BULLET_HIT_GROUND_2,
|
||||||
SCRIPT_SOUND_BULLET_HIT_GROUND_3,
|
SCRIPT_SOUND_BULLET_HIT_GROUND_3,
|
||||||
SCRIPT_SOUND_BULLET_HIT_WATER, // no sound
|
SCRIPT_SOUND_BULLET_HIT_WATER, // no sound
|
||||||
SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_1,
|
|
||||||
SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_2,
|
|
||||||
SCRIPT_SOUND_PAYPHONE_RINGING,
|
SCRIPT_SOUND_PAYPHONE_RINGING,
|
||||||
SCRIPT_SOUND_113,
|
|
||||||
SCRIPT_SOUND_GLASS_BREAK_L,
|
SCRIPT_SOUND_GLASS_BREAK_L,
|
||||||
SCRIPT_SOUND_GLASS_BREAK_S,
|
SCRIPT_SOUND_GLASS_BREAK_S,
|
||||||
SCRIPT_SOUND_GLASS_CRACK,
|
SCRIPT_SOUND_GLASS_CRACK,
|
||||||
@@ -296,6 +274,7 @@ enum eScriptSounds {
|
|||||||
SCRIPT_SOUND_BOX_DESTROYED_2,
|
SCRIPT_SOUND_BOX_DESTROYED_2,
|
||||||
SCRIPT_SOUND_METAL_COLLISION,
|
SCRIPT_SOUND_METAL_COLLISION,
|
||||||
SCRIPT_SOUND_TIRE_COLLISION,
|
SCRIPT_SOUND_TIRE_COLLISION,
|
||||||
|
SCRIPT_SOUND_HIT_BALL,
|
||||||
SCRIPT_SOUND_GUNSHELL_DROP,
|
SCRIPT_SOUND_GUNSHELL_DROP,
|
||||||
SCRIPT_SOUND_GUNSHELL_DROP_SOFT,
|
SCRIPT_SOUND_GUNSHELL_DROP_SOFT,
|
||||||
SCRIPT_SOUND_TOTAL,
|
SCRIPT_SOUND_TOTAL,
|
||||||
|
|||||||
@@ -20,3 +20,25 @@ CBuilding::ReplaceWithNewModel(int32 id)
|
|||||||
if(m_level == LEVEL_GENERIC || m_level == CGame::currLevel)
|
if(m_level == LEVEL_GENERIC || m_level == CGame::currLevel)
|
||||||
CStreaming::RequestModel(id, STREAMFLAGS_DONT_REMOVE);
|
CStreaming::RequestModel(id, STREAMFLAGS_DONT_REMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
IsBuildingPointerValid(CBuilding* pBuilding)
|
||||||
|
{
|
||||||
|
if (!pBuilding)
|
||||||
|
return false;
|
||||||
|
if (pBuilding->GetIsATreadable()) {
|
||||||
|
int index = CPools::GetTreadablePool()->GetJustIndex_NoFreeAssert((CTreadable*)pBuilding);
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
return index >= 0 && index < CPools::GetTreadablePool()->GetSize();
|
||||||
|
#else
|
||||||
|
return index >= 0 && index <= CPools::GetTreadablePool()->GetSize();
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
int index = CPools::GetBuildingPool()->GetJustIndex_NoFreeAssert(pBuilding);
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
return index >= 0 && index < CPools::GetBuildingPool()->GetSize();
|
||||||
|
#else
|
||||||
|
return index >= 0 && index <= CPools::GetBuildingPool()->GetSize();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -17,5 +17,4 @@ public:
|
|||||||
virtual bool GetIsATreadable(void) { return false; }
|
virtual bool GetIsATreadable(void) { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(CBuilding, 0x64);
|
bool IsBuildingPointerValid(CBuilding*);
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,5 @@ public:
|
|||||||
static void *operator new(size_t);
|
static void *operator new(size_t);
|
||||||
static void operator delete(void*, size_t);
|
static void operator delete(void*, size_t);
|
||||||
|
|
||||||
int16 m_nodeIndices[2][12]; // first car, then ped
|
|
||||||
|
|
||||||
bool GetIsATreadable(void) { return true; }
|
bool GetIsATreadable(void) { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(CTreadable, 0x94);
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,15 +2,29 @@
|
|||||||
|
|
||||||
#include "SurfaceTable.h"
|
#include "SurfaceTable.h"
|
||||||
|
|
||||||
struct CColBox
|
struct CBox
|
||||||
{
|
{
|
||||||
CVector min;
|
CVector min;
|
||||||
CVector max;
|
CVector max;
|
||||||
|
CVector GetSize(void) { return max - min; }
|
||||||
|
void Set(const CVector &min, const CVector &max) { this->min = min; this->max = max; }
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CColBox : public CBox
|
||||||
|
{
|
||||||
uint8 surface;
|
uint8 surface;
|
||||||
uint8 piece;
|
uint8 piece;
|
||||||
|
|
||||||
void Set(const CVector &min, const CVector &max, uint8 surf = SURFACE_DEFAULT, uint8 piece = 0);
|
void Set(const CVector &min, const CVector &max, uint8 surf, uint8 piece);
|
||||||
CVector GetSize(void) { return max - min; }
|
using CBox::Set;
|
||||||
|
|
||||||
CColBox& operator=(const CColBox &other);
|
CColBox& operator=(const CColBox &other);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// no name for this
|
||||||
|
// bounds for a number of triangles
|
||||||
|
struct CColTriBBox : public CBox
|
||||||
|
{
|
||||||
|
int32 first;
|
||||||
|
int32 last;
|
||||||
|
};
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ struct CColLine
|
|||||||
{
|
{
|
||||||
// NB: this has to be compatible with two CVuVectors
|
// NB: this has to be compatible with two CVuVectors
|
||||||
CVector p0;
|
CVector p0;
|
||||||
int pad0;
|
// int pad0;
|
||||||
CVector p1;
|
CVector p1;
|
||||||
int pad1;
|
// int pad1;
|
||||||
|
|
||||||
CColLine(void) { };
|
CColLine(void) { };
|
||||||
CColLine(const CVector &p0, const CVector &p1) { this->p0 = p0; this->p1 = p1; };
|
CColLine(const CVector &p0, const CVector &p1) { this->p0 = p0; this->p1 = p1; };
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "main.h"
|
||||||
#include "ColModel.h"
|
#include "ColModel.h"
|
||||||
|
#include "Collision.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "MemoryHeap.h"
|
#include "MemoryHeap.h"
|
||||||
|
#include "Pools.h"
|
||||||
|
|
||||||
CColModel::CColModel(void)
|
CColModel::CColModel(void)
|
||||||
{
|
{
|
||||||
|
boundingSphere.Set(0.0001f, CVector(0.0f, 0.0f, 0.0f));
|
||||||
|
boundingBox.Set(CVector(0.0f, 0.0f, 0.0f), CVector(0.0f, 0.0f, 0.0f));
|
||||||
|
numTriBBoxes = 0;
|
||||||
|
triBBoxes = nil;
|
||||||
numSpheres = 0;
|
numSpheres = 0;
|
||||||
spheres = nil;
|
spheres = nil;
|
||||||
numLines = 0;
|
numLines = 0;
|
||||||
@@ -15,31 +22,58 @@ CColModel::CColModel(void)
|
|||||||
vertices = nil;
|
vertices = nil;
|
||||||
triangles = nil;
|
triangles = nil;
|
||||||
trianglePlanes = nil;
|
trianglePlanes = nil;
|
||||||
level = CGame::currLevel;
|
level = LEVEL_GENERIC; // generic col slot
|
||||||
ownsCollisionVolumes = true;
|
// ownsCollisionVolumes = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
CColModel::~CColModel(void)
|
CColModel::~CColModel(void)
|
||||||
{
|
{
|
||||||
RemoveCollisionVolumes();
|
if(!gNASTY_NASTY_MEM_SHUTDOWN_HACK){
|
||||||
RemoveTrianglePlanes();
|
RemoveTrianglePlanes();
|
||||||
|
RemoveCollisionVolumes();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//--LCS: no pool used, but maybe we better keep it?
|
||||||
|
void*
|
||||||
|
CColModel::operator new(size_t)
|
||||||
|
{
|
||||||
|
CColModel* node = CPools::GetColModelPool()->New();
|
||||||
|
assert(node);
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CColModel::operator delete(void *p, size_t)
|
||||||
|
{
|
||||||
|
CPools::GetColModelPool()->Delete((CColModel*)p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CColModel::RemoveCollisionVolumes(void)
|
CColModel::RemoveCollisionVolumes(void)
|
||||||
{
|
{
|
||||||
if(ownsCollisionVolumes){
|
#ifdef FIX_BUGS
|
||||||
RwFree(spheres);
|
// why is this missing?
|
||||||
RwFree(lines);
|
if(ownsCollisionVolumes)
|
||||||
RwFree(boxes);
|
#endif
|
||||||
RwFree(vertices);
|
if(!gUseChunkFiles){
|
||||||
RwFree(triangles);
|
delete[] triBBoxes;
|
||||||
|
delete[] spheres;
|
||||||
|
delete[] lines;
|
||||||
|
delete[] boxes;
|
||||||
|
delete[] vertices;
|
||||||
|
delete[] triangles;
|
||||||
}
|
}
|
||||||
|
CCollision::RemoveTrianglePlanes(this);
|
||||||
numSpheres = 0;
|
numSpheres = 0;
|
||||||
|
numTriBBoxes = 0;
|
||||||
numLines = 0;
|
numLines = 0;
|
||||||
numBoxes = 0;
|
numBoxes = 0;
|
||||||
numTriangles = 0;
|
numTriangles = 0;
|
||||||
spheres = nil;
|
spheres = nil;
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
triBBoxes = nil;
|
||||||
|
#endif
|
||||||
lines = nil;
|
lines = nil;
|
||||||
boxes = nil;
|
boxes = nil;
|
||||||
vertices = nil;
|
vertices = nil;
|
||||||
@@ -52,7 +86,7 @@ CColModel::CalculateTrianglePlanes(void)
|
|||||||
PUSH_MEMID(MEMID_COLLISION);
|
PUSH_MEMID(MEMID_COLLISION);
|
||||||
|
|
||||||
// HACK: allocate space for one more element to stuff the link pointer into
|
// HACK: allocate space for one more element to stuff the link pointer into
|
||||||
trianglePlanes = (CColTrianglePlane*)RwMalloc(sizeof(CColTrianglePlane) * (numTriangles+1));
|
trianglePlanes = new CColTrianglePlane[numTriangles+1];
|
||||||
REGISTER_MEMPTR(&trianglePlanes);
|
REGISTER_MEMPTR(&trianglePlanes);
|
||||||
for(int i = 0; i < numTriangles; i++)
|
for(int i = 0; i < numTriangles; i++)
|
||||||
trianglePlanes[i].Set(vertices, triangles[i]);
|
trianglePlanes[i].Set(vertices, triangles[i]);
|
||||||
@@ -63,8 +97,10 @@ CColModel::CalculateTrianglePlanes(void)
|
|||||||
void
|
void
|
||||||
CColModel::RemoveTrianglePlanes(void)
|
CColModel::RemoveTrianglePlanes(void)
|
||||||
{
|
{
|
||||||
RwFree(trianglePlanes);
|
if(trianglePlanes){
|
||||||
trianglePlanes = nil;
|
delete[] trianglePlanes;
|
||||||
|
trianglePlanes = nil;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -96,20 +132,33 @@ CColModel::operator=(const CColModel &other)
|
|||||||
boundingSphere = other.boundingSphere;
|
boundingSphere = other.boundingSphere;
|
||||||
boundingBox = other.boundingBox;
|
boundingBox = other.boundingBox;
|
||||||
|
|
||||||
|
// copy tri bboxes
|
||||||
|
if(other.numTriBBoxes){
|
||||||
|
if(numTriBBoxes != other.numTriBBoxes){
|
||||||
|
numTriBBoxes = other.numTriBBoxes;
|
||||||
|
delete[] triBBoxes;
|
||||||
|
triBBoxes = new CColTriBBox[numTriBBoxes];
|
||||||
|
}
|
||||||
|
for(i = 0; i < numTriBBoxes; i++)
|
||||||
|
triBBoxes[i] = other.triBBoxes[i];
|
||||||
|
}else{
|
||||||
|
numTriBBoxes = 0;
|
||||||
|
delete[] triBBoxes;
|
||||||
|
triBBoxes = nil;
|
||||||
|
}
|
||||||
|
|
||||||
// copy spheres
|
// copy spheres
|
||||||
if(other.numSpheres){
|
if(other.numSpheres){
|
||||||
if(numSpheres != other.numSpheres){
|
if(numSpheres != other.numSpheres){
|
||||||
numSpheres = other.numSpheres;
|
numSpheres = other.numSpheres;
|
||||||
if(spheres)
|
delete[] spheres;
|
||||||
RwFree(spheres);
|
spheres = new CColSphere[numSpheres];
|
||||||
spheres = (CColSphere*)RwMalloc(numSpheres*sizeof(CColSphere));
|
|
||||||
}
|
}
|
||||||
for(i = 0; i < numSpheres; i++)
|
for(i = 0; i < numSpheres; i++)
|
||||||
spheres[i] = other.spheres[i];
|
spheres[i] = other.spheres[i];
|
||||||
}else{
|
}else{
|
||||||
numSpheres = 0;
|
numSpheres = 0;
|
||||||
if(spheres)
|
delete[] spheres;
|
||||||
RwFree(spheres);
|
|
||||||
spheres = nil;
|
spheres = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,16 +166,14 @@ CColModel::operator=(const CColModel &other)
|
|||||||
if(other.numLines){
|
if(other.numLines){
|
||||||
if(numLines != other.numLines){
|
if(numLines != other.numLines){
|
||||||
numLines = other.numLines;
|
numLines = other.numLines;
|
||||||
if(lines)
|
delete[] lines;
|
||||||
RwFree(lines);
|
lines = new CColLine[numLines];
|
||||||
lines = (CColLine*)RwMalloc(numLines*sizeof(CColLine));
|
|
||||||
}
|
}
|
||||||
for(i = 0; i < numLines; i++)
|
for(i = 0; i < numLines; i++)
|
||||||
lines[i] = other.lines[i];
|
lines[i] = other.lines[i];
|
||||||
}else{
|
}else{
|
||||||
numLines = 0;
|
numLines = 0;
|
||||||
if(lines)
|
delete[] lines;
|
||||||
RwFree(lines);
|
|
||||||
lines = nil;
|
lines = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,23 +181,21 @@ CColModel::operator=(const CColModel &other)
|
|||||||
if(other.numBoxes){
|
if(other.numBoxes){
|
||||||
if(numBoxes != other.numBoxes){
|
if(numBoxes != other.numBoxes){
|
||||||
numBoxes = other.numBoxes;
|
numBoxes = other.numBoxes;
|
||||||
if(boxes)
|
delete[] boxes;
|
||||||
RwFree(boxes);
|
boxes = new CColBox[numBoxes];
|
||||||
boxes = (CColBox*)RwMalloc(numBoxes*sizeof(CColBox));
|
|
||||||
}
|
}
|
||||||
for(i = 0; i < numBoxes; i++)
|
for(i = 0; i < numBoxes; i++)
|
||||||
boxes[i] = other.boxes[i];
|
boxes[i] = other.boxes[i];
|
||||||
}else{
|
}else{
|
||||||
numBoxes = 0;
|
numBoxes = 0;
|
||||||
if(boxes)
|
delete[] boxes;
|
||||||
RwFree(boxes);
|
|
||||||
boxes = nil;
|
boxes = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy mesh
|
// copy mesh
|
||||||
if(other.numTriangles){
|
if(other.numTriangles){
|
||||||
// copy vertices
|
// copy vertices
|
||||||
numVerts = 0;
|
numVerts = -1;
|
||||||
for(i = 0; i < other.numTriangles; i++){
|
for(i = 0; i < other.numTriangles; i++){
|
||||||
if(other.triangles[i].a > numVerts)
|
if(other.triangles[i].a > numVerts)
|
||||||
numVerts = other.triangles[i].a;
|
numVerts = other.triangles[i].a;
|
||||||
@@ -160,10 +205,9 @@ CColModel::operator=(const CColModel &other)
|
|||||||
numVerts = other.triangles[i].c;
|
numVerts = other.triangles[i].c;
|
||||||
}
|
}
|
||||||
numVerts++;
|
numVerts++;
|
||||||
if(vertices)
|
delete[] vertices;
|
||||||
RwFree(vertices);
|
|
||||||
if(numVerts){
|
if(numVerts){
|
||||||
vertices = (CompressedVector*)RwMalloc(numVerts*sizeof(CompressedVector));
|
vertices = new CompressedVector[numVerts];
|
||||||
for(i = 0; i < numVerts; i++)
|
for(i = 0; i < numVerts; i++)
|
||||||
vertices[i] = other.vertices[i];
|
vertices[i] = other.vertices[i];
|
||||||
}
|
}
|
||||||
@@ -171,20 +215,54 @@ CColModel::operator=(const CColModel &other)
|
|||||||
// copy triangles
|
// copy triangles
|
||||||
if(numTriangles != other.numTriangles){
|
if(numTriangles != other.numTriangles){
|
||||||
numTriangles = other.numTriangles;
|
numTriangles = other.numTriangles;
|
||||||
if(triangles)
|
delete[] triangles;
|
||||||
RwFree(triangles);
|
triangles = new CColTriangle[numTriangles];
|
||||||
triangles = (CColTriangle*)RwMalloc(numTriangles*sizeof(CColTriangle));
|
|
||||||
}
|
}
|
||||||
for(i = 0; i < numTriangles; i++)
|
for(i = 0; i < numTriangles; i++)
|
||||||
triangles[i] = other.triangles[i];
|
triangles[i] = other.triangles[i];
|
||||||
}else{
|
}else{
|
||||||
numTriangles = 0;
|
numTriangles = 0;
|
||||||
if(triangles)
|
delete[] triangles;
|
||||||
RwFree(triangles);
|
|
||||||
triangles = nil;
|
triangles = nil;
|
||||||
if(vertices)
|
delete[] vertices;
|
||||||
RwFree(vertices);
|
|
||||||
vertices = nil;
|
vertices = nil;
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
CColModel::Write(base::cRelocatableChunkWriter &writer, bool allocSpace)
|
||||||
|
{
|
||||||
|
int numVerts = -1;
|
||||||
|
for(int i = 0; i < numTriangles; i++){
|
||||||
|
if(triangles[i].a > numVerts)
|
||||||
|
numVerts = triangles[i].a;
|
||||||
|
if(triangles[i].b > numVerts)
|
||||||
|
numVerts = triangles[i].b;
|
||||||
|
if(triangles[i].c > numVerts)
|
||||||
|
numVerts = triangles[i].c;
|
||||||
|
}
|
||||||
|
numVerts++;
|
||||||
|
|
||||||
|
if(allocSpace)
|
||||||
|
writer.AllocateRaw(this, sizeof(*this), 16, false, true);
|
||||||
|
writer.AllocateRaw(spheres, sizeof(*spheres)*numSpheres, 16, false, true);
|
||||||
|
writer.AddPatch(&spheres);
|
||||||
|
writer.AllocateRaw(lines, sizeof(*lines)*numLines, 16, false, true);
|
||||||
|
writer.AddPatch(&lines);
|
||||||
|
writer.AllocateRaw(boxes, sizeof(*boxes)*numBoxes, 16, false, true);
|
||||||
|
writer.AddPatch(&boxes);
|
||||||
|
if(triBBoxes && numTriBBoxes != 0){
|
||||||
|
writer.AllocateRaw(triBBoxes, sizeof(*triBBoxes)*numTriBBoxes, 16, false, true);
|
||||||
|
writer.AddPatch(&triBBoxes);
|
||||||
|
}else
|
||||||
|
triBBoxes = nil;
|
||||||
|
if(numTriangles != 0){
|
||||||
|
writer.AllocateRaw(vertices, sizeof(*vertices)*numVerts, 2, false, true);
|
||||||
|
writer.AddPatch(&vertices);
|
||||||
|
writer.AllocateRaw(triangles, sizeof(*triangles)*numTriangles, 2, false, true);
|
||||||
|
writer.AddPatch(&triangles);
|
||||||
|
RemoveTrianglePlanes();
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,17 +9,19 @@
|
|||||||
|
|
||||||
struct CColModel
|
struct CColModel
|
||||||
{
|
{
|
||||||
CColSphere boundingSphere;
|
CSphere boundingSphere;
|
||||||
CColBox boundingBox;
|
CBox boundingBox;
|
||||||
int16 numSpheres;
|
int16 numSpheres;
|
||||||
int16 numLines;
|
|
||||||
int16 numBoxes;
|
int16 numBoxes;
|
||||||
int16 numTriangles;
|
int16 numTriangles;
|
||||||
int32 level;
|
int8 numLines;
|
||||||
bool ownsCollisionVolumes; // missing on PS2
|
int8 numTriBBoxes;
|
||||||
|
uint8 level; // colstore slot but probably still named level
|
||||||
|
bool ownsCollisionVolumes;
|
||||||
CColSphere *spheres;
|
CColSphere *spheres;
|
||||||
CColLine *lines;
|
CColLine *lines;
|
||||||
CColBox *boxes;
|
CColBox *boxes;
|
||||||
|
CColTriBBox *triBBoxes;
|
||||||
CompressedVector *vertices;
|
CompressedVector *vertices;
|
||||||
CColTriangle *triangles;
|
CColTriangle *triangles;
|
||||||
CColTrianglePlane *trianglePlanes;
|
CColTrianglePlane *trianglePlanes;
|
||||||
@@ -33,5 +35,9 @@ struct CColModel
|
|||||||
void SetLinkPtr(CLink<CColModel*>*);
|
void SetLinkPtr(CLink<CColModel*>*);
|
||||||
void GetTrianglePoint(CVector &v, int i) const;
|
void GetTrianglePoint(CVector &v, int i) const;
|
||||||
|
|
||||||
|
void *operator new(size_t);
|
||||||
|
void operator delete(void *p, size_t);
|
||||||
CColModel& operator=(const CColModel& other);
|
CColModel& operator=(const CColModel& other);
|
||||||
|
|
||||||
|
bool Write(base::cRelocatableChunkWriter &writer, bool allocSpace);
|
||||||
};
|
};
|
||||||
@@ -3,15 +3,13 @@
|
|||||||
struct CColPoint
|
struct CColPoint
|
||||||
{
|
{
|
||||||
CVector point;
|
CVector point;
|
||||||
int pad1;
|
float depth;
|
||||||
// the surface normal on the surface of point
|
// the surface normal on the surface of point
|
||||||
CVector normal;
|
CVector normal;
|
||||||
int pad2;
|
|
||||||
uint8 surfaceA;
|
uint8 surfaceA;
|
||||||
uint8 pieceA;
|
uint8 pieceA;
|
||||||
uint8 surfaceB;
|
uint8 surfaceB;
|
||||||
uint8 pieceB;
|
uint8 pieceB;
|
||||||
float depth;
|
|
||||||
|
|
||||||
const CVector &GetNormal() { return normal; }
|
const CVector &GetNormal() { return normal; }
|
||||||
float GetDepth() { return depth; }
|
float GetDepth() { return depth; }
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "ColSphere.h"
|
#include "ColSphere.h"
|
||||||
|
#include "General.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
CColSphere::Set(float radius, const CVector ¢er, uint8 surf, uint8 piece)
|
CColSphere::Set(float radius, const CVector ¢er, uint8 surf, uint8 piece)
|
||||||
@@ -9,3 +10,18 @@ CColSphere::Set(float radius, const CVector ¢er, uint8 surf, uint8 piece)
|
|||||||
this->surface = surf;
|
this->surface = surf;
|
||||||
this->piece = piece;
|
this->piece = piece;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
CColSphere::IntersectRay(CVector const& from, CVector const& dir, CVector &entry, CVector &exit)
|
||||||
|
{
|
||||||
|
CVector distToCenter = from - center;
|
||||||
|
float distToTouchSqr = distToCenter.MagnitudeSqr() - sq(radius);
|
||||||
|
float root1, root2;
|
||||||
|
|
||||||
|
if (!CGeneral::SolveQuadratic(1.0f, DotProduct(distToCenter, dir) * 2.f, distToTouchSqr, root1, root2))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
entry = from + dir * root1;
|
||||||
|
exit = from + dir * root2;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -2,12 +2,21 @@
|
|||||||
|
|
||||||
#include "SurfaceTable.h"
|
#include "SurfaceTable.h"
|
||||||
|
|
||||||
struct CColSphere
|
// TODO(LCS): maybe this was in a union with CVuVector? or is the alignment manual?
|
||||||
|
struct TYPEALIGN(16) CSphere
|
||||||
{
|
{
|
||||||
// NB: this has to be compatible with a CVuVector
|
// NB: this has to be compatible with a CVuVector
|
||||||
CVector center;
|
RwV3d center;
|
||||||
float radius;
|
float radius;
|
||||||
|
void Set(float radius, const CVector ¢er) { this->center = center; this->radius = radius; }
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CColSphere : public CSphere
|
||||||
|
{
|
||||||
uint8 surface;
|
uint8 surface;
|
||||||
uint8 piece;
|
uint8 piece;
|
||||||
void Set(float radius, const CVector ¢er, uint8 surf = SURFACE_DEFAULT, uint8 piece = 0);
|
|
||||||
|
void Set(float radius, const CVector ¢er, uint8 surf, uint8 piece);
|
||||||
|
bool IntersectRay(CVector const &from, CVector const &dir, CVector &entry, CVector &exit);
|
||||||
|
using CSphere::Set;
|
||||||
};
|
};
|
||||||
403
src/collision/ColStore.cpp
Normal file
403
src/collision/ColStore.cpp
Normal file
@@ -0,0 +1,403 @@
|
|||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
|
#include "smallHeap.h"
|
||||||
|
#include "templates.h"
|
||||||
|
#include "General.h"
|
||||||
|
#include "ModelInfo.h"
|
||||||
|
#include "Streaming.h"
|
||||||
|
#include "FileLoader.h"
|
||||||
|
#include "Script.h"
|
||||||
|
#include "Timer.h"
|
||||||
|
#include "Camera.h"
|
||||||
|
#include "World.h"
|
||||||
|
#include "Zones.h"
|
||||||
|
#include "Garages.h"
|
||||||
|
#include "Frontend.h"
|
||||||
|
#include "Physical.h"
|
||||||
|
#include "ColStore.h"
|
||||||
|
#include "VarConsole.h"
|
||||||
|
#include "Pools.h"
|
||||||
|
|
||||||
|
CPool<ColDef,ColDef> *CColStore::ms_pColPool;
|
||||||
|
bool CColStore::m_onlyBB;
|
||||||
|
#ifndef MASTER
|
||||||
|
bool bDispColInMem;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// LCS: file done except unused:
|
||||||
|
// CColStore::LoadCol(int,char const*)
|
||||||
|
// CColStore::LoadAllBoundingBoxes(void)
|
||||||
|
// CColStore::Write(base::cRelocatableChunkWriter &)
|
||||||
|
|
||||||
|
const CVector&
|
||||||
|
LevelPos(eLevelName level)
|
||||||
|
{
|
||||||
|
static CVector pos[4] = {
|
||||||
|
CVector(1060.0f, -800.0f, 0.0f),
|
||||||
|
CVector(1060.0f, -800.0f, 0.0f),
|
||||||
|
CVector(350.0f, -624.0f, 0.0f),
|
||||||
|
CVector(-670.0f, -511.0f, 0.0f)
|
||||||
|
};
|
||||||
|
return pos[level];
|
||||||
|
};
|
||||||
|
|
||||||
|
static eLevelName
|
||||||
|
PosLevel(const CVector &pos)
|
||||||
|
{
|
||||||
|
static eLevelName lastPlayerLevel = LEVEL_INDUSTRIAL;
|
||||||
|
static eLevelName lastOtherLevel = LEVEL_INDUSTRIAL;
|
||||||
|
|
||||||
|
if(Abs(FindPlayerCoors().x - pos.x) < 5.0f &&
|
||||||
|
Abs(FindPlayerCoors().y - pos.y) < 5.0f &&
|
||||||
|
Abs(FindPlayerCoors().z - pos.z) < 5.0f){
|
||||||
|
if(CGame::currLevel != LEVEL_GENERIC)
|
||||||
|
lastPlayerLevel = CGame::currLevel;
|
||||||
|
return lastPlayerLevel;
|
||||||
|
}else{
|
||||||
|
eLevelName lvl = CTheZones::GetLevelFromPosition(&pos);
|
||||||
|
if(lvl != LEVEL_GENERIC)
|
||||||
|
lastOtherLevel = lvl;
|
||||||
|
return lastOtherLevel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CColStore::Initialise(void)
|
||||||
|
{
|
||||||
|
if(ms_pColPool == nil){
|
||||||
|
ms_pColPool = new CPool<ColDef,ColDef>(COLSTORESIZE, "CollisionFiles");
|
||||||
|
AddColSlot("generic"); // slot 0. not streamed
|
||||||
|
}
|
||||||
|
#ifndef MASTER
|
||||||
|
VarConsole.Add("Display collision in memory", &bDispColInMem, true);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CColStore::Shutdown(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for(i = 0; i < COLSTORESIZE; i++)
|
||||||
|
RemoveColSlot(i);
|
||||||
|
if(ms_pColPool)
|
||||||
|
delete ms_pColPool;
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
ms_pColPool = nil;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
CColStore::AddColSlot(const char *name)
|
||||||
|
{
|
||||||
|
ColDef *def = ms_pColPool->New();
|
||||||
|
assert(def);
|
||||||
|
def->isLoaded = false;
|
||||||
|
def->unused = 0;
|
||||||
|
def->bounds.left = 1000000.0f;
|
||||||
|
def->bounds.top = 1000000.0f;
|
||||||
|
def->bounds.right = -1000000.0f;
|
||||||
|
def->bounds.bottom = -1000000.0f;
|
||||||
|
def->minIndex = INT16_MAX;
|
||||||
|
def->maxIndex = INT16_MIN;
|
||||||
|
strcpy(def->name, name);
|
||||||
|
return ms_pColPool->GetJustIndex(def);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CColStore::RemoveColSlot(int slot)
|
||||||
|
{
|
||||||
|
if(GetSlot(slot)){
|
||||||
|
if(GetSlot(slot)->isLoaded)
|
||||||
|
RemoveCol(slot);
|
||||||
|
ms_pColPool->Delete(GetSlot(slot));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
CColStore::FindColSlot(const char *name)
|
||||||
|
{
|
||||||
|
ColDef *def;
|
||||||
|
int size = ms_pColPool->GetSize();
|
||||||
|
for(int i = 0; i < size; i++){
|
||||||
|
def = GetSlot(i);
|
||||||
|
if(def && !CGeneral::faststricmp(def->name, name))
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
char*
|
||||||
|
CColStore::GetColName(int32 slot)
|
||||||
|
{
|
||||||
|
return GetSlot(slot)->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
CRect&
|
||||||
|
CColStore::GetBoundingBox(int32 slot)
|
||||||
|
{
|
||||||
|
return GetSlot(slot)->bounds;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CColStore::IncludeModelIndex(int32 slot, int32 modelIndex)
|
||||||
|
{
|
||||||
|
ColDef *def = GetSlot(slot);
|
||||||
|
if(modelIndex < def->minIndex)
|
||||||
|
def->minIndex = modelIndex;
|
||||||
|
if(modelIndex > def->maxIndex)
|
||||||
|
def->maxIndex = modelIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
CColStore::LoadCol(int32 slot, uint8 *buffer, int32 bufsize)
|
||||||
|
{
|
||||||
|
bool success;
|
||||||
|
ColDef *def = GetSlot(slot);
|
||||||
|
if(def->minIndex > def->maxIndex)
|
||||||
|
success = CFileLoader::LoadCollisionFileFirstTime(buffer, bufsize, slot);
|
||||||
|
else
|
||||||
|
success = CFileLoader::LoadCollisionFile(buffer, bufsize, slot);
|
||||||
|
if(success)
|
||||||
|
def->isLoaded = true;
|
||||||
|
else
|
||||||
|
debug("Failed to load Collision\n");
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct ColChunkEntry
|
||||||
|
{
|
||||||
|
int32 modelId; // -1 marks end
|
||||||
|
CColModel *colModel;
|
||||||
|
};
|
||||||
|
|
||||||
|
void
|
||||||
|
CColStore::LoadColCHK(int32 slot, void *data, void *chunk)
|
||||||
|
{
|
||||||
|
ColDef *def = GetSlot(slot);
|
||||||
|
def->chunk = chunk;
|
||||||
|
CStreaming::RegisterPointer(&def->chunk, 1, true);
|
||||||
|
for(ColChunkEntry *entry = (ColChunkEntry*)data; entry->modelId != -1; entry++){
|
||||||
|
CBaseModelInfo *mi = CModelInfo::GetModelInfo(entry->modelId);
|
||||||
|
mi->SetColModel(entry->colModel, true); // we own this? can that work?
|
||||||
|
CStreaming::RegisterPointer(&mi->m_colModel, 1, true);
|
||||||
|
}
|
||||||
|
def->isLoaded = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
CColModel nullCollision;
|
||||||
|
|
||||||
|
void
|
||||||
|
CColStore::RemoveCol(int32 slot)
|
||||||
|
{
|
||||||
|
int id;
|
||||||
|
ColDef *def = GetSlot(slot);
|
||||||
|
def->isLoaded = false;
|
||||||
|
for(id = 0; id < MODELINFOSIZE; id++){
|
||||||
|
CBaseModelInfo *mi = CModelInfo::GetModelInfo(id);
|
||||||
|
if(mi){
|
||||||
|
CColModel *col = mi->GetColModel();
|
||||||
|
if(col && col->level == slot)
|
||||||
|
col->RemoveCollisionVolumes();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(gUseChunkFiles){
|
||||||
|
for(id = 0; id < MODELINFOSIZE; id++){
|
||||||
|
CBaseModelInfo *mi = CModelInfo::GetModelInfo(id);
|
||||||
|
if(mi){
|
||||||
|
CColModel *col = mi->GetColModel();
|
||||||
|
if(col && col->level == slot){
|
||||||
|
mi->SetColModel(&nullCollision);
|
||||||
|
CStreaming::UnregisterPointer(&mi->m_colModel, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(def->chunk){
|
||||||
|
CStreaming::UnregisterPointer(&def->chunk, 1);
|
||||||
|
cSmallHeap::msInstance.Free(def->chunk);
|
||||||
|
def->chunk = nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CColStore::LoadAllCollision(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for(i = 1; i < COLSTORESIZE; i++)
|
||||||
|
if(GetSlot(i))
|
||||||
|
CStreaming::RequestCol(i, 0);
|
||||||
|
|
||||||
|
CStreaming::LoadAllRequestedModels(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CColStore::RemoveAllCollision(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for(i = 1; i < COLSTORESIZE; i++)
|
||||||
|
if(GetSlot(i))
|
||||||
|
if(CStreaming::CanRemoveCol(i))
|
||||||
|
CStreaming::RemoveCol(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool bLoadAtSecondPosition;
|
||||||
|
static CVector secondPosition;
|
||||||
|
|
||||||
|
void
|
||||||
|
CColStore::AddCollisionNeededAtPosn(const CVector &pos)
|
||||||
|
{
|
||||||
|
bLoadAtSecondPosition = true;
|
||||||
|
secondPosition = pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CColStore::LoadCollision(const CVector &pos, eLevelName level)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if(CStreaming::ms_disableStreaming)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(level == LEVEL_GENERIC)
|
||||||
|
level = PosLevel(pos);
|
||||||
|
|
||||||
|
eLevelName allowedLevel = (eLevelName)CTheScripts::AllowedCollision[0];
|
||||||
|
if(allowedLevel == LEVEL_GENERIC)
|
||||||
|
allowedLevel = (eLevelName)CTheScripts::AllowedCollision[1];
|
||||||
|
|
||||||
|
bool requestedSomething = false;
|
||||||
|
|
||||||
|
for(i = 1; i < COLSTORESIZE; i++){
|
||||||
|
if(GetSlot(i) == nil || !DoScriptsWantThisIn(i))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
bool wantThisOne = false;
|
||||||
|
|
||||||
|
if(strcmp(GetColName(i), "indust") == 0){
|
||||||
|
if(allowedLevel != LEVEL_GENERIC && level != LEVEL_INDUSTRIAL)
|
||||||
|
wantThisOne = allowedLevel == LEVEL_INDUSTRIAL;
|
||||||
|
else
|
||||||
|
wantThisOne = level == LEVEL_INDUSTRIAL;
|
||||||
|
}else if(GetBoundingBox(i).IsPointInside(LevelPos(level)))
|
||||||
|
wantThisOne = true;
|
||||||
|
else if(allowedLevel != LEVEL_GENERIC && GetBoundingBox(i).IsPointInside(LevelPos(allowedLevel)))
|
||||||
|
wantThisOne = true;
|
||||||
|
|
||||||
|
/* // LCS: removed
|
||||||
|
if(GetBoundingBox(i).IsPointInside(pos) ||
|
||||||
|
bLoadAtSecondPosition && GetBoundingBox(i).IsPointInside(secondPosition, -119.0f) ||
|
||||||
|
strcmp(GetColName(i), "yacht") == 0){
|
||||||
|
wantThisOne = true;
|
||||||
|
}else{
|
||||||
|
for (int j = 0; j < MAX_CLEANUP; j++) {
|
||||||
|
CPhysical* pEntity = nil;
|
||||||
|
cleanup_entity_struct* pCleanup = &CTheScripts::MissionCleanUp.m_sEntities[i];
|
||||||
|
if (pCleanup->type == CLEANUP_CAR) {
|
||||||
|
pEntity = CPools::GetVehiclePool()->GetAt(pCleanup->id);
|
||||||
|
if (!pEntity || pEntity->GetStatus() == STATUS_WRECKED)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if (pCleanup->type == CLEANUP_CHAR) {
|
||||||
|
pEntity = CPools::GetPedPool()->GetAt(pCleanup->id);
|
||||||
|
if (!pEntity || ((CPed*)pEntity)->DyingOrDead())
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (pEntity && !pEntity->bDontLoadCollision && !pEntity->bIsFrozen) {
|
||||||
|
if (GetBoundingBox(i).IsPointInside(pEntity->GetPosition(), -80.0f))
|
||||||
|
wantThisOne = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
if(wantThisOne){
|
||||||
|
CStreaming::RequestCol(i, STREAMFLAGS_PRIORITY);
|
||||||
|
requestedSomething = true;
|
||||||
|
}else
|
||||||
|
CStreaming::RemoveCol(i);
|
||||||
|
}
|
||||||
|
if(requestedSomething){
|
||||||
|
CTimer::Suspend();
|
||||||
|
// BUG? request was done with priority but now loading non-priority?
|
||||||
|
CStreaming::LoadAllRequestedModels(false);
|
||||||
|
CGarages::SetupAnyGaragesForThisIsland();
|
||||||
|
CTimer::Resume();
|
||||||
|
}
|
||||||
|
bLoadAtSecondPosition = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CColStore::RequestCollision(const CVector &pos)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for(i = 1; i < COLSTORESIZE; i++)
|
||||||
|
if(GetSlot(i) && DoScriptsWantThisIn(i) && GetBoundingBox(i).IsPointInside(LevelPos(PosLevel(pos)), -115.0f))
|
||||||
|
CStreaming::RequestCol(i, STREAMFLAGS_PRIORITY);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CColStore::EnsureCollisionIsInMemory(const CVector &pos)
|
||||||
|
{
|
||||||
|
/* // LCS: removed
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if(CStreaming::ms_disableStreaming)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for(i = 1; i < COLSTORESIZE; i++)
|
||||||
|
if(GetSlot(i) && GetBoundingBox(i).IsPointInside(pos, -110.0f) &&
|
||||||
|
!CStreaming::HasColLoaded(i)){
|
||||||
|
CStreaming::RequestCol(i, 0);
|
||||||
|
if(TheCamera.GetScreenFadeStatus() == FADE_0)
|
||||||
|
FrontEndMenuManager.MessageScreen("LOADCOL", false);
|
||||||
|
CTimer::Suspend();
|
||||||
|
CStreaming::LoadAllRequestedModels(false);
|
||||||
|
CTimer::Resume();
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
CColStore::DoScriptsWantThisIn(int32 slot)
|
||||||
|
{
|
||||||
|
if(slot == 0)
|
||||||
|
return false;
|
||||||
|
ColDef *coldef = GetSlot(slot);
|
||||||
|
if(coldef == nil)
|
||||||
|
return false;
|
||||||
|
if(strcmp(coldef->name, "fortstaunton") == 0)
|
||||||
|
return !CTheScripts::IsFortStauntonDestroyed();
|
||||||
|
if(strcmp(coldef->name, "fortdestroyed") == 0)
|
||||||
|
return CTheScripts::IsFortStauntonDestroyed();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
CColStore::HasCollisionLoaded(eLevelName level)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
const CVector &pos = LevelPos(level);
|
||||||
|
for(i = 1; i < COLSTORESIZE; i++)
|
||||||
|
if(GetSlot(i) && DoScriptsWantThisIn(i) &&
|
||||||
|
(!CGeneral::faststricmp(GetColName(i), "indust") && level == LEVEL_INDUSTRIAL ||
|
||||||
|
GetBoundingBox(i).IsPointInside(pos)) &&
|
||||||
|
!GetSlot(i)->isLoaded)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
CColStore::HasCollisionLoaded(const CVector &pos)
|
||||||
|
{
|
||||||
|
return HasCollisionLoaded(PosLevel(pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CColStore::Load(bool onlyBB, CPool<ColDef> *pool)
|
||||||
|
{
|
||||||
|
ms_pColPool = pool;
|
||||||
|
m_onlyBB = onlyBB;
|
||||||
|
}
|
||||||
49
src/collision/ColStore.h
Normal file
49
src/collision/ColStore.h
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "templates.h"
|
||||||
|
|
||||||
|
struct ColDef { // made up name
|
||||||
|
int32 unused;
|
||||||
|
bool isLoaded;
|
||||||
|
CRect bounds;
|
||||||
|
char name[20];
|
||||||
|
int16 minIndex;
|
||||||
|
int16 maxIndex;
|
||||||
|
void *chunk;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CColStore
|
||||||
|
{
|
||||||
|
static CPool<ColDef,ColDef> *ms_pColPool;
|
||||||
|
static bool m_onlyBB;
|
||||||
|
|
||||||
|
public:
|
||||||
|
static void Initialise(void);
|
||||||
|
static void Shutdown(void);
|
||||||
|
static int AddColSlot(const char *name);
|
||||||
|
static void RemoveColSlot(int32 slot);
|
||||||
|
static int FindColSlot(const char *name);
|
||||||
|
static char *GetColName(int32 slot);
|
||||||
|
static CRect &GetBoundingBox(int32 slot);
|
||||||
|
static void IncludeModelIndex(int32 slot, int32 modelIndex);
|
||||||
|
static bool LoadCol(int32 storeID, uint8 *buffer, int32 bufsize);
|
||||||
|
static void LoadColCHK(int32 slot, void *data, void *chunk);
|
||||||
|
static void RemoveCol(int32 slot);
|
||||||
|
static void AddCollisionNeededAtPosn(const CVector &pos);
|
||||||
|
static void LoadAllCollision(void);
|
||||||
|
static void RemoveAllCollision(void);
|
||||||
|
static void LoadCollision(const CVector &pos, eLevelName level = LEVEL_GENERIC);
|
||||||
|
static void RequestCollision(const CVector &pos);
|
||||||
|
static void EnsureCollisionIsInMemory(const CVector &pos);
|
||||||
|
static bool DoScriptsWantThisIn(int32 slot);
|
||||||
|
static bool HasCollisionLoaded(eLevelName level);
|
||||||
|
static bool HasCollisionLoaded(const CVector &pos);
|
||||||
|
static void Load(bool, CPool<ColDef> *pool);
|
||||||
|
|
||||||
|
static ColDef *GetSlot(int slot) {
|
||||||
|
assert(slot >= 0);
|
||||||
|
assert(ms_pColPool);
|
||||||
|
assert(slot < ms_pColPool->GetSize());
|
||||||
|
return ms_pColPool->GetSlot(slot);
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,15 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "ColTriangle.h"
|
#include "ColTriangle.h"
|
||||||
|
|
||||||
void
|
|
||||||
CColTriangle::Set(const CompressedVector *, int a, int b, int c, uint8 surf, uint8 piece)
|
|
||||||
{
|
|
||||||
this->a = a;
|
|
||||||
this->b = b;
|
|
||||||
this->c = c;
|
|
||||||
this->surface = surf;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef VU_COLLISION
|
#ifdef VU_COLLISION
|
||||||
void
|
void
|
||||||
CColTrianglePlane::Set(const CVector &va, const CVector &vb, const CVector &vc)
|
CColTrianglePlane::Set(const CVector &va, const CVector &vb, const CVector &vc)
|
||||||
|
|||||||
@@ -18,7 +18,13 @@ struct CColTriangle
|
|||||||
uint16 c;
|
uint16 c;
|
||||||
uint8 surface;
|
uint8 surface;
|
||||||
|
|
||||||
void Set(const CompressedVector *v, int a, int b, int c, uint8 surf, uint8 piece);
|
void Set(int a, int b, int c, uint8 surf)
|
||||||
|
{
|
||||||
|
this->a = a;
|
||||||
|
this->b = b;
|
||||||
|
this->c = c;
|
||||||
|
this->surface = surf;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CColTrianglePlane
|
struct CColTrianglePlane
|
||||||
@@ -56,6 +62,7 @@ struct CColTrianglePlane
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
// TODO(LCS): LCS actually uses CompressedVector too
|
||||||
CVector normal;
|
CVector normal;
|
||||||
float dist;
|
float dist;
|
||||||
uint8 dir;
|
uint8 dir;
|
||||||
@@ -63,6 +70,9 @@ struct CColTrianglePlane
|
|||||||
void Set(const CVector &va, const CVector &vb, const CVector &vc);
|
void Set(const CVector &va, const CVector &vb, const CVector &vc);
|
||||||
void Set(const CompressedVector *v, CColTriangle &tri) { Set(v[tri.a].Get(), v[tri.b].Get(), v[tri.c].Get()); }
|
void Set(const CompressedVector *v, CColTriangle &tri) { Set(v[tri.a].Get(), v[tri.b].Get(), v[tri.c].Get()); }
|
||||||
void GetNormal(CVector &n) const { n = normal; }
|
void GetNormal(CVector &n) const { n = normal; }
|
||||||
|
float GetNormalX() const { return normal.x; }
|
||||||
|
float GetNormalY() const { return normal.y; }
|
||||||
|
float GetNormalZ() const { return normal.z; }
|
||||||
float CalcPoint(const CVector &v) const { return DotProduct(normal, v) - dist; };
|
float CalcPoint(const CVector &v) const { return DotProduct(normal, v) - dist; };
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user