Compare commits
1076
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be3e5a964d | ||
|
|
83d20a72ab | ||
|
|
e47e58a982 | ||
|
|
c05068f22f | ||
|
|
f5cb473f3d | ||
|
|
c5b72f24b5 | ||
|
|
7c34733eea | ||
|
|
393ade780c | ||
|
|
8b2e6ea17b | ||
|
|
8c31682723 | ||
|
|
7c87b5259a | ||
|
|
e8969b0645 | ||
|
|
7932c1af6f | ||
|
|
95b4228d3c | ||
|
|
a0ff44043f | ||
|
|
1e15816057 | ||
|
|
a4566e9496 | ||
|
|
18f88c28dd | ||
|
|
b8dc1b13df | ||
|
|
33c03f1e7a | ||
|
|
7e5ae71714 | ||
|
|
b574ed0b1b | ||
|
|
01c621832b | ||
|
|
608cc66d78 | ||
|
|
35103ad810 | ||
|
|
5ac0262654 | ||
|
|
c361285790 | ||
|
|
a168b5e2b9 | ||
|
|
f70c38a853 | ||
|
|
4c05c063a9 | ||
|
|
ed05a909cb | ||
|
|
e1e45ad3ad | ||
|
|
ca9b001c9f | ||
|
|
3976d80867 | ||
|
|
1ee10457f8 | ||
|
|
116bcd0cb1 | ||
|
|
fcdccb96aa | ||
|
|
723286826b | ||
|
|
b190f09aea | ||
|
|
ff6358b031 | ||
|
|
5899a0c453 | ||
|
|
db4d9a330a | ||
|
|
03264e760f | ||
|
|
224e3b25e5 | ||
|
|
03c624a77b | ||
|
|
1ed76de58a | ||
|
|
5f40ff5a03 | ||
|
|
b1baa90b19 | ||
|
|
f0579de244 | ||
|
|
044836b026 | ||
|
|
c2a761c895 | ||
|
|
5b6e7abd91 | ||
|
|
c47c6aa6e4 | ||
|
|
5a6a954d4f | ||
|
|
92bf8c0788 | ||
|
|
058139f52b | ||
|
|
612d01a8ce | ||
|
|
bc130ce1f9 | ||
|
|
8abab58a5c | ||
|
|
740de2babe | ||
|
|
9d54baf544 | ||
|
|
c68c61975e | ||
|
|
6f7947dd5f | ||
|
|
cb8930fef6 | ||
|
|
93d87e1132 | ||
|
|
d5583ba040 | ||
|
|
7bb3e4445e | ||
|
|
001a38bbd2 | ||
|
|
463778cd88 | ||
|
|
f263585a72 | ||
|
|
ec0ca0d1ab | ||
|
|
121540f428 | ||
|
|
8b5fd5f646 | ||
|
|
23a9afb727 | ||
|
|
38b862ff16 | ||
|
|
7e31536ff9 | ||
|
|
679e582028 | ||
|
|
bfc34337a3 | ||
|
|
c2cf6f17d1 | ||
|
|
5b44c03892 | ||
|
|
69e3722e81 | ||
|
|
2fbc1140c4 | ||
|
|
9747eab9f3 | ||
|
|
f98e7b13f4 | ||
|
|
5cc6743328 | ||
|
|
c0d8f4fbfe | ||
|
|
d7c1e464d4 | ||
|
|
7e5baeebaf | ||
|
|
0c7d50b38a | ||
|
|
fa951475ba | ||
|
|
a608676bbd | ||
|
|
8dd52f278b | ||
|
|
7634859503 | ||
|
|
cf1abbd176 | ||
|
|
b71c1152c6 | ||
|
|
46f3529165 | ||
|
|
ce99a3f5a6 | ||
|
|
880db98961 | ||
|
|
d2d0e0c979 | ||
|
|
7abee5ae11 | ||
|
|
e025404bbf | ||
|
|
f8b9c8290e | ||
|
|
d1d9236539 | ||
|
|
63abd00c6a | ||
|
|
5f01d1ff84 | ||
|
|
62fa1777dd | ||
|
|
59deb7c8c1 | ||
|
|
d1c7e08496 | ||
|
|
066b12f075 | ||
|
|
d1bb0b97d2 | ||
|
|
c0aa3e48cd | ||
|
|
a1a4b7cfbf | ||
|
|
231ff3b502 | ||
|
|
3fb4c6484d | ||
|
|
7a6e1bcf6c | ||
|
|
cd60ee1188 | ||
|
|
4481911cd4 | ||
|
|
53b3a994fc | ||
|
|
ebcdb23d34 | ||
|
|
431c0f41d1 | ||
|
|
838379d970 | ||
|
|
68c913a5e1 | ||
|
|
5f82a3b799 | ||
|
|
2369a0c5a1 | ||
|
|
e995ad0499 | ||
|
|
7ba21abacd | ||
|
|
4c1cfc91da | ||
|
|
79d440d398 | ||
|
|
ace8256d73 | ||
|
|
984d501ee1 | ||
|
|
e138d540c8 | ||
|
|
4f81349ea3 | ||
|
|
b960e3d848 | ||
|
|
9c8aee1bef | ||
|
|
cf453bad5f | ||
|
|
8ad161f061 | ||
|
|
a18e81ee18 | ||
|
|
4f83d3b36b | ||
|
|
97093dbeb9 | ||
|
|
2468277068 | ||
|
|
cd15c5d380 | ||
|
|
b977cf72b7 | ||
|
|
45506b381e | ||
|
|
b6fd7a1e96 | ||
|
|
58a9e17500 | ||
|
|
c14c28ac1e | ||
|
|
5df33e0705 | ||
|
|
987d18fe99 | ||
|
|
7bb4b74c65 | ||
|
|
cf92df5faa | ||
|
|
f81488500c | ||
|
|
a099f825a7 | ||
|
|
d75ce094ae | ||
|
|
1bb52b9c2d | ||
|
|
1d15f89433 | ||
|
|
117db36ed3 | ||
|
|
9d1b8ba736 | ||
|
|
d2844e7087 | ||
|
|
def4028028 | ||
|
|
61a4cb554a | ||
|
|
f75eb0d766 | ||
|
|
ede95c8ec4 | ||
|
|
55704f2ba2 | ||
|
|
87fd33793d | ||
|
|
6509e7fdf9 | ||
|
|
cd7177682a | ||
|
|
0ceeac4726 | ||
|
|
0b515939ad | ||
|
|
abba2a9eac | ||
|
|
72ea257a06 | ||
|
|
e87ca3fe1b | ||
|
|
ca756fd647 | ||
|
|
ef93209d40 | ||
|
|
af104c2d12 | ||
|
|
0e3ab1354b | ||
|
|
5dc1576496 | ||
|
|
c4aba91e79 | ||
|
|
5aca7e12c7 | ||
|
|
60e0e50141 | ||
|
|
db9435f810 | ||
|
|
8edec89a36 | ||
|
|
b43ca1f3c7 | ||
|
|
89906cf384 | ||
|
|
2a3e4c4c6d | ||
|
|
e2b1a87ca5 | ||
|
|
e5e63a56a1 | ||
|
|
1ffb655131 | ||
|
|
4ce111139f | ||
|
|
7c4b93fba8 | ||
|
|
fc7405e542 | ||
|
|
a57afd046e | ||
|
|
bc6ce84a26 | ||
|
|
9638ae56c5 | ||
|
|
f398c0ceea | ||
|
|
af544e4e16 | ||
|
|
7ca201ea1b | ||
|
|
b622fbb653 | ||
|
|
00e59c480e | ||
|
|
cd2f8577a0 | ||
|
|
fe632340b4 | ||
|
|
e872f25ce6 | ||
|
|
f838ff528e | ||
|
|
5ba6021010 | ||
|
|
2e5e753d2e | ||
|
|
e195126ac0 | ||
|
|
7bcf8df6fc | ||
|
|
ce77a29892 | ||
|
|
56392d4e78 | ||
|
|
6cc37b9160 | ||
|
|
2f736fb28c | ||
|
|
127e8b52d1 | ||
|
|
9e8fb1293f | ||
|
|
fa3d2abe13 | ||
|
|
c9faccae64 | ||
|
|
126d26cc98 | ||
|
|
dc49502884 | ||
|
|
f03a12241d | ||
|
|
3fe77da35f | ||
|
|
c79f986a8f | ||
|
|
2b299039e6 | ||
|
|
167e8e9258 | ||
|
|
8943b6a3b7 | ||
|
|
08f208e4a0 | ||
|
|
963eb427cf | ||
|
|
c4fd47657e | ||
|
|
6d15fc1ce4 | ||
|
|
db43b90b70 | ||
|
|
da5aaa7ebf | ||
|
|
2c290b7473 | ||
|
|
541c70498d | ||
|
|
f2d1cb5606 | ||
|
|
8702ddca60 | ||
|
|
f7acf7c2d3 | ||
|
|
bcf82970a4 | ||
|
|
285c850628 | ||
|
|
3b4ffa20bc | ||
|
|
006931eaa8 | ||
|
|
5401cb58bd | ||
|
|
efde25469e | ||
|
|
b207a87f8b | ||
|
|
1da62eb63d | ||
|
|
3e6f028061 | ||
|
|
7bd835f43e | ||
|
|
8ec6b2e737 | ||
|
|
f4fc185f5b | ||
|
|
b28593dba7 | ||
|
|
88dc5f25ad | ||
|
|
a0062060eb | ||
|
|
8e6633d0bc | ||
|
|
2c8d5f2625 | ||
|
|
46e10f67b2 | ||
|
|
962b68c5c3 | ||
|
|
fccfcd12fd | ||
|
|
50caffd70f | ||
|
|
14a1c391a6 | ||
|
|
8ab097f166 | ||
|
|
41cb3e932a | ||
|
|
70f1a6bf48 | ||
|
|
804d9e2e8e | ||
|
|
123fe48cad | ||
|
|
2e7ae45fdb | ||
|
|
6b44ac922e | ||
|
|
1c95b2e464 | ||
|
|
b0ba261e14 | ||
|
|
39f8fa8d34 | ||
|
|
fe1579e960 | ||
|
|
7256fb9d62 | ||
|
|
53f68784fc | ||
|
|
9e53f3f8b0 | ||
|
|
a6bebb2d91 | ||
|
|
8a80f0571c | ||
|
|
13589499f8 | ||
|
|
50656b7afc | ||
|
|
b2e0ad58f9 | ||
|
|
b2f22a379f | ||
|
|
c8b318ba8e | ||
|
|
8db082501e | ||
|
|
5c6c46848e | ||
|
|
69d86e69cb | ||
|
|
0d9ac01fea | ||
|
|
fd14976a4d | ||
|
|
fa06551bd8 | ||
|
|
2342d92ae3 | ||
|
|
561b1c0b92 | ||
|
|
7eb311d99c | ||
|
|
e5f9623113 | ||
|
|
e29c1010d3 | ||
|
|
494c6ca80d | ||
|
|
b4416c32ed | ||
|
|
fa757c6695 | ||
|
|
fb15cfe9f0 | ||
|
|
94eebd2cd0 | ||
|
|
7e6bde73e1 | ||
|
|
da5a2ceefa | ||
|
|
e74340aabf | ||
|
|
48113cb156 | ||
|
|
6ae0b87686 | ||
|
|
98f35b6e06 | ||
|
|
2959a84b74 | ||
|
|
705bb4a8ea | ||
|
|
804ca985f3 | ||
|
|
892a59ff15 | ||
|
|
3e60b1b388 | ||
|
|
9c25d99156 | ||
|
|
e8c6dca8c1 | ||
|
|
02c1a9a58d | ||
|
|
2201d58f7d | ||
|
|
b7542a2106 | ||
|
|
f1bcdaf68f | ||
|
|
1ebebb5690 | ||
|
|
1ddc663e8c | ||
|
|
5b3edc2131 | ||
|
|
bc22830136 | ||
|
|
90475c1128 | ||
|
|
ff6a13f042 | ||
|
|
92f08de1f6 | ||
|
|
29462b082b | ||
|
|
bd9f436227 | ||
|
|
2b6f507785 | ||
|
|
a0739e59e4 | ||
|
|
8251ac9ca8 | ||
|
|
f99794884b | ||
|
|
dd93e1f7b0 | ||
|
|
6b12c55393 | ||
|
|
4b8d072153 | ||
|
|
f159b18e96 | ||
|
|
27653381d3 | ||
|
|
bd77b17c1c | ||
|
|
3261fd12db | ||
|
|
3aff53647d | ||
|
|
4a703a4288 | ||
|
|
4880177e65 | ||
|
|
744e17a0d6 | ||
|
|
b706c55ed8 | ||
|
|
fe3ad3487d | ||
|
|
5ff2b52522 | ||
|
|
d57438bf8c | ||
|
|
5f2a8acfa2 | ||
|
|
01bf367ce1 | ||
|
|
2550f1bee5 | ||
|
|
f2d2307fcc | ||
|
|
33e904632c | ||
|
|
2e34d71af6 | ||
|
|
2bc6754598 | ||
|
|
086caa80bb | ||
|
|
ac85797a4f | ||
|
|
ba7d3324e6 | ||
|
|
6a97341835 | ||
|
|
2970ab6ae3 | ||
|
|
87447e9344 | ||
|
|
2980a87d09 | ||
|
|
75d1b49aed | ||
|
|
a5421d1a51 | ||
|
|
42b2e0622f | ||
|
|
8033348aa1 | ||
|
|
bd39a9c2f8 | ||
|
|
633e9474b8 | ||
|
|
588ec05c80 | ||
|
|
dfcba501c4 | ||
|
|
c81e0d5816 | ||
|
|
92cdc78dda | ||
|
|
5971e12ea9 | ||
|
|
0cb18e2058 | ||
|
|
501df0763b | ||
|
|
1762765c2f | ||
|
|
0a9ae254c8 | ||
|
|
8476e11065 | ||
|
|
014c06a797 | ||
|
|
256f4cf2a8 | ||
|
|
e540cc901c | ||
|
|
42f1a55fa7 | ||
|
|
7f59674ea8 | ||
|
|
0899849681 | ||
|
|
5f5c67601e | ||
|
|
5e8624c79c | ||
|
|
72821f0f16 | ||
|
|
c2e0e56a80 | ||
|
|
6919e3cdc8 | ||
|
|
4a62b44526 | ||
|
|
ac181e238d | ||
|
|
d323b78d3f | ||
|
|
2582f6fe93 | ||
|
|
53d698573e | ||
|
|
7560d272dd | ||
|
|
f6e5d09ffe | ||
|
|
825ab0afc0 | ||
|
|
4c4efdfd11 | ||
|
|
1fb34eb71c | ||
|
|
3963943904 | ||
|
|
d4f97f61c2 | ||
|
|
edf545c9a1 | ||
|
|
15f9bf181a | ||
|
|
884c5d2578 | ||
|
|
0d6b42cc3f | ||
|
|
1e8716450f | ||
|
|
850272e783 | ||
|
|
bf9edef146 | ||
|
|
35db2b0c8e | ||
|
|
c5638d8dbb | ||
|
|
4a8a83bf09 | ||
|
|
4b1110921b | ||
|
|
e159a5f206 | ||
|
|
856cdbda6b | ||
|
|
14df21a2ae | ||
|
|
2075587980 | ||
|
|
a35362f0ed | ||
|
|
480c4111f9 | ||
|
|
e671cfebcf | ||
|
|
25a80e378d | ||
|
|
2d064d61a9 | ||
|
|
6b16d27576 | ||
|
|
5422ab4daf | ||
|
|
cbcfed133c | ||
|
|
064032175e | ||
|
|
e7eca015ac | ||
|
|
d94b443eca | ||
|
|
434048afad | ||
|
|
3614efa965 | ||
|
|
ec30b1a457 | ||
|
|
3b43df0214 | ||
|
|
ea3974d47e | ||
|
|
f7e5f9f5b6 | ||
|
|
c425400480 | ||
|
|
aea03cc2b7 | ||
|
|
e369fbded4 | ||
|
|
792806c20d | ||
|
|
fc894d8631 | ||
|
|
dcc3b1294c | ||
|
|
5d0a8ff6dd | ||
|
|
c6cc7d3d29 | ||
|
|
d2838c2780 | ||
|
|
4e13febeaf | ||
|
|
3e80554a0e | ||
|
|
f3d8b2b3d1 | ||
|
|
475ba7ca10 | ||
|
|
16c13cb561 | ||
|
|
fd9902afd6 | ||
|
|
eb936a6f94 | ||
|
|
184d171b74 | ||
|
|
dc8b9ffc7c | ||
|
|
f7fbb8b859 | ||
|
|
8fce9e39a0 | ||
|
|
dee640d32f | ||
|
|
0af6703c08 | ||
|
|
b0d6ccf572 | ||
|
|
9e3dcbd041 | ||
|
|
9283b443c1 | ||
|
|
189a28f349 | ||
|
|
e02288b689 | ||
|
|
a90c44c7d8 | ||
|
|
eaac6cdbb3 | ||
|
|
aba138447c | ||
|
|
28af4e5277 | ||
|
|
a662a0a68f | ||
|
|
5aa081a01b | ||
|
|
24e149634d | ||
|
|
635b4110a4 | ||
|
|
56ddb5da23 | ||
|
|
ece1122733 | ||
|
|
dd70743bae | ||
|
|
5ab7e8dd80 | ||
|
|
c7473ddf42 | ||
|
|
0119eeb575 | ||
|
|
dc53fac53d | ||
|
|
d86179f1a4 | ||
|
|
53a73e9893 | ||
|
|
3efb6c0241 | ||
|
|
f6535c8ad3 | ||
|
|
6d7035afac | ||
|
|
2c5c08e562 | ||
|
|
11f5d2fb07 | ||
|
|
74ee853b49 | ||
|
|
0af6c133c5 | ||
|
|
cefad32181 | ||
|
|
2b1eb51d94 | ||
|
|
1df7d07abc | ||
|
|
fca3bb3cc3 | ||
|
|
45a7689518 | ||
|
|
16b74190e5 | ||
|
|
2f33b0eb79 | ||
|
|
cf64aa3823 | ||
|
|
944d8187ba | ||
|
|
c9b3459a48 | ||
|
|
ec0a1a97e0 | ||
|
|
dd81b2cc41 | ||
|
|
7d58887138 | ||
|
|
a79f2fa90a | ||
|
|
473c70fd70 | ||
|
|
bbd967adad | ||
|
|
f55fdbf630 | ||
|
|
6b23c70e37 | ||
|
|
1d4e6ca825 | ||
|
|
deeae1ef56 | ||
|
|
ed87c40d13 | ||
|
|
ac28e587e2 | ||
|
|
55d2d2cce4 | ||
|
|
f3d5c3f698 | ||
|
|
d92ba0987b | ||
|
|
9b3fde7a19 | ||
|
|
e39a9c190a | ||
|
|
30fff79bd0 | ||
|
|
7781237c56 | ||
|
|
51408010e8 | ||
|
|
7aeaf76062 | ||
|
|
006bda5bfc | ||
|
|
148b76f4a3 | ||
|
|
422e63a93d | ||
|
|
2aff0ed03a | ||
|
|
341d592001 | ||
|
|
568890e9b3 | ||
|
|
a1e9cacb9f | ||
|
|
a258379a3b | ||
|
|
637499dcd7 | ||
|
|
1e79d464b0 | ||
|
|
932381052b | ||
|
|
367c4179fd | ||
|
|
0fc9f2ec00 | ||
|
|
1646014561 | ||
|
|
9152ee826d | ||
|
|
08ce1b54ca | ||
|
|
37b74be3bb | ||
|
|
fac2e8ec98 | ||
|
|
58fd729bec | ||
|
|
0c2244d668 | ||
|
|
40d0d9d2b8 | ||
|
|
3ce78064ed | ||
|
|
9db8d05206 | ||
|
|
22a0ce1e20 | ||
|
|
3ff8a920c0 | ||
|
|
912e340028 | ||
|
|
751885128a | ||
|
|
644cd36286 | ||
|
|
91601c8a2d | ||
|
|
f70351fc75 | ||
|
|
976cb1ff25 | ||
|
|
3f8fb365a0 | ||
|
|
5cfbc8ce48 | ||
|
|
89033de836 | ||
|
|
ff4c6ea950 | ||
|
|
c3f32da557 | ||
|
|
9d7930ed3c | ||
|
|
0dd54b112e | ||
|
|
b10a502b0e | ||
|
|
980d59c9be | ||
|
|
6d977ea949 | ||
|
|
e723948756 | ||
|
|
d95e3c6e04 | ||
|
|
7fdf986df4 | ||
|
|
6b049ad86d | ||
|
|
a0fc6f7e22 | ||
|
|
d0890c45e2 | ||
|
|
93b3926008 | ||
|
|
3fe94b68a3 | ||
|
|
34f5a58692 | ||
|
|
b605c8e654 | ||
|
|
95df997198 | ||
|
|
51ba4f1ec8 | ||
|
|
457186fe40 | ||
|
|
a30aad04da | ||
|
|
ad74af426b | ||
|
|
115eea3828 | ||
|
|
5bf24e10b2 | ||
|
|
10f1507366 | ||
|
|
badb8c7914 | ||
|
|
13b2f6534e | ||
|
|
c78ecd8453 | ||
|
|
b61e29ef0f | ||
|
|
ca555e7ea6 | ||
|
|
a1f254a0bc | ||
|
|
a9429caf09 | ||
|
|
7bf50c69e2 | ||
|
|
fcd8cfc4d5 | ||
|
|
5b0a662b40 | ||
|
|
255c8437d7 | ||
|
|
83b242a727 | ||
|
|
4ef6c2ea34 | ||
|
|
29b93f63f7 | ||
|
|
a403d96204 | ||
|
|
c1a187084d | ||
|
|
7808dc5740 | ||
|
|
4417eabdc7 | ||
|
|
119b18521f | ||
|
|
ccefafd172 | ||
|
|
a75bf1b2bb | ||
|
|
15a0b9ab93 | ||
|
|
9bed58a863 | ||
|
|
19dd5ddbae | ||
|
|
8cd636c213 | ||
|
|
d156b716f6 | ||
|
|
3f910824e8 | ||
|
|
3509b05d1e | ||
|
|
164bd18234 | ||
|
|
fcc9cdcaef | ||
|
|
b32785f88c | ||
|
|
8c9808b2d6 | ||
|
|
a80f520c38 | ||
|
|
34c517defc | ||
|
|
d5a762f35c | ||
|
|
ab6ec6d11e | ||
|
|
c8a629d8a5 | ||
|
|
71805500ca | ||
|
|
5e7c12dac7 | ||
|
|
29817d6627 | ||
|
|
c010b7319e | ||
|
|
27b190cadf | ||
|
|
e1a02a0729 | ||
|
|
eb512022e0 | ||
|
|
0aec9a85bb | ||
|
|
c1743eb18d | ||
|
|
ccd2855e01 | ||
|
|
d3338f5d81 | ||
|
|
6532dacbb1 | ||
|
|
b42338ea38 | ||
|
|
8f07f183dd | ||
|
|
e66aedaaa1 | ||
|
|
9ac9db0fe0 | ||
|
|
1b610242bc | ||
|
|
be58dd19c1 | ||
|
|
0d2a1bac36 | ||
|
|
f67815b0d3 | ||
|
|
d4c986fb84 | ||
|
|
b24a7e3faf | ||
|
|
18a78e2892 | ||
|
|
323fbb4713 | ||
|
|
bd6b699a1e | ||
|
|
4795af29ea | ||
|
|
f76a62b7d2 | ||
|
|
da7d200d92 | ||
|
|
2de44e7563 | ||
|
|
f30cdc1933 | ||
|
|
f9ccacf118 | ||
|
|
6ed7e26d86 | ||
|
|
91856ea145 | ||
|
|
5b6b0f09e1 | ||
|
|
291677d0cf | ||
|
|
15eee102fd | ||
|
|
0db2aebfda | ||
|
|
7ec00a279c | ||
|
|
881da033b8 | ||
|
|
1e972cbb65 | ||
|
|
e689deaa2b | ||
|
|
93a1a432d7 | ||
|
|
0b71bc2880 | ||
|
|
9f4b72800a | ||
|
|
5d2e08d124 | ||
|
|
5fb1b39742 | ||
|
|
5ef8e5c447 | ||
|
|
3152cddb3d | ||
|
|
c2b87b46fc | ||
|
|
d764941341 | ||
|
|
112ca2707a | ||
|
|
cf26092917 | ||
|
|
842a252576 | ||
|
|
e23d9bc3cc | ||
|
|
e206ad3c08 | ||
|
|
2eddddc6fc | ||
|
|
de6a078f01 | ||
|
|
283f4d1e37 | ||
|
|
0f3cd28019 | ||
|
|
7fec7f8937 | ||
|
|
3f54630531 | ||
|
|
7f864dba3a | ||
|
|
49644f10f5 | ||
|
|
f78b41dde3 | ||
|
|
7163337a27 | ||
|
|
27fd087631 | ||
|
|
9b7ec4f266 | ||
|
|
90fd4b54b3 | ||
|
|
97e5de1ee5 | ||
|
|
5f247a6d11 | ||
|
|
ccc0189e70 | ||
|
|
8543636576 | ||
|
|
b09025df08 | ||
|
|
39c747e430 | ||
|
|
2104822cac | ||
|
|
bcf713932a | ||
|
|
6d671b6576 | ||
|
|
b7345107d7 | ||
|
|
9cdfdf9bda | ||
|
|
42f200aabd | ||
|
|
f8853ae902 | ||
|
|
061201c0de | ||
|
|
f11dab363f | ||
|
|
48dd50afe4 | ||
|
|
352e71d9e9 | ||
|
|
2296ef0987 | ||
|
|
30f11e4e46 | ||
|
|
43dbaf7004 | ||
|
|
55bb65034f | ||
|
|
57ebb297c0 | ||
|
|
a513f10296 | ||
|
|
a1074852dd | ||
|
|
5f546a3df8 | ||
|
|
986c19ef6e | ||
|
|
bea7ad5876 | ||
|
|
f92c519d05 | ||
|
|
ecd3ad40ae | ||
|
|
fad3c2bbdf | ||
|
|
46c53ea679 | ||
|
|
062caa8f53 | ||
|
|
f6a39fea4b | ||
|
|
ea82f89b53 | ||
|
|
23443b2632 | ||
|
|
114eab952b | ||
|
|
f8472721ee | ||
|
|
9634bc99bd | ||
|
|
81a0ba08bd | ||
|
|
12f5bd141d | ||
|
|
6e2b7e534b | ||
|
|
543365f296 | ||
|
|
da3bf945cb | ||
|
|
4e311ca279 | ||
|
|
18c449a9ed | ||
|
|
d7293ef41d | ||
|
|
88c8860548 | ||
|
|
85a64a6c14 | ||
|
|
d7c3cf7d3e | ||
|
|
5f3dc081b5 | ||
|
|
8959d3aec4 | ||
|
|
c589d04a32 | ||
|
|
8ceda27817 | ||
|
|
7260c2c77e | ||
|
|
7991dafe64 | ||
|
|
232790836b | ||
|
|
9305b0a287 | ||
|
|
4ff8b869db | ||
|
|
c1df939ac8 | ||
|
|
aea8cd1d62 | ||
|
|
b816622129 | ||
|
|
d80613f26f | ||
|
|
d5505080cf | ||
|
|
92d6a541ae | ||
|
|
633948e8cc | ||
|
|
2ac48f715a | ||
|
|
e82c9a71ec | ||
|
|
004f6d1495 | ||
|
|
32b54e1346 | ||
|
|
f50b19968c | ||
|
|
c9d0415d84 | ||
|
|
625932e8f3 | ||
|
|
5a03428d76 | ||
|
|
33c6d13c7a | ||
|
|
ba5e15d29b | ||
|
|
de64eb6f8d | ||
|
|
75589f9770 | ||
|
|
9217cd3832 | ||
|
|
49d295535f | ||
|
|
bd489bd462 | ||
|
|
7d621b5b1d | ||
|
|
22b60a07e5 | ||
|
|
adf52e1520 | ||
|
|
b5d027b37c | ||
|
|
c5a1513cf5 | ||
|
|
7116607881 | ||
|
|
559b0bf45a | ||
|
|
72e72af6b1 | ||
|
|
e0d6a6ae0f | ||
|
|
64588f8337 | ||
|
|
66b0931f07 | ||
|
|
5ddabba0b2 | ||
|
|
2e054d8bec | ||
|
|
2c3ff3a628 | ||
|
|
976c74d694 | ||
|
|
e3adcfb62e | ||
|
|
cd76cc0e9f | ||
|
|
e2e356d0c2 | ||
|
|
bb7c217ccc | ||
|
|
591a2e5dbb | ||
|
|
6d1b754db5 | ||
|
|
cae9b754bc | ||
|
|
46e0c88280 | ||
|
|
4942db2806 | ||
|
|
b5be515b9b | ||
|
|
d09d2dcffd | ||
|
|
c5fddbbb69 | ||
|
|
2ef360a7ac | ||
|
|
509d26f938 | ||
|
|
5a9efff87c | ||
|
|
24a93d107a | ||
|
|
26902b4565 | ||
|
|
e320aff5dc | ||
|
|
3f971fbab1 | ||
|
|
f24ce61cc9 | ||
|
|
137be1c7fa | ||
|
|
039018ddc9 | ||
|
|
bef784b32a | ||
|
|
eaad3ebeac | ||
|
|
af8637f8a4 | ||
|
|
ba5ec70669 | ||
|
|
503f20a7f4 | ||
|
|
1237b553f7 | ||
|
|
86c89a47da | ||
|
|
b40cb3331a | ||
|
|
88025040c3 | ||
|
|
e7c0cda77f | ||
|
|
99e64388ba | ||
|
|
8ff0524bbc | ||
|
|
e749c9764c | ||
|
|
69a6adf0a8 | ||
|
|
ab064c90dd | ||
|
|
817df662da | ||
|
|
d093b461d6 | ||
|
|
5cc756f853 | ||
|
|
07c443598b | ||
|
|
3c6116255b | ||
|
|
5689e3815a | ||
|
|
9bf6a72621 | ||
|
|
2e02aa16bb | ||
|
|
8e7fddd6b0 | ||
|
|
ac8f6455ff | ||
|
|
3c268c8cbd | ||
|
|
10b56e7b4f | ||
|
|
f52db71ec6 | ||
|
|
bc1f21961c | ||
|
|
0e1f843f50 | ||
|
|
2a5d1fb84a | ||
|
|
3b0d0dcd0c | ||
|
|
f92cf3df4f | ||
|
|
274c9904e6 | ||
|
|
44ee017dee | ||
|
|
1416650c9d | ||
|
|
4acf6d336b | ||
|
|
dd7a861280 | ||
|
|
bbb4893857 | ||
|
|
3054c2366e | ||
|
|
f9e9b423dd | ||
|
|
f576f39bc6 | ||
|
|
24a7d4b82d | ||
|
|
d623820833 | ||
|
|
a9be6a54ff | ||
|
|
3b60cb2bcd | ||
|
|
fe3ff15539 | ||
|
|
f5018f628a | ||
|
|
aa00419198 | ||
|
|
fd5575ace5 | ||
|
|
2e31e08522 | ||
|
|
1412805503 | ||
|
|
812e269195 | ||
|
|
006fde8fea | ||
|
|
8499ca358b | ||
|
|
63b8cc1104 | ||
|
|
511105beb3 | ||
|
|
258447c17b | ||
|
|
e1bf657a05 | ||
|
|
bca4af201d | ||
|
|
9af243177f | ||
|
|
ca3c2bf70a | ||
|
|
ce5fc9715d | ||
|
|
606a50047c | ||
|
|
b58c0705fc | ||
|
|
841c226732 | ||
|
|
7e8c8f4bb7 | ||
|
|
ebedca82f3 | ||
|
|
e06b61e8d2 | ||
|
|
e2e703540e | ||
|
|
8fa3a73fb2 | ||
|
|
56cff59438 | ||
|
|
cb223d7ddf | ||
|
|
96a4bf3464 | ||
|
|
729a74a561 | ||
|
|
5f0d47ca88 | ||
|
|
250b41612e | ||
|
|
54ed725061 | ||
|
|
5844330301 | ||
|
|
d1c80dfd9b | ||
|
|
b2097e2f93 | ||
|
|
7386a2f40f | ||
|
|
5a1ecb55b8 | ||
|
|
b05d7d09cf | ||
|
|
dc0423f97e | ||
|
|
af968f1868 | ||
|
|
2cc73cc52a | ||
|
|
28109dfb39 | ||
|
|
2912994e6b | ||
|
|
6d6d5996d7 | ||
|
|
bd433e0776 | ||
|
|
fc9644f448 | ||
|
|
1558970064 | ||
|
|
991dd55049 | ||
|
|
dfee1cc490 | ||
|
|
e649690f6a | ||
|
|
783682251f | ||
|
|
7465e1ae4b | ||
|
|
743d1a0e86 | ||
|
|
17f6f1cd4c | ||
|
|
4b856fba2a | ||
|
|
3a8e4e065e | ||
|
|
43f9bd5239 | ||
|
|
6f5a0b9a3f | ||
|
|
ecf55e64ae | ||
|
|
cd566ac9c0 | ||
|
|
6101ded74a | ||
|
|
0d49bbfa7a | ||
|
|
f6d83c17bd | ||
|
|
ac90a0973d | ||
|
|
f195c61200 | ||
|
|
20044fa6a7 | ||
|
|
b9428360c0 | ||
|
|
55c7dd860c | ||
|
|
ecefd1d3ee | ||
|
|
0cdd0ca583 | ||
|
|
31a0122cd1 | ||
|
|
6777cd2a9c | ||
|
|
649373ff51 | ||
|
|
97e6222176 | ||
|
|
eef56a7c82 | ||
|
|
8853666645 | ||
|
|
a379764076 | ||
|
|
edd1cc6059 | ||
|
|
03280db377 | ||
|
|
86aeff5547 | ||
|
|
b5b2062efa | ||
|
|
b51731d675 | ||
|
|
229e8d9592 | ||
|
|
5c6bd1a043 | ||
|
|
dcdd5e8f2d | ||
|
|
a3b3f91f8d | ||
|
|
69568378ec | ||
|
|
8776b36bb0 | ||
|
|
9bde946c55 | ||
|
|
c74898b970 | ||
|
|
f0f2314639 | ||
|
|
edf38cef33 | ||
|
|
a700ec32fd | ||
|
|
7dcd5f41ec | ||
|
|
01208a858d | ||
|
|
c379db831c | ||
|
|
d478a8a8b4 | ||
|
|
39535e9bf8 | ||
|
|
db90142c4b | ||
|
|
63bd3374be | ||
|
|
7a232c8f5d | ||
|
|
34f9dd9ea2 | ||
|
|
4d3fba2bd0 | ||
|
|
83cc7015bf | ||
|
|
dfe151ccb1 | ||
|
|
98f136e747 | ||
|
|
94792fe571 | ||
|
|
6a43f0a09d | ||
|
|
4a2354ab26 | ||
|
|
be8cd85bfe | ||
|
|
7c4eefe8ee | ||
|
|
19d6e30889 | ||
|
|
174af34115 | ||
|
|
5c3711bcc8 | ||
|
|
31aef1d200 | ||
|
|
4aaa2c6fed | ||
|
|
5d3c84327d | ||
|
|
eb1feba304 | ||
|
|
9df6368558 | ||
|
|
0a6092b738 | ||
|
|
6b852822a5 | ||
|
|
b4cde98526 | ||
|
|
5f0f1966a8 | ||
|
|
dbadee987c | ||
|
|
995943d84d | ||
|
|
764a5f3e0a | ||
|
|
d41a2adce7 | ||
|
|
521b53dc09 | ||
|
|
2c94ae8bb4 | ||
|
|
ebbedc558d | ||
|
|
0065c3d610 | ||
|
|
0325ba4c0a | ||
|
|
b348bff7a8 | ||
|
|
b5e43ed73b | ||
|
|
7ac2ba90b1 | ||
|
|
f869393da4 | ||
|
|
6ccece4603 | ||
|
|
4bd2ba4d13 | ||
|
|
ab0a3cde78 | ||
|
|
72f9e4485e | ||
|
|
87c536b698 | ||
|
|
ac03bad282 | ||
|
|
9efdcc1f34 | ||
|
|
f26a965ea9 | ||
|
|
5c7bd954a2 | ||
|
|
184cb8ba19 | ||
|
|
1d324a2d94 | ||
|
|
eeeb3440c2 | ||
|
|
a1c965584e | ||
|
|
e5b4905a12 | ||
|
|
f64ba96962 | ||
|
|
0eec77d8b3 | ||
|
|
7efbe2213a | ||
|
|
ffa25d1690 | ||
|
|
009d851b58 | ||
|
|
6d5e6add9b | ||
|
|
62f7915e97 | ||
|
|
be49bd167b | ||
|
|
13e9e41890 | ||
|
|
e6eec622c8 | ||
|
|
501b8b7bf5 | ||
|
|
99d78d62fb | ||
|
|
1d5758f5d2 | ||
|
|
fad1916259 | ||
|
|
1bff103e53 | ||
|
|
68013b96d6 | ||
|
|
0c687539fb | ||
|
|
0bf0441f49 | ||
|
|
0c66ac97e8 | ||
|
|
8c261dba73 | ||
|
|
6e3b6cb0c1 | ||
|
|
11155cc609 | ||
|
|
a5baa052e2 | ||
|
|
31d8fe4459 | ||
|
|
71021982ed | ||
|
|
4d9c1f7a65 | ||
|
|
406e9dcaf2 | ||
|
|
d3b0d845eb | ||
|
|
335b977cd4 | ||
|
|
3554c91b2b | ||
|
|
460dab0342 | ||
|
|
fb9b04c192 | ||
|
|
478d809620 | ||
|
|
5a7c481f69 | ||
|
|
076e84ed24 | ||
|
|
22164031fe | ||
|
|
cb50144624 | ||
|
|
acd9763b9d | ||
|
|
9f2167ac3c | ||
|
|
e9cfff8165 | ||
|
|
1153d477ee | ||
|
|
d63b158966 | ||
|
|
f23202545b | ||
|
|
037f45df1e | ||
|
|
0eeb6758f4 | ||
|
|
5279192102 | ||
|
|
0c8516d33a | ||
|
|
651f9637fc | ||
|
|
36c5c9939b | ||
|
|
613e32194f | ||
|
|
9a1e96fb99 | ||
|
|
bdcbf12246 | ||
|
|
894b843ccb | ||
|
|
4a9d67521f | ||
|
|
a353dceaa3 | ||
|
|
802dd2608e | ||
|
|
ebc4bf4b45 | ||
|
|
906828fadb | ||
|
|
e35612a6f6 | ||
|
|
f4e0272db9 | ||
|
|
5ecfc5e09d | ||
|
|
927b819bc8 | ||
|
|
857731e89f | ||
|
|
24fed58c81 | ||
|
|
57cef86ca1 | ||
|
|
0f91e18fce | ||
|
|
c01a0147f2 | ||
|
|
d695b6d51a | ||
|
|
3d1e4a93fd | ||
|
|
6a5d36c57a | ||
|
|
7f709aee53 | ||
|
|
4df7bcd87f | ||
|
|
bfd61893a1 | ||
|
|
72d374786f | ||
|
|
eb40eec4c1 | ||
|
|
991f1b17dd | ||
|
|
9a9aa75684 | ||
|
|
d1b023c8c8 | ||
|
|
0d6faed3d5 | ||
|
|
b3750f78ff | ||
|
|
82f96dd080 | ||
|
|
d640ce06d7 | ||
|
|
b8fb74fef3 | ||
|
|
ab4bbbff72 | ||
|
|
4180949307 | ||
|
|
e68ff858f2 | ||
|
|
b978645c28 | ||
|
|
59a99f4c21 | ||
|
|
bf67c6b1d0 | ||
|
|
f1cf370680 | ||
|
|
affa23040b | ||
|
|
a15cefc80f | ||
|
|
5cf00d903b | ||
|
|
47a805ede7 | ||
|
|
206d562f3f |
No files matched your search
+8
-7
@@ -13,16 +13,17 @@ Win32_LIB_ASM_Release
|
|||||||
*.dgb
|
*.dgb
|
||||||
*.debug
|
*.debug
|
||||||
*.debug.txt
|
*.debug.txt
|
||||||
/bin/VC10/
|
|
||||||
/objs/VC10/
|
|
||||||
*.user
|
*.user
|
||||||
*.db
|
*.db
|
||||||
*.opendb
|
*.opendb
|
||||||
/.vs
|
/.vs
|
||||||
/debian
|
/debian
|
||||||
/assets/debian
|
/assets/debian
|
||||||
compile.sh
|
/make
|
||||||
*.gz
|
/bin
|
||||||
.vscode/
|
/build
|
||||||
out
|
/build/*
|
||||||
build
|
/CMakeUserPresets.json
|
||||||
|
/out
|
||||||
|
/objs/VC10
|
||||||
|
*.kate-swp
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
# DO NOT CHANGE THIS SRB2 STRING! Some variable names depend on this string.
|
# DO NOT CHANGE THIS SRB2 STRING! Some variable names depend on this string.
|
||||||
# Version change is fine.
|
# Version change is fine.
|
||||||
project(SRB2
|
project(SRB2
|
||||||
|
|||||||
@@ -156,6 +156,11 @@ Add Gamepad Rumble support for things.
|
|||||||
To be used with Displayplayers.
|
To be used with Displayplayers.
|
||||||
Duration is in milliseconds and is optional to set, default value is 84ms.
|
Duration is in milliseconds and is optional to set, default value is 84ms.
|
||||||
|
|
||||||
|
## P_CheckSightFast(mo1, mo2)
|
||||||
|
|
||||||
|
Exactly same as P_CheckSight but uses cheaper algorithm, useful for things like nametags. Doesn't work exactly
|
||||||
|
like P_CheckSight so don't use it for anything gameplay-related.
|
||||||
|
|
||||||
# Other changes
|
# Other changes
|
||||||
|
|
||||||
## P_PlayRinglossSound(source, damager)
|
## P_PlayRinglossSound(source, damager)
|
||||||
|
|||||||
@@ -1726,11 +1726,6 @@ HW3SOUND for 3D hardware sound support
|
|||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
<Unit filename="src/r_draw.h" />
|
<Unit filename="src/r_draw.h" />
|
||||||
<Unit filename="src/r_draw16.c">
|
|
||||||
<Option compilerVar="CC" />
|
|
||||||
<Option compile="0" />
|
|
||||||
<Option link="0" />
|
|
||||||
</Unit>
|
|
||||||
<Unit filename="src/r_draw8.c">
|
<Unit filename="src/r_draw8.c">
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
<Option compile="0" />
|
<Option compile="0" />
|
||||||
|
|||||||
@@ -773,16 +773,6 @@ Priority=1000
|
|||||||
OverrideBuildCmd=0
|
OverrideBuildCmd=0
|
||||||
BuildCmd=
|
BuildCmd=
|
||||||
|
|
||||||
[Unit79]
|
|
||||||
FileName=src\r_draw16.c
|
|
||||||
Folder=R_Rend
|
|
||||||
Compile=0
|
|
||||||
CompileCpp=0
|
|
||||||
Link=0
|
|
||||||
Priority=1000
|
|
||||||
OverrideBuildCmd=0
|
|
||||||
BuildCmd=
|
|
||||||
|
|
||||||
[Unit80]
|
[Unit80]
|
||||||
FileName=src\r_draw8.c
|
FileName=src\r_draw8.c
|
||||||
Folder=R_Rend
|
Folder=R_Rend
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/lsdlsrb2
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
/lsdlsrb2
|
|
||||||
/pnd
|
|
||||||
/*.mo
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/lsdlsrb2
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/lsdl2srb2kart
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
*.exe
|
|
||||||
*.mo
|
|
||||||
r_opengl.dll
|
|
||||||
*.bat
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
*.exe
|
|
||||||
*.mo
|
|
||||||
r_opengl.dll
|
|
||||||
*.bat
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
/srb2sdl.exe
|
|
||||||
/srb2win.exe
|
|
||||||
/r_opengl.dll
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
*.exe
|
|
||||||
*.mo
|
|
||||||
r_opengl.dll
|
|
||||||
*.bat
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
+32
-32
@@ -1,32 +1,32 @@
|
|||||||
@echo off
|
@echo off
|
||||||
set BRA=Unknown
|
set BRA=Unknown
|
||||||
set REV=illegal
|
set REV=illegal
|
||||||
|
|
||||||
copy nul: /b +%1\comptime.c tmp.$$$ > nul
|
copy nul: /b +%1\comptime.c tmp.$$$ > nul
|
||||||
move tmp.$$$ %1\comptime.c > nul
|
move tmp.$$$ %1\comptime.c > nul
|
||||||
|
|
||||||
if exist .git goto gitrev
|
if exist .git goto gitrev
|
||||||
if exist ..\.git goto gitrev
|
if exist ..\.git goto gitrev
|
||||||
if exist .svn goto svnrev
|
if exist .svn goto svnrev
|
||||||
goto filwri
|
goto filwri
|
||||||
|
|
||||||
:gitrev
|
:gitrev
|
||||||
set GIT=%2
|
set GIT=%2
|
||||||
if "%GIT%"=="" set GIT=git
|
if "%GIT%"=="" set GIT=git
|
||||||
for /f "usebackq" %%s in (`%GIT% rev-parse --abbrev-ref HEAD`) do @set BRA=%%s
|
for /f "usebackq" %%s in (`%GIT% rev-parse --abbrev-ref HEAD`) do @set BRA=%%s
|
||||||
for /f "usebackq" %%s in (`%GIT% rev-parse HEAD`) do @set REV=%%s
|
for /f "usebackq" %%s in (`%GIT% rev-parse HEAD`) do @set REV=%%s
|
||||||
set REV=%REV:~0,8%
|
set REV=%REV:~0,8%
|
||||||
goto filwri
|
goto filwri
|
||||||
|
|
||||||
:svnrev
|
:svnrev
|
||||||
set BRA=Subversion
|
set BRA=Subversion
|
||||||
for /f "usebackq" %%s in (`svnversion .`) do @set REV=%%s
|
for /f "usebackq" %%s in (`svnversion .`) do @set REV=%%s
|
||||||
set REV=r%REV%
|
set REV=r%REV%
|
||||||
goto filwri
|
goto filwri
|
||||||
|
|
||||||
:filwri
|
:filwri
|
||||||
echo // Do not edit! This file was autogenerated > %1\comptime.h
|
echo // Do not edit! This file was autogenerated > %1\comptime.h
|
||||||
echo // by the %0 batch file >> %1\comptime.h
|
echo // by the %0 batch file >> %1\comptime.h
|
||||||
echo // >> %1\comptime.h
|
echo // >> %1\comptime.h
|
||||||
echo const char* compbranch = "%BRA%"; >> %1\comptime.h
|
echo const char* compbranch = "%BRA%"; >> %1\comptime.h
|
||||||
echo const char* comprevision = "%REV%"; >> %1\comptime.h
|
echo const char* comprevision = "%REV%"; >> %1\comptime.h
|
||||||
+1
-1
@@ -17,7 +17,7 @@ EOF
|
|||||||
|
|
||||||
versiongit() {
|
versiongit() {
|
||||||
gitbranch="$(git rev-parse --abbrev-ref HEAD)"
|
gitbranch="$(git rev-parse --abbrev-ref HEAD)"
|
||||||
gitversion="$(git rev-parse HEAD | cut -c -8)"
|
gitversion="$(git show --pretty=format:'%h %s' -s HEAD | sed 's/"/\\"/g')"
|
||||||
version "$gitbranch" "$gitversion";
|
version "$gitbranch" "$gitversion";
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* backtrace.h -- Public header file for stack backtrace library.
|
/* backtrace.h -- Public header file for stack backtrace library.
|
||||||
Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
Copyright (C) 2012-2024 Free Software Foundation, Inc.
|
||||||
Written by Ian Lance Taylor, Google.
|
Written by Ian Lance Taylor, Google.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
@@ -54,13 +54,14 @@ struct backtrace_state;
|
|||||||
invalid after this function returns.
|
invalid after this function returns.
|
||||||
|
|
||||||
As a special case, the ERRNUM argument will be passed as -1 if no
|
As a special case, the ERRNUM argument will be passed as -1 if no
|
||||||
debug info can be found for the executable, but the function
|
debug info can be found for the executable, or if the debug info
|
||||||
requires debug info (e.g., backtrace_full, backtrace_pcinfo). The
|
exists but has an unsupported version, but the function requires
|
||||||
MSG in this case will be something along the lines of "no debug
|
debug info (e.g., backtrace_full, backtrace_pcinfo). The MSG in
|
||||||
info". Similarly, ERRNUM will be passed as -1 if there is no
|
this case will be something along the lines of "no debug info".
|
||||||
symbol table, but the function requires a symbol table (e.g.,
|
Similarly, ERRNUM will be passed as -1 if there is no symbol table,
|
||||||
backtrace_syminfo). This may be used as a signal that some other
|
but the function requires a symbol table (e.g., backtrace_syminfo).
|
||||||
approach should be tried. */
|
This may be used as a signal that some other approach should be
|
||||||
|
tried. */
|
||||||
|
|
||||||
typedef void (*backtrace_error_callback) (void *data, const char *msg,
|
typedef void (*backtrace_error_callback) (void *data, const char *msg,
|
||||||
int errnum);
|
int errnum);
|
||||||
|
|||||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
|||||||
#All folders
|
|
||||||
SRB2.res
|
|
||||||
depend.dep
|
|
||||||
depend.ped
|
|
||||||
*.o
|
|
||||||
#VC9 folder only
|
|
||||||
/VC9/Win32
|
|
||||||
/VC9/x64
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# DON'T REMOVE
|
|
||||||
# This keeps the folder from disappearing
|
|
||||||
+2
-1
@@ -1,2 +1,3 @@
|
|||||||
/cscope.out
|
/cscope.out
|
||||||
/srb2wii
|
*.json
|
||||||
|
*.idx
|
||||||
+18
-2
@@ -129,6 +129,7 @@ set(SRB2_CORE_RENDER_SOURCES
|
|||||||
r_fps.c
|
r_fps.c
|
||||||
r_main.c
|
r_main.c
|
||||||
r_patch.c
|
r_patch.c
|
||||||
|
r_patchrotation.c
|
||||||
r_plane.c
|
r_plane.c
|
||||||
r_segs.c
|
r_segs.c
|
||||||
r_sky.c
|
r_sky.c
|
||||||
@@ -143,7 +144,8 @@ set(SRB2_CORE_RENDER_SOURCES
|
|||||||
r_fps.h
|
r_fps.h
|
||||||
r_local.h
|
r_local.h
|
||||||
r_main.h
|
r_main.h
|
||||||
r_patch
|
r_patch.h
|
||||||
|
r_patchrotation.h
|
||||||
r_plane.h
|
r_plane.h
|
||||||
r_segs.h
|
r_segs.h
|
||||||
r_sky.h
|
r_sky.h
|
||||||
@@ -173,6 +175,7 @@ set(SRB2_CORE_GAME_SOURCES
|
|||||||
p_user.c
|
p_user.c
|
||||||
k_director.c
|
k_director.c
|
||||||
k_kart.c
|
k_kart.c
|
||||||
|
k_stats.c
|
||||||
i_time.c
|
i_time.c
|
||||||
|
|
||||||
p_local.h
|
p_local.h
|
||||||
@@ -187,6 +190,7 @@ set(SRB2_CORE_GAME_SOURCES
|
|||||||
p_tick.h
|
p_tick.h
|
||||||
k_director.h
|
k_director.h
|
||||||
k_kart.h
|
k_kart.h
|
||||||
|
k_stats.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
if(NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
||||||
@@ -224,6 +228,14 @@ set(SRB2_CONFIG_STATIC_OPENGL OFF CACHE BOOL
|
|||||||
"Use statically linked OpenGL. NOT RECOMMENDED.")
|
"Use statically linked OpenGL. NOT RECOMMENDED.")
|
||||||
set(SRB2_CONFIG_USE_FBO_OGL ON CACHE BOOL
|
set(SRB2_CONFIG_USE_FBO_OGL ON CACHE BOOL
|
||||||
"Enable OpenGL FBO Downsampling support.")
|
"Enable OpenGL FBO Downsampling support.")
|
||||||
|
set(SRB2_CONFIG_DEDICATED OFF CACHE BOOL
|
||||||
|
"Build a dedicated server.")
|
||||||
|
|
||||||
|
if(${SRB2_CONFIG_DEDICATED})
|
||||||
|
set(SRB2_CONFIG_HAVE_GME NO)
|
||||||
|
set(SRB2_CONFIG_HAVE_OPENMPT NO)
|
||||||
|
set(SRB2_CONFIG_HWRENDER NO)
|
||||||
|
endif()
|
||||||
|
|
||||||
### use internal libraries?
|
### use internal libraries?
|
||||||
if(${CMAKE_SYSTEM} MATCHES "Windows") ###set on Windows only
|
if(${CMAKE_SYSTEM} MATCHES "Windows") ###set on Windows only
|
||||||
@@ -550,7 +562,11 @@ add_definitions(-DCMAKECONFIG)
|
|||||||
# ${SRB2_BLUA_HEADERS}
|
# ${SRB2_BLUA_HEADERS}
|
||||||
#)
|
#)
|
||||||
|
|
||||||
add_subdirectory(sdl)
|
if(${SRB2_CONFIG_DEDICATED})
|
||||||
|
add_subdirectory(dedicated)
|
||||||
|
else()
|
||||||
|
add_subdirectory(sdl)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT ${SRB2_SDL2_AVAILABLE} AND NOT ${SRB2_WIN32_AVAILABLE})
|
if(NOT ${SRB2_SDL2_AVAILABLE} AND NOT ${SRB2_WIN32_AVAILABLE})
|
||||||
message(FATAL_ERROR "There are no targets available to build an SRB2Kart executable. :(")
|
message(FATAL_ERROR "There are no targets available to build an SRB2Kart executable. :(")
|
||||||
|
|||||||
+369
-741
File diff suppressed because it is too large.
Load diff
+13
-11
@@ -12,6 +12,7 @@
|
|||||||
# to avoid a false positive with the version detection...
|
# to avoid a false positive with the version detection...
|
||||||
|
|
||||||
SUPPORTED_GCC_VERSIONS:=\
|
SUPPORTED_GCC_VERSIONS:=\
|
||||||
|
151 150 15\
|
||||||
142 141 140 14\
|
142 141 140 14\
|
||||||
132 131 130 13\
|
132 131 130 13\
|
||||||
123 122 121 120 12\
|
123 122 121 120 12\
|
||||||
@@ -78,6 +79,18 @@ ifeq (,$(filter GCC%,$(.VARIABLES)))
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef GCC151
|
||||||
|
GCC150=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef GCC15
|
||||||
|
GCC150=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef GCC150
|
||||||
|
GCC142=1
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef GCC142
|
ifdef GCC142
|
||||||
GCC141=1
|
GCC141=1
|
||||||
endif
|
endif
|
||||||
@@ -469,7 +482,6 @@ ifdef GCC81
|
|||||||
WFLAGS+=-Wno-error=multistatement-macros
|
WFLAGS+=-Wno-error=multistatement-macros
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
#indicate platform and what interface use with
|
#indicate platform and what interface use with
|
||||||
ifndef LINUX
|
ifndef LINUX
|
||||||
ifndef FREEBSD
|
ifndef FREEBSD
|
||||||
@@ -477,7 +489,6 @@ ifndef CYGWIN32
|
|||||||
ifndef MINGW
|
ifndef MINGW
|
||||||
ifndef MINGW64
|
ifndef MINGW64
|
||||||
ifndef SDL
|
ifndef SDL
|
||||||
ifndef DUMMY
|
|
||||||
$(error No interface or platform flag defined)
|
$(error No interface or platform flag defined)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -485,7 +496,6 @@ endif
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
#determine the interface directory (where you put all i_*.c)
|
#determine the interface directory (where you put all i_*.c)
|
||||||
i_net_o=$(OBJDIR)/i_net.o
|
i_net_o=$(OBJDIR)/i_net.o
|
||||||
@@ -510,11 +520,6 @@ UPX_OPTS+=-q
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
#Interface Setup
|
#Interface Setup
|
||||||
ifdef DUMMY
|
|
||||||
INTERFACE=dummy
|
|
||||||
OBJDIR:=$(OBJDIR)/dummy
|
|
||||||
BIN:=$(BIN)/dummy
|
|
||||||
else
|
|
||||||
ifdef LINUX
|
ifdef LINUX
|
||||||
SDL=1
|
SDL=1
|
||||||
ifdef LINUX64
|
ifdef LINUX64
|
||||||
@@ -561,7 +566,6 @@ endif
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef ARCHNAME
|
ifdef ARCHNAME
|
||||||
OBJDIR:=$(OBJDIR)/$(ARCHNAME)
|
OBJDIR:=$(OBJDIR)/$(ARCHNAME)
|
||||||
@@ -576,7 +580,6 @@ ifdef SDL
|
|||||||
OBJDIR:=$(OBJDIR)/SDL
|
OBJDIR:=$(OBJDIR)/SDL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef DUMMY
|
|
||||||
ifdef DEBUGMODE
|
ifdef DEBUGMODE
|
||||||
OBJDIR:=$(OBJDIR)/Debug
|
OBJDIR:=$(OBJDIR)/Debug
|
||||||
BIN:=$(BIN)/Debug
|
BIN:=$(BIN)/Debug
|
||||||
@@ -584,4 +587,3 @@ else
|
|||||||
OBJDIR:=$(OBJDIR)/Release
|
OBJDIR:=$(OBJDIR)/Release
|
||||||
BIN:=$(BIN)/Release
|
BIN:=$(BIN)/Release
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
makedir:=$(makedir)/Dedicated
|
||||||
|
|
||||||
|
sources+=$(call List,dedicated/Sourcefile)
|
||||||
|
|
||||||
|
opts+=-DDEDICATED
|
||||||
|
|
||||||
|
libs+=-lpthread
|
||||||
|
|
||||||
|
ifdef MINGW
|
||||||
|
libs+=-mconsole
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef NOTHREADS
|
||||||
|
opts+=-DHAVE_THREADS
|
||||||
|
sources+=dedicated/i_threads.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
NOOPENMPT=1
|
||||||
|
NOGME=1
|
||||||
|
NOHW=1
|
||||||
|
NOUPNP=1
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
#
|
||||||
|
# Detect the host system and compiler version.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Previously featured:\
|
||||||
|
PANDORA\
|
||||||
|
DUMMY\
|
||||||
|
DJGPPDOS\
|
||||||
|
SOLARIS\
|
||||||
|
MACOSX\
|
||||||
|
|
||||||
|
all_systems:=\
|
||||||
|
LINUX64\
|
||||||
|
MINGW64\
|
||||||
|
MINGW\
|
||||||
|
UNIX\
|
||||||
|
LINUX\
|
||||||
|
FREEBSD\
|
||||||
|
HAIKU\
|
||||||
|
|
||||||
|
# check for user specified system
|
||||||
|
ifeq (,$(filter $(all_systems),$(.VARIABLES)))
|
||||||
|
ifeq ($(OS),Windows_NT) # all windows are Windows_NT...
|
||||||
|
|
||||||
|
ifeq ($(shell uname -s | grep -o MINGW64),MINGW64) # 64-bit MinGW
|
||||||
|
_m=Detected a Windows system,\
|
||||||
|
compiling for 64-bit MinGW SDL...)
|
||||||
|
$(call Print,$(_m))
|
||||||
|
MINGW64=1
|
||||||
|
else # 32-bit MinGW
|
||||||
|
_m=Detected a Windows system,\
|
||||||
|
compiling for 32-bit MinGW SDL...)
|
||||||
|
$(call Print,$(_m))
|
||||||
|
MINGW=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
NOOBJDUMP=1
|
||||||
|
else # if you on the *nix
|
||||||
|
|
||||||
|
system:=$(shell uname -s)
|
||||||
|
|
||||||
|
ifeq ($(system),Linux)
|
||||||
|
new_system:=LINUX
|
||||||
|
else ifeq ($(system),Haiku)
|
||||||
|
new_system:=HAIKU
|
||||||
|
else
|
||||||
|
|
||||||
|
$(error \
|
||||||
|
Could not automatically detect your system,\
|
||||||
|
try specifying a system manually)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(shell getconf LONG_BIT),64)
|
||||||
|
system+=64-bit
|
||||||
|
new_system:=$(new_system)64
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(call Print,Detected $(system) ($(new_system))...)
|
||||||
|
$(new_system):=1
|
||||||
|
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# This must have high to low order.
|
||||||
|
gcc_versions:=\
|
||||||
|
151 150 15\
|
||||||
|
142 141 140 14\
|
||||||
|
132 131 130 13\
|
||||||
|
123 122 121 120 12\
|
||||||
|
114 113 112 111 110 11\
|
||||||
|
105 104 103 102 101 100 10\
|
||||||
|
95 94 93 92 91 90\
|
||||||
|
85 84 83 82 81 80\
|
||||||
|
75 74 73 72 71 70\
|
||||||
|
64 63 62 61 60\
|
||||||
|
55 54 53 52 51 50\
|
||||||
|
49 48 47 46 45 44 43 42 41 40
|
||||||
|
|
||||||
|
latest_gcc_version:=15.1.1
|
||||||
|
|
||||||
|
# Automatically set version flag, but not if one was
|
||||||
|
# manually set. And don't bother if this is a clean only
|
||||||
|
# run.
|
||||||
|
ifeq (,$(call Wildvar,GCC% destructive))
|
||||||
|
|
||||||
|
# can't use $(CC) --version here since that uses argv[0] to display the name
|
||||||
|
# also gcc outputs the information to stderr, so I had to do 2>&1
|
||||||
|
# this program really doesn't like identifying itself
|
||||||
|
shellversion:=$(shell $(CC) -v 2>&1)
|
||||||
|
# Try to remove "-win32"
|
||||||
|
version:=$(subst -win32,.0,$(shellversion))
|
||||||
|
|
||||||
|
# check if this is in fact GCC
|
||||||
|
ifneq (,$(findstring gcc version,$(version)))
|
||||||
|
|
||||||
|
# in stark contrast to the name, gcc will give me a nicely formatted version number for free
|
||||||
|
shellversion:=$(shell $(CC) -dumpfullversion)
|
||||||
|
|
||||||
|
# Try to remove "-win32"
|
||||||
|
version:=$(subst -win32,.0,$(shellversion))
|
||||||
|
|
||||||
|
# Turn version into words of major, minor
|
||||||
|
v:=$(subst ., ,$(version))
|
||||||
|
# concat. major minor
|
||||||
|
v:=$(word 1,$(v))$(word 2,$(v))
|
||||||
|
|
||||||
|
# If this version is not in the list,
|
||||||
|
# default to the latest supported
|
||||||
|
ifeq (,$(filter $(v),$(gcc_versions)))
|
||||||
|
define line =
|
||||||
|
Your compiler version, GCC $(version), \
|
||||||
|
is not supported by the Makefile.
|
||||||
|
The Makefile will assume GCC $(latest_gcc_version).
|
||||||
|
endef
|
||||||
|
$(call Print,$(line))
|
||||||
|
GCC$(subst .,,$(latest_gcc_version)):=1
|
||||||
|
else
|
||||||
|
$(call Print,Detected GCC $(version) (GCC$(v)))
|
||||||
|
GCC$(v):=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
endif
|
||||||
|
endif
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
#
|
||||||
|
# Makefile for feature flags.
|
||||||
|
#
|
||||||
|
|
||||||
|
passthru_opts+=\
|
||||||
|
NOHW NOMD5 NOPOSTPROCESSING\
|
||||||
|
MOBJCONSISTANCY PACKETDROP ZDEBUG\
|
||||||
|
HAVE_MINIUPNPC\
|
||||||
|
HAVE_DISCORDRPC DEVELOP\
|
||||||
|
NOBLUAJIT
|
||||||
|
|
||||||
|
# build with debugging information
|
||||||
|
ifdef DEBUGMODE
|
||||||
|
PACKETDROP=1
|
||||||
|
opts+=-DPARANOIA -DRANGECHECK
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef NOHW
|
||||||
|
opts+=-DHWRENDER
|
||||||
|
|
||||||
|
ifndef NOSCREENFBO
|
||||||
|
opts+=-DUSE_FBO_OGL
|
||||||
|
endif
|
||||||
|
|
||||||
|
sources+=$(call List,hardware/Sourcefile)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef NOMD5
|
||||||
|
sources+=md5.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef NONET
|
||||||
|
ifndef NOSATURNJOIN
|
||||||
|
opts+=-DDOSATURNJOIN
|
||||||
|
endif
|
||||||
|
ifndef NOSATURNPAK
|
||||||
|
opts+=-DDOSATURNPAK
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef NOZLIB
|
||||||
|
ifndef NOPNG
|
||||||
|
ifdef PNG_PKGCONFIG
|
||||||
|
$(eval $(call Use_pkg_config,PNG_PKGCONFIG))
|
||||||
|
else
|
||||||
|
PNG_CONFIG?=$(call Prefix,libpng-config)
|
||||||
|
$(eval $(call Configure,PNG,$(PNG_CONFIG) \
|
||||||
|
$(if $(PNG_STATIC),--static),,--ldflags))
|
||||||
|
endif
|
||||||
|
ifdef LINUX
|
||||||
|
opts+=-D_LARGEFILE64_SOURCE
|
||||||
|
endif
|
||||||
|
opts+=-DHAVE_PNG
|
||||||
|
sources+=apng.c
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef NOCURL
|
||||||
|
CURLCONFIG?=curl-config
|
||||||
|
$(eval $(call Configure,CURL,$(CURLCONFIG)))
|
||||||
|
opts+=-DHAVE_CURL
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef HAVE_MINIUPNPC
|
||||||
|
MINIUPNPC_PKGCONFIG?=miniupnpc
|
||||||
|
$(eval $(call Use_pkg_config,MINIUPNPC))
|
||||||
|
HAVE_MINIUPNPC=1
|
||||||
|
opts+=-DHAVE_MINIUPNPC
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef NOLIBBACKTRACE
|
||||||
|
$(eval $(call Propogate_flags,LIBBACKTRACE))
|
||||||
|
libs+=-lbacktrace
|
||||||
|
opts+=-DHAVE_LIBBACKTRACE
|
||||||
|
endif
|
||||||
|
|
||||||
|
#windoze hack
|
||||||
|
ifdef MINGW
|
||||||
|
ifndef NODISCORDRPC
|
||||||
|
HAVE_DISCORDRPC=1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef HAVE_DISCORDRPC
|
||||||
|
$(eval $(call Propogate_flags,DISCORDRPC))
|
||||||
|
libs+=-ldiscord-rpc
|
||||||
|
opts+=-DUSE_STUN
|
||||||
|
sources+=discord.c stun.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
# (Valgrind is a memory debugger.)
|
||||||
|
ifdef VALGRIND
|
||||||
|
VALGRIND_PKGCONFIG?=valgrind
|
||||||
|
VALGRIND_LDFLAGS=
|
||||||
|
$(eval $(call Use_pkg_config,VALGRIND))
|
||||||
|
ZDEBUG=1
|
||||||
|
opts+=-DHAVE_VALGRIND
|
||||||
|
endif
|
||||||
|
|
||||||
|
default_packages:=\
|
||||||
|
GME/libgme/LIBGME\
|
||||||
|
OPENMPT/libopenmpt/LIBOPENMPT\
|
||||||
|
ZLIB/zlib\
|
||||||
|
|
||||||
|
$(foreach p,$(default_packages),\
|
||||||
|
$(eval $(call Check_pkg_config,$(p))))
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
#
|
||||||
|
# Makefile options for Haiku
|
||||||
|
#
|
||||||
|
|
||||||
|
opts+=-DUNIXCOMMON -DLUA_USE_POSIX
|
||||||
|
|
||||||
|
ifndef DEDICATED
|
||||||
|
ifndef DUMMY
|
||||||
|
SDL?=1
|
||||||
|
DEDICATED?=0
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
NOEXECINFO=1
|
||||||
|
|
||||||
|
ifeq (${SDL},1)
|
||||||
|
EXENAME?=srb2haiku
|
||||||
|
else ifeq (${DEDICATED},1)
|
||||||
|
EXENAME?=srb2haikud
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef NONET
|
||||||
|
libs+=-lnetwork
|
||||||
|
endif
|
||||||
|
|
||||||
|
define _set =
|
||||||
|
$(1)_CFLAGS?=$($(1)_opts)
|
||||||
|
$(1)_LDFLAGS?=$($(1)_libs)
|
||||||
|
endef
|
||||||
|
|
||||||
|
lib:=../libs/gme
|
||||||
|
LIBGME_opts:=-I$(lib)/include
|
||||||
|
LIBGME_libs:=-l:libgme.so.0
|
||||||
|
$(eval $(call _set,LIBGME))
|
||||||
|
|
||||||
|
lib:=../libs/libopenmpt
|
||||||
|
LIBOPENMPT_opts:=-I$(lib)/inc
|
||||||
|
LIBOPENMPT_libs:=-l:libopenmpt.so.0
|
||||||
|
$(eval $(call _set,LIBOPENMPT))
|
||||||
|
|
||||||
|
ifdef SDL
|
||||||
|
lib:=../libs/SDL2_mixer
|
||||||
|
mixer_opts:=-I$(lib)/include
|
||||||
|
mixer_libs:=-l:libSDL2_mixer-2.0.so.0
|
||||||
|
|
||||||
|
lib:=../libs/SDL2
|
||||||
|
SDL_opts:=-I$(lib)/include $(mixer_opts)
|
||||||
|
SDL_libs:=$(mixer_libs) -l:libSDL2-2.0.so.0
|
||||||
|
$(eval $(call _set,SDL))
|
||||||
|
endif
|
||||||
|
|
||||||
|
lib:=../libs/zlib
|
||||||
|
ZLIB_opts:=-I$(lib)
|
||||||
|
ZLIB_libs:=-l:libz.so.1
|
||||||
|
$(eval $(call _set,ZLIB))
|
||||||
|
|
||||||
|
ifndef PNG_CONFIG
|
||||||
|
PNG_opts:=
|
||||||
|
PNG_libs:=-l:libpng16.so.16
|
||||||
|
$(eval $(call _set,PNG))
|
||||||
|
endif
|
||||||
|
|
||||||
|
lib:=../libs/curl
|
||||||
|
CURL_opts:=-I$(lib)/include
|
||||||
|
CURL_libs:=-l:libcurl.so.4
|
||||||
|
$(eval $(call _set,CURL))
|
||||||
|
|
||||||
|
lib:=../libs/miniupnpc
|
||||||
|
MINIUPNPC_opts:=-I$(lib)/include
|
||||||
|
MINIUPNPC_libs:=-l:libminiupnpc.so.17
|
||||||
|
$(eval $(call _set,MINIUPNPC))
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
#
|
||||||
|
# Makefile options for unices (linux, bsd...)
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
opts+=-DUNIXCOMMON -DLUA_USE_POSIX
|
||||||
|
# Use -rdynamic so a backtrace log shows function names
|
||||||
|
# instead of addresses
|
||||||
|
libs+=-lm -rdynamic
|
||||||
|
|
||||||
|
ifndef NOHW
|
||||||
|
opts+=-I/usr/X11R6/include
|
||||||
|
libs+=-L/usr/X11R6/lib
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef DEDICATED
|
||||||
|
SDL?=1
|
||||||
|
DEDICATED?=0
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq (${SDL},1)
|
||||||
|
EXENAME?=lsdl2srb2kart
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq (${DEDICATED},1)
|
||||||
|
EXENAME?=lsrb2kartd
|
||||||
|
endif
|
||||||
|
|
||||||
|
# In common usage.
|
||||||
|
ifdef LINUX
|
||||||
|
libs+=-lrt
|
||||||
|
passthru_opts+=NOTERMIOS
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Tested by Steel, as of release 2.2.8.
|
||||||
|
ifdef FREEBSD
|
||||||
|
opts+=-I/usr/X11R6/include -DLINUX -DFREEBSD
|
||||||
|
libs+=-L/usr/X11R6/lib -lkvm -lexecinfo
|
||||||
|
endif
|
||||||
|
|
||||||
|
# FIXME: UNTESTED
|
||||||
|
#ifdef SOLARIS
|
||||||
|
#NOIPX=1
|
||||||
|
#opts+=-I/usr/local/include -I/opt/sfw/include \
|
||||||
|
# -DSOLARIS -DINADDR_NONE=INADDR_ANY -DBSD_COMP
|
||||||
|
#libs+=-L/opt/sfw/lib -lsocket -lnsl
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#
|
||||||
|
# Warn about old build directories and offer to purge.
|
||||||
|
#
|
||||||
|
|
||||||
|
_old:=$(wildcard $(addprefix ../bin/,FreeBSD Linux \
|
||||||
|
Linux64 Mingw Mingw64 SDL dummy) ../objs ../dep)
|
||||||
|
|
||||||
|
ifdef _old
|
||||||
|
$(foreach v,$(_old),$(info $(abspath $(v))))
|
||||||
|
$(info )
|
||||||
|
$(info These directories are no longer\
|
||||||
|
required and should be removed.)
|
||||||
|
$(info You may remove them manually or\
|
||||||
|
by using 'make distclean')
|
||||||
|
$(error )
|
||||||
|
endif
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
#
|
||||||
|
# Platform specific options.
|
||||||
|
#
|
||||||
|
|
||||||
|
PKG_CONFIG?=pkg-config
|
||||||
|
|
||||||
|
ifdef WINDOWSHELL
|
||||||
|
rmrf=-2>NUL DEL /S /Q
|
||||||
|
mkdir=-2>NUL MD
|
||||||
|
cat=TYPE
|
||||||
|
else
|
||||||
|
rmrf=rm -rf
|
||||||
|
mkdir=mkdir -p
|
||||||
|
cat=cat
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef LINUX64
|
||||||
|
LINUX=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef MINGW64
|
||||||
|
MINGW=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef LINUX
|
||||||
|
UNIX=1
|
||||||
|
ifdef LINUX64
|
||||||
|
NONX86=1
|
||||||
|
# LINUX64 does not imply X86_64=1;
|
||||||
|
# could mean ARM64 or Itanium
|
||||||
|
platform=linux/64
|
||||||
|
else
|
||||||
|
platform=linux
|
||||||
|
endif
|
||||||
|
else ifdef FREEBSD
|
||||||
|
UNIX=1
|
||||||
|
platform=freebsd
|
||||||
|
else ifdef HAIKU
|
||||||
|
# Give Haiku its own configuration, since it
|
||||||
|
# isn't actually UNIX.
|
||||||
|
include Makefile.d/haiku.mk
|
||||||
|
else ifdef SOLARIS # FIXME: UNTESTED
|
||||||
|
UNIX=1
|
||||||
|
platform=solaris
|
||||||
|
else ifdef CYGWIN32 # FIXME: UNTESTED
|
||||||
|
platform=cygwin
|
||||||
|
else ifdef MINGW
|
||||||
|
ifdef MINGW64
|
||||||
|
NONX86=1
|
||||||
|
NOASM=1
|
||||||
|
# MINGW64 should not necessarily imply X86_64=1,
|
||||||
|
# but we make that assumption elsewhere
|
||||||
|
# Once that changes, remove this
|
||||||
|
X86_64=1
|
||||||
|
platform=mingw/64
|
||||||
|
else
|
||||||
|
platform=mingw
|
||||||
|
endif
|
||||||
|
include Makefile.d/win32.mk
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef platform
|
||||||
|
makedir:=$(makedir)/$(platform)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef UNIX
|
||||||
|
include Makefile.d/nix.mk
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(SDL), 1)
|
||||||
|
include Makefile.d/sdl.mk
|
||||||
|
else ifeq ($(DEDICATED), 1)
|
||||||
|
include Makefile.d/dedicated.mk
|
||||||
|
else
|
||||||
|
include Makefile.d/dummy.mk
|
||||||
|
endif
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
#
|
||||||
|
# Makefile options for SDL2 backend.
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# SDL...., *looks at Alam*, THIS IS A MESS!
|
||||||
|
#
|
||||||
|
# ...a little bird flexes its muscles...
|
||||||
|
#
|
||||||
|
|
||||||
|
makedir:=$(makedir)/SDL
|
||||||
|
|
||||||
|
sources+=$(call List,sdl/Sourcefile)
|
||||||
|
opts+=-DDIRECTFULLSCREEN -DHAVE_SDL
|
||||||
|
|
||||||
|
NOUPNP=1
|
||||||
|
|
||||||
|
# FIXME: UNTESTED
|
||||||
|
#ifdef PANDORA
|
||||||
|
#include sdl/SRB2Pandora/Makefile.cfg
|
||||||
|
#endif #ifdef PANDORA
|
||||||
|
|
||||||
|
# FIXME: UNTESTED
|
||||||
|
#ifdef CYGWIN32
|
||||||
|
#include sdl/MakeCYG.cfg
|
||||||
|
#endif #ifdef CYGWIN32
|
||||||
|
|
||||||
|
ifndef NOHW
|
||||||
|
sources+=sdl/ogl_sdl.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef NOMIXER
|
||||||
|
sources+=sdl/sdl_sound.c
|
||||||
|
else
|
||||||
|
opts+=-DHAVE_MIXER
|
||||||
|
sources+=sdl/mixer_sound.c
|
||||||
|
|
||||||
|
ifndef HAIKU # Haiku has a special import path
|
||||||
|
libs+=-lSDL2_mixer
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef NOTHREADS
|
||||||
|
opts+=-DHAVE_THREADS
|
||||||
|
sources+=sdl/i_threads.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef SDL_PKGCONFIG
|
||||||
|
$(eval $(call Use_pkg_config,SDL))
|
||||||
|
else
|
||||||
|
SDL_CONFIG?=$(call Prefix,sdl2-config)
|
||||||
|
SDL_CFLAGS?=$(shell $(SDL_CONFIG) --cflags)
|
||||||
|
SDL_LDFLAGS?=$(shell $(SDL_CONFIG) \
|
||||||
|
$(if $(STATIC),--static-libs,--libs))
|
||||||
|
$(eval $(call Propogate_flags,SDL))
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef MINGW
|
||||||
|
ifndef NOSDLMAIN
|
||||||
|
SDLMAIN=1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef SDLMAIN
|
||||||
|
opts+=-DSDLMAIN
|
||||||
|
else
|
||||||
|
ifdef MINGW
|
||||||
|
opts+=-Umain
|
||||||
|
libs+=-mconsole
|
||||||
|
endif
|
||||||
|
endif
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
#
|
||||||
|
# Utility macros for the rest of the Makefiles.
|
||||||
|
#
|
||||||
|
|
||||||
|
Ifnot=$(if $(1),$(3),$(2))
|
||||||
|
Ifndef=$(call Ifnot,$($(1)),$(2),$(3))
|
||||||
|
|
||||||
|
# Match and expand a list of variables by pattern.
|
||||||
|
Wildvar=$(foreach v,$(filter $(1),$(.VARIABLES)),$($(v)))
|
||||||
|
|
||||||
|
# Read a list of words from file and prepend each with the
|
||||||
|
# directory of the file.
|
||||||
|
_cat=$(shell $(cat) $(call Windows_path,$(1)))
|
||||||
|
List=$(addprefix $(dir $(1)),$(call _cat,$(1)))
|
||||||
|
|
||||||
|
# Convert path separators to backslash on Windows.
|
||||||
|
Windows_path=$(if $(WINDOWSHELL),$(subst /,\,$(1)),$(1))
|
||||||
|
|
||||||
|
define Propogate_flags =
|
||||||
|
opts+=$$($(1)_CFLAGS)
|
||||||
|
libs+=$$($(1)_LDFLAGS)
|
||||||
|
endef
|
||||||
|
|
||||||
|
# Set library's _CFLAGS and _LDFLAGS from some command.
|
||||||
|
# Automatically propogates the flags too.
|
||||||
|
# 1: variable prefix (e.g. CURL)
|
||||||
|
# 2: start of command (e.g. curl-config)
|
||||||
|
# --- optional ----
|
||||||
|
# 3: CFLAGS command arguments, default '--cflags'
|
||||||
|
# 4: LDFLAGS command arguments, default '--libs'
|
||||||
|
# 5: common command arguments at the end of command
|
||||||
|
define Configure =
|
||||||
|
$(1)_CFLAGS?=$$(shell $(2) $(or $(3),--cflags) $(5))
|
||||||
|
$(1)_LDFLAGS?=$$(shell $(2) $(or $(4),--libs) $(5))
|
||||||
|
$(call Propogate_flags,$(1))
|
||||||
|
endef
|
||||||
|
|
||||||
|
# Configure library with pkg-config. The package name is
|
||||||
|
# taken from a _PKGCONFIG variable.
|
||||||
|
# 1: variable prefix
|
||||||
|
#
|
||||||
|
# LIBGME_PKGCONFIG=libgme
|
||||||
|
# $(eval $(call Use_pkg_config,LIBGME))
|
||||||
|
define Use_pkg_config =
|
||||||
|
$(call Configure,$(1),$(PKG_CONFIG),,,$($(1)_PKGCONFIG))
|
||||||
|
endef
|
||||||
|
|
||||||
|
# Check disabling flag and configure package in one step
|
||||||
|
# according to delimited argument.
|
||||||
|
# (There is only one argument, but it split by slash.)
|
||||||
|
# 1/: short form library name (uppercase). This is
|
||||||
|
# prefixed with 'NO' and 'HAVE_'. E.g. NOGME, HAVE_GME
|
||||||
|
# /2: package name (e.g. libgme)
|
||||||
|
# /3: variable prefix
|
||||||
|
#
|
||||||
|
# The following example would check if NOGME is not
|
||||||
|
# defined before attempting to define LIBGME_CFLAGS and
|
||||||
|
# LIBGME_LDFLAGS as with Use_pkg_config.
|
||||||
|
#
|
||||||
|
# $(eval $(call Check_pkg_config,GME/libgme/LIBGME))
|
||||||
|
define Check_pkg_config =
|
||||||
|
_p:=$(subst /, ,$(1))
|
||||||
|
_v1:=$$(word 1,$$(_p))
|
||||||
|
_v2:=$$(or $$(word 3,$$(_p)),$$(_v1))
|
||||||
|
ifndef NO$$(_v1)
|
||||||
|
$$(_v2)_PKGCONFIG?=$$(word 2,$$(_p))
|
||||||
|
$$(eval $$(call Use_pkg_config,$$(_v2)))
|
||||||
|
opts+=-DHAVE_$$(_v1)
|
||||||
|
endif
|
||||||
|
endef
|
||||||
|
|
||||||
|
# $(call Prefix,gcc)
|
||||||
|
Prefix=$(if $(PREFIX),$(PREFIX)-)$(1)
|
||||||
|
|
||||||
|
Echo=
|
||||||
|
Echo_name=
|
||||||
|
Print=
|
||||||
|
|
||||||
|
ifndef SILENT
|
||||||
|
Echo=@echo $(1)
|
||||||
|
ifndef ECHO
|
||||||
|
ifndef NOECHOFILENAMES
|
||||||
|
Echo_name=$(call Echo,-- $(1) ...)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifndef MAKE_RESTARTS
|
||||||
|
ifndef destructive
|
||||||
|
Print=$(info $(1))
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
.=$(call Ifndef,ECHO,@)
|
||||||
@@ -0,0 +1,178 @@
|
|||||||
|
#
|
||||||
|
# Flags to put a sock in GCC!
|
||||||
|
#
|
||||||
|
|
||||||
|
# See the versions list in detect.mk
|
||||||
|
# This will define all version flags going backward.
|
||||||
|
# Yes, it's magic.
|
||||||
|
define _predecessor =
|
||||||
|
ifdef GCC$(firstword $(1))
|
||||||
|
GCC$(lastword $(1)):=1
|
||||||
|
endif
|
||||||
|
endef
|
||||||
|
_n:=$(words $(gcc_versions))
|
||||||
|
$(foreach v,$(join $(wordlist 2,$(_n),- $(gcc_versions)),\
|
||||||
|
$(addprefix =,$(wordlist 2,$(_n),$(gcc_versions)))),\
|
||||||
|
$(and $(findstring =,$(v)),\
|
||||||
|
$(eval $(call _predecessor,$(subst =, ,$(v))))))
|
||||||
|
|
||||||
|
# -W -Wno-unused
|
||||||
|
|
||||||
|
ifdef GCC150
|
||||||
|
opts+=-std=gnu17
|
||||||
|
endif
|
||||||
|
WFLAGS:=-Wall -Wno-trigraphs
|
||||||
|
ifndef GCC295
|
||||||
|
#WFLAGS+=-Wno-packed
|
||||||
|
endif
|
||||||
|
ifndef RELAXWARNINGS
|
||||||
|
WFLAGS+=-W
|
||||||
|
#WFLAGS+=-Wno-sign-compare
|
||||||
|
ifndef GCC295
|
||||||
|
WFLAGS+=-Wno-div-by-zero
|
||||||
|
endif
|
||||||
|
#WFLAGS+=-Wsystem-headers
|
||||||
|
WFLAGS+=-Wfloat-equal
|
||||||
|
#WFLAGS+=-Wtraditional
|
||||||
|
WFLAGS+=-Wundef
|
||||||
|
ifndef GCC295
|
||||||
|
WFLAGS+=-Wendif-labels
|
||||||
|
endif
|
||||||
|
ifdef GCC41
|
||||||
|
WFLAGS+=-Wshadow
|
||||||
|
endif
|
||||||
|
#WFLAGS+=-Wlarger-than-%len%
|
||||||
|
WFLAGS+=-Wpointer-arith -Wbad-function-cast
|
||||||
|
ifdef GCC45
|
||||||
|
#WFLAGS+=-Wc++-compat
|
||||||
|
endif
|
||||||
|
WFLAGS+=-Wcast-qual
|
||||||
|
ifndef NOCASTALIGNWARN
|
||||||
|
WFLAGS+=-Wcast-align
|
||||||
|
endif
|
||||||
|
WFLAGS+=-Wwrite-strings
|
||||||
|
ifndef ERRORMODE
|
||||||
|
#WFLAGS+=-Wconversion
|
||||||
|
ifdef GCC43
|
||||||
|
#WFLAGS+=-Wno-sign-conversion
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
WFLAGS+=-Wsign-compare
|
||||||
|
ifdef GCC91
|
||||||
|
WFLAGS+=-Wno-error=address-of-packed-member
|
||||||
|
endif
|
||||||
|
ifdef GCC45
|
||||||
|
WFLAGS+=-Wlogical-op
|
||||||
|
endif
|
||||||
|
WFLAGS+=-Waggregate-return
|
||||||
|
ifdef HAIKU
|
||||||
|
ifdef GCC41
|
||||||
|
#WFLAGS+=-Wno-attributes
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
#WFLAGS+=-Wstrict-prototypes
|
||||||
|
ifdef GCC40
|
||||||
|
WFLAGS+=-Wold-style-definition
|
||||||
|
endif
|
||||||
|
WFLAGS+=-Wmissing-prototypes -Wmissing-declarations
|
||||||
|
ifdef GCC40
|
||||||
|
WFLAGS+=-Wmissing-field-initializers
|
||||||
|
endif
|
||||||
|
WFLAGS+=-Wmissing-noreturn
|
||||||
|
#WFLAGS+=-Wmissing-format-attribute
|
||||||
|
#WFLAGS+=-Wno-multichar
|
||||||
|
#WFLAGS+=-Wno-deprecated-declarations
|
||||||
|
#WFLAGS+=-Wpacked
|
||||||
|
#WFLAGS+=-Wpadded
|
||||||
|
#WFLAGS+=-Wredundant-decls
|
||||||
|
WFLAGS+=-Wnested-externs
|
||||||
|
#WFLAGS+=-Wunreachable-code
|
||||||
|
WFLAGS+=-Winline
|
||||||
|
ifdef DEBUGMODE
|
||||||
|
WFLAGS+=-Wno-error=inline
|
||||||
|
endif
|
||||||
|
ifdef GCC43
|
||||||
|
WFLAGS+=-funit-at-a-time
|
||||||
|
WFLAGS+=-Wlogical-op
|
||||||
|
endif
|
||||||
|
ifndef GCC295
|
||||||
|
WFLAGS+=-Wdisabled-optimization
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
WFLAGS+=-Wformat-y2k
|
||||||
|
ifdef GCC71
|
||||||
|
WFLAGS+=-Wno-error=format-overflow=2
|
||||||
|
endif
|
||||||
|
WFLAGS+=-Wformat-security
|
||||||
|
ifndef GCC29
|
||||||
|
#WFLAGS+=-Winit-self
|
||||||
|
endif
|
||||||
|
ifdef GCC46
|
||||||
|
WFLAGS+=-Wno-suggest-attribute=noreturn
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef NOLDWARNING
|
||||||
|
LDFLAGS+=-Wl,--as-needed
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef ERRORMODE
|
||||||
|
WFLAGS+=-Werror
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef GCC43
|
||||||
|
#WFLAGS+=-Wno-error=clobbered
|
||||||
|
endif
|
||||||
|
ifdef GCC44
|
||||||
|
#WFLAGS+=-Wno-error=array-bounds
|
||||||
|
endif
|
||||||
|
ifdef GCC46
|
||||||
|
WFLAGS+=-Wno-error=suggest-attribute=noreturn
|
||||||
|
endif
|
||||||
|
ifdef GCC54
|
||||||
|
WFLAGS+=-Wno-logical-op -Wno-error=logical-op
|
||||||
|
endif
|
||||||
|
ifdef GCC61
|
||||||
|
WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare
|
||||||
|
endif
|
||||||
|
ifdef GCC71
|
||||||
|
WFLAGS+=-Wimplicit-fallthrough=4
|
||||||
|
endif
|
||||||
|
ifdef GCC81
|
||||||
|
WFLAGS+=-Wno-error=format-overflow
|
||||||
|
WFLAGS+=-Wno-format-overflow
|
||||||
|
WFLAGS+=-Wno-error=multistatement-macros
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef NONX86
|
||||||
|
ifdef X86_64 # yeah that SEEMS contradictory
|
||||||
|
opts+=-march=nocona
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
ifndef GCC29
|
||||||
|
opts+=-msse3 -mfpmath=sse
|
||||||
|
else
|
||||||
|
opts+=-mpentium
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef DEBUGMODE
|
||||||
|
ifdef GCC48
|
||||||
|
opts+=-Og
|
||||||
|
else
|
||||||
|
opts+=-O0
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef VALGRIND
|
||||||
|
ifdef GCC46
|
||||||
|
WFLAGS+=-Wno-error=unused-but-set-variable
|
||||||
|
WFLAGS+=-Wno-unused-but-set-variable
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Lua
|
||||||
|
ifdef GCC43
|
||||||
|
ifndef GCC44
|
||||||
|
WFLAGS+=-Wno-logical-op
|
||||||
|
endif
|
||||||
|
endif
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
#
|
||||||
|
# Mingw, if you don't know, that's Win32/Win64
|
||||||
|
#
|
||||||
|
|
||||||
|
ifndef MINGW64
|
||||||
|
EXENAME?=srb2kart-saturn_32bit.exe
|
||||||
|
else
|
||||||
|
EXENAME?=srb2kart-saturn_64bit.exe
|
||||||
|
endif
|
||||||
|
|
||||||
|
# disable dynamicbase if under msys2
|
||||||
|
ifdef MSYSTEM
|
||||||
|
libs+=-Wl,--disable-dynamicbase
|
||||||
|
endif
|
||||||
|
|
||||||
|
sources+=win32/Srb2win.rc
|
||||||
|
opts+=-DSTDC_HEADERS
|
||||||
|
libs+=-ladvapi32 -lkernel32 -lmsvcrt -luser32
|
||||||
|
|
||||||
|
ifndef DEDICATED
|
||||||
|
ifndef DUMMY
|
||||||
|
SDL?=1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef NOHW
|
||||||
|
opts+=-DUSE_WGL_SWAP
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef MINGW64
|
||||||
|
libs+=-lws2_32
|
||||||
|
else
|
||||||
|
#ifndef HAVE_IPV6
|
||||||
|
#libs+=-lwsock32
|
||||||
|
#else
|
||||||
|
libs+=-lws2_32
|
||||||
|
#endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef MINGW64
|
||||||
|
libs+=-Wl,--large-address-aware
|
||||||
|
NOLIBBACKTRACE=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef MINGW64
|
||||||
|
32=32
|
||||||
|
x86=x86
|
||||||
|
i686=i686
|
||||||
|
else
|
||||||
|
32=64
|
||||||
|
x86=x86_64
|
||||||
|
i686=x86_64
|
||||||
|
endif
|
||||||
|
|
||||||
|
mingw:=$(i686)-w64-mingw32
|
||||||
|
|
||||||
|
define _set =
|
||||||
|
$(1)_CFLAGS?=$($(1)_opts)
|
||||||
|
$(1)_LDFLAGS?=$($(1)_libs)
|
||||||
|
endef
|
||||||
|
|
||||||
|
lib:=../libs/gme
|
||||||
|
LIBGME_opts:=-I$(lib)/include
|
||||||
|
LIBGME_libs:=-L$(lib)/win$(32) -lgme
|
||||||
|
$(eval $(call _set,LIBGME))
|
||||||
|
|
||||||
|
lib:=../libs/libopenmpt
|
||||||
|
LIBOPENMPT_opts:=-I$(lib)/inc
|
||||||
|
LIBOPENMPT_libs:=-L$(lib)/lib/$(x86)/mingw -lopenmpt
|
||||||
|
$(eval $(call _set,LIBOPENMPT))
|
||||||
|
|
||||||
|
lib:=../libs/SDL2_mixer/$(mingw)
|
||||||
|
|
||||||
|
ifdef SDL
|
||||||
|
mixer_opts:=-I$(lib)/include/SDL2
|
||||||
|
mixer_libs:=-L$(lib)/lib
|
||||||
|
|
||||||
|
lib:=../libs/SDL2/$(mingw)
|
||||||
|
SDL_opts:=-I$(lib)/include/SDL2\
|
||||||
|
$(mixer_opts) -Dmain=SDL_main
|
||||||
|
SDL_libs:=-L$(lib)/lib $(mixer_libs)\
|
||||||
|
-lmingw32 -lSDL2main -lSDL2 -mwindows
|
||||||
|
$(eval $(call _set,SDL))
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef MINGW64
|
||||||
|
lib:=../libs/libbacktrace
|
||||||
|
LIBBACKTRACE_opts:=-I$(lib)/include
|
||||||
|
LIBBACKTRACE_libs:=-L$(lib)/lib/x86_64 -lbacktrace
|
||||||
|
$(eval $(call _set,LIBBACKTRACE))
|
||||||
|
else
|
||||||
|
lib:=../libs/drmingw
|
||||||
|
opts+=-I$(lib)/include
|
||||||
|
libs+=-L$(lib)/lib/win32 -lmgwhelp -lexchndl
|
||||||
|
endif
|
||||||
|
|
||||||
|
lib:=../libs/zlib
|
||||||
|
ZLIB_opts:=-I$(lib)
|
||||||
|
ZLIB_libs:=-L$(lib)/win32 -l:libz$(32).a
|
||||||
|
$(eval $(call _set,ZLIB))
|
||||||
|
|
||||||
|
ifndef PNG_CONFIG
|
||||||
|
lib:=../libs/libpng-src
|
||||||
|
PNG_opts:=-I$(lib)
|
||||||
|
PNG_libs:=-L$(lib)/projects -lpng$(32)
|
||||||
|
$(eval $(call _set,PNG))
|
||||||
|
endif
|
||||||
|
|
||||||
|
lib:=../libs/curl
|
||||||
|
CURL_opts:=-I$(lib)/include
|
||||||
|
CURL_libs:=-L$(lib)/lib$(32) -lcurl
|
||||||
|
$(eval $(call _set,CURL))
|
||||||
|
|
||||||
|
ifndef MINGW64 # miniupnc is broken with MINGW64
|
||||||
|
lib:=../libs/miniupnpc
|
||||||
|
MINIUPNPC_opts:=-I$(lib)/include -DMINIUPNP_STATICLIB
|
||||||
|
MINIUPNPC_libs:=-L$(lib)/mingw$(32) -lminiupnpc -lws2_32 -liphlpapi
|
||||||
|
$(eval $(call _set,MINIUPNPC))
|
||||||
|
endif
|
||||||
|
|
||||||
|
lib:=../libs/discord-rpc/win$(32)-dynamic
|
||||||
|
DISCORDRPC_opts+=-I$(lib)/include
|
||||||
|
DISCORDRPC_libs+=-L$(lib)/lib -ldiscord-rpc
|
||||||
|
$(eval $(call _set,DISCORDRPC))
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
am_map.c
|
||||||
|
b_bot.c
|
||||||
|
command.c
|
||||||
|
console.c
|
||||||
|
d_clisrv.c
|
||||||
|
d_main.c
|
||||||
|
d_net.c
|
||||||
|
d_netcmd.c
|
||||||
|
d_netfil.c
|
||||||
|
d_protocol.c
|
||||||
|
dehacked.c
|
||||||
|
f_finale.c
|
||||||
|
f_wipe.c
|
||||||
|
filesrch.c
|
||||||
|
g_game.c
|
||||||
|
g_input.c
|
||||||
|
hu_stuff.c
|
||||||
|
i_tcp.c
|
||||||
|
i_time.c
|
||||||
|
info.c
|
||||||
|
lzf.c
|
||||||
|
m_aatree.c
|
||||||
|
m_anigif.c
|
||||||
|
m_argv.c
|
||||||
|
m_bbox.c
|
||||||
|
m_cheat.c
|
||||||
|
m_cond.c
|
||||||
|
m_fixed.c
|
||||||
|
m_menu.c
|
||||||
|
m_textinput.c
|
||||||
|
m_misc.c
|
||||||
|
m_perfstats.c
|
||||||
|
m_queue.c
|
||||||
|
m_random.c
|
||||||
|
mserv.c
|
||||||
|
http-mserv.c
|
||||||
|
qs22j.c
|
||||||
|
s_sound.c
|
||||||
|
screen.c
|
||||||
|
sounds.c
|
||||||
|
st_stuff.c
|
||||||
|
string.c
|
||||||
|
tables.c
|
||||||
|
v_video.c
|
||||||
|
w_wad.c
|
||||||
|
y_inter.c
|
||||||
|
z_zone.c
|
||||||
|
r_bsp.c
|
||||||
|
r_data.c
|
||||||
|
r_draw.c
|
||||||
|
r_fps.c
|
||||||
|
r_main.c
|
||||||
|
r_patch.c
|
||||||
|
r_patchrotation.c
|
||||||
|
r_plane.c
|
||||||
|
r_segs.c
|
||||||
|
r_sky.c
|
||||||
|
r_splats.c
|
||||||
|
r_things.c
|
||||||
|
r_portal.c
|
||||||
|
p_ceilng.c
|
||||||
|
p_enemy.c
|
||||||
|
p_floor.c
|
||||||
|
p_inter.c
|
||||||
|
p_lights.c
|
||||||
|
p_map.c
|
||||||
|
p_maputl.c
|
||||||
|
p_mobj.c
|
||||||
|
p_polyobj.c
|
||||||
|
p_saveg.c
|
||||||
|
p_setup.c
|
||||||
|
p_sight.c
|
||||||
|
p_slopes.c
|
||||||
|
p_spec.c
|
||||||
|
p_telept.c
|
||||||
|
p_tick.c
|
||||||
|
p_user.c
|
||||||
|
k_director.c
|
||||||
|
k_kart.c
|
||||||
|
k_stats.c
|
||||||
|
lua_baselib.c
|
||||||
|
lua_blockmaplib.c
|
||||||
|
lua_consolelib.c
|
||||||
|
lua_hooklib.c
|
||||||
|
lua_hudlib.c
|
||||||
|
lua_hudlib_drawlist.c
|
||||||
|
lua_infolib.c
|
||||||
|
lua_maplib.c
|
||||||
|
lua_mathlib.c
|
||||||
|
lua_mobjlib.c
|
||||||
|
lua_playerlib.c
|
||||||
|
lua_script.c
|
||||||
|
lua_skinlib.c
|
||||||
|
lua_thinkerlib.c
|
||||||
|
lua_udatalib.c
|
||||||
|
lua_glib.c
|
||||||
+147
-68
@@ -28,14 +28,15 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For use if I do walls with outsides/insides
|
// For use if I do walls with outsides/insides
|
||||||
static const UINT8 REDS = (2*16);
|
static const UINT8 REDS = (8*16);
|
||||||
static const UINT8 REDRANGE = 16;
|
static const UINT8 REDRANGE = 16;
|
||||||
static const UINT8 GRAYS = (1*16);
|
static const UINT8 GRAYS = (1*16);
|
||||||
static const UINT8 GRAYSRANGE = 16;
|
static const UINT8 GRAYSRANGE = 16;
|
||||||
static const UINT8 BROWNS = (15*16);
|
static const UINT8 BROWNS = (3*16);
|
||||||
static const UINT8 YELLOWS = (5*16)+8;
|
static const UINT8 YELLOWS = (7*16);
|
||||||
static const UINT8 GREENS = (6*16);
|
static const UINT8 GREENS = (10*16);
|
||||||
static const UINT8 BLUES = (9*16);
|
//static const UINT8 CYANS = (13*16);
|
||||||
|
static const UINT8 BLUES = (14*16);
|
||||||
static const UINT8 DBLACK = 31;
|
static const UINT8 DBLACK = 31;
|
||||||
static const UINT8 DWHITE = 0;
|
static const UINT8 DWHITE = 0;
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ static const UINT8 DWHITE = 0;
|
|||||||
#define THOKWALLCOLORS REDS
|
#define THOKWALLCOLORS REDS
|
||||||
#define THOKWALLRANGE REDRANGE
|
#define THOKWALLRANGE REDRANGE
|
||||||
#define TSWALLCOLORS DWHITE
|
#define TSWALLCOLORS DWHITE
|
||||||
#define TSFINISHLINE GRAYS
|
#define TSFINISHLINE (GREENS + 2)
|
||||||
#define TSFOFINFO (BLUES + 4)
|
#define TSFOFINFO (BLUES + 4)
|
||||||
#define FDWALLCOLORS BROWNS
|
#define FDWALLCOLORS BROWNS
|
||||||
#define CDWALLCOLORS YELLOWS
|
#define CDWALLCOLORS YELLOWS
|
||||||
@@ -264,9 +265,6 @@ static void AM_findMinMaxBoundaries(void)
|
|||||||
max_w = minimapinfo.map_w << MAPBITS;
|
max_w = minimapinfo.map_w << MAPBITS;
|
||||||
max_h = minimapinfo.map_h << MAPBITS;
|
max_h = minimapinfo.map_h << MAPBITS;
|
||||||
|
|
||||||
max_w = (max_x >>= FRACTOMAPBITS) - (min_x >>= FRACTOMAPBITS);
|
|
||||||
max_h = (max_y >>= FRACTOMAPBITS) - (min_y >>= FRACTOMAPBITS);
|
|
||||||
|
|
||||||
a = FixedDiv(f_w<<FRACBITS, max_w);
|
a = FixedDiv(f_w<<FRACBITS, max_w);
|
||||||
b = FixedDiv(f_h<<FRACBITS, max_h);
|
b = FixedDiv(f_h<<FRACBITS, max_h);
|
||||||
|
|
||||||
@@ -424,6 +422,7 @@ static void AM_setWindowPanning(void)
|
|||||||
m_paninc.y = -FTOM(F_PANINC);
|
m_paninc.y = -FTOM(F_PANINC);
|
||||||
else
|
else
|
||||||
m_paninc.y = 0;
|
m_paninc.y = 0;
|
||||||
|
|
||||||
// left and right
|
// left and right
|
||||||
if (m_keydown[0]) // pan right
|
if (m_keydown[0]) // pan right
|
||||||
m_paninc.x = FTOM(F_PANINC);
|
m_paninc.x = FTOM(F_PANINC);
|
||||||
@@ -899,38 +898,74 @@ static void AM_drawGrid(INT32 color)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static INT32 GetDamage(INT32 special)
|
||||||
|
{
|
||||||
|
switch (special)
|
||||||
|
{
|
||||||
|
case 1: // Damage (Generic)
|
||||||
|
return 1;
|
||||||
|
case 6: // Death Pit (Camera Tilt)
|
||||||
|
return 6;
|
||||||
|
case 7: // Death Pit (No Camera Tilt)
|
||||||
|
return 7;
|
||||||
|
case 8: // Instant Kill
|
||||||
|
return 8;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static INT32 GetOffroad(INT32 special)
|
||||||
|
{
|
||||||
|
switch (special)
|
||||||
|
{
|
||||||
|
case 2: // Offroad (Weak)
|
||||||
|
return 2;
|
||||||
|
case 3: // Offroad
|
||||||
|
return 3;
|
||||||
|
case 4: // Offroad (Strong)
|
||||||
|
return 4;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#define SLOPEPARAMS(slope, end1, end2, normalheight) \
|
#define SLOPEPARAMS(slope, end1, end2, normalheight) \
|
||||||
if (slope) { \
|
end1 = (P_GetZAt(slope, lines[i].v1->x, lines[i].v1->y, ((normalheight + FRACUNIT/2) >> FRACBITS)) + FRACUNIT/2) >> FRACBITS; \
|
||||||
end1 = (P_GetZAt(slope, lines[i].v1->x, lines[i].v1->y) + FRACUNIT/2) >> FRACBITS; \
|
end2 = (P_GetZAt(slope, lines[i].v2->x, lines[i].v2->y, ((normalheight + FRACUNIT/2) >> FRACBITS)) + FRACUNIT/2) >> FRACBITS;
|
||||||
end2 = (P_GetZAt(slope, lines[i].v2->x, lines[i].v2->y) + FRACUNIT/2) >> FRACBITS; \
|
|
||||||
} else \
|
|
||||||
end1 = end2 = (normalheight + FRACUNIT/2) >> FRACBITS;
|
|
||||||
|
|
||||||
static ffloor_t *AM_CompareFOFs(size_t i, ffloor_t *rover, ffloor_t *secondarystore)
|
static ffloor_t *AM_CompareFOFs(size_t i, ffloor_t *rover, ffloor_t *secondarystore)
|
||||||
{
|
{
|
||||||
ffloor_t *secondaryrover = NULL;
|
ffloor_t *secondaryrover = NULL;
|
||||||
|
|
||||||
for (; rover; rover = rover->next)
|
for (; rover; rover = rover->next)
|
||||||
{
|
{
|
||||||
fixed_t rovt1, rovt2;
|
fixed_t rovt1, rovt2;
|
||||||
fixed_t rovb1, rovb2;
|
fixed_t rovb1, rovb2;
|
||||||
|
|
||||||
if (!(rover->flags & FF_EXISTS))
|
if (!(rover->flags & FF_EXISTS))
|
||||||
continue;
|
continue;
|
||||||
if (!(rover->flags & FF_BLOCKPLAYER))
|
if (!(rover->flags & FF_BLOCKPLAYER))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SLOPEPARAMS(*rover->t_slope, rovt1, rovt2, *rover->topheight)
|
SLOPEPARAMS(*rover->t_slope, rovt1, rovt2, *rover->topheight)
|
||||||
SLOPEPARAMS(*rover->b_slope, rovb1, rovb2, *rover->bottomheight)
|
SLOPEPARAMS(*rover->b_slope, rovb1, rovb2, *rover->bottomheight)
|
||||||
|
|
||||||
for (secondaryrover = secondarystore; secondaryrover; secondaryrover = secondaryrover->next)
|
for (secondaryrover = secondarystore; secondaryrover; secondaryrover = secondaryrover->next)
|
||||||
{
|
{
|
||||||
fixed_t sect1, sect2;
|
fixed_t sect1, sect2;
|
||||||
fixed_t secb1, secb2;
|
fixed_t secb1, secb2;
|
||||||
|
|
||||||
if (!(secondaryrover->flags & FF_EXISTS))
|
if (!(secondaryrover->flags & FF_EXISTS))
|
||||||
continue;
|
continue;
|
||||||
if (!(secondaryrover->flags & FF_BLOCKPLAYER))
|
if (!(secondaryrover->flags & FF_BLOCKPLAYER))
|
||||||
continue;
|
continue;
|
||||||
if (secondaryrover->secnum == rover->secnum)
|
if (secondaryrover->secnum == rover->secnum)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
SLOPEPARAMS(*secondaryrover->t_slope, sect1, sect2, *secondaryrover->topheight)
|
SLOPEPARAMS(*secondaryrover->t_slope, sect1, sect2, *secondaryrover->topheight)
|
||||||
SLOPEPARAMS(*secondaryrover->b_slope, secb1, secb2, *secondaryrover->bottomheight)
|
SLOPEPARAMS(*secondaryrover->b_slope, secb1, secb2, *secondaryrover->bottomheight)
|
||||||
|
|
||||||
if (rovt1 != sect1)
|
if (rovt1 != sect1)
|
||||||
continue;
|
continue;
|
||||||
if (rovt2 != sect2)
|
if (rovt2 != sect2)
|
||||||
@@ -939,8 +974,27 @@ static ffloor_t *AM_CompareFOFs(size_t i, ffloor_t *rover, ffloor_t *secondaryst
|
|||||||
continue;
|
continue;
|
||||||
if (rovb2 != secb2)
|
if (rovb2 != secb2)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// this is fucking horrible
|
||||||
|
INT32 damage1, damage2;
|
||||||
|
INT32 offroad1, offroad2;
|
||||||
|
INT32 special1, special2;
|
||||||
|
special1 = GETSECSPECIAL(sectors[rover->secnum].special, 1);
|
||||||
|
special2 = GETSECSPECIAL(sectors[secondaryrover->secnum].special, 1);
|
||||||
|
|
||||||
|
damage1 = GetDamage(special1);
|
||||||
|
damage2 = GetDamage(special2);
|
||||||
|
offroad1 = GetOffroad(special1);
|
||||||
|
offroad2 = GetOffroad(special2);
|
||||||
|
|
||||||
|
if (damage1 != damage2
|
||||||
|
//|| sectors[rover->secnum].friction != sectors[secondaryrover->secnum].friction
|
||||||
|
|| offroad1 != offroad2)
|
||||||
|
continue;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (secondaryrover == NULL)
|
if (secondaryrover == NULL)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -983,8 +1037,10 @@ static void AM_drawWalls(UINT8 pass)
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
SLOPEPARAMS(lines[i].backsector->f_slope, backf1, backf2, lines[i].backsector->floorheight)
|
SLOPEPARAMS(lines[i].backsector->f_slope, backf1, backf2, lines[i].backsector->floorheight)
|
||||||
SLOPEPARAMS(lines[i].backsector->c_slope, backc1, backc2, lines[i].backsector->ceilingheight)
|
SLOPEPARAMS(lines[i].backsector->c_slope, backc1, backc2, lines[i].backsector->ceilingheight)
|
||||||
|
|
||||||
if ((backf1 == backc1 && backf2 == backc2) // Back is thok barrier
|
if ((backf1 == backc1 && backf2 == backc2) // Back is thok barrier
|
||||||
|| (frontf1 == frontc1 && frontf2 == frontc2)) // Front is thok barrier
|
|| (frontf1 == frontc1 && frontf2 == frontc2)) // Front is thok barrier
|
||||||
{
|
{
|
||||||
@@ -1003,29 +1059,28 @@ static void AM_drawWalls(UINT8 pass)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//dont think kart even supports those idk?
|
if (lines[i].flags & ML_IMPASSIBLE) // (ML_IMPASSABLE|ML_BLOCKPLAYERS)
|
||||||
/*if (lines[i].flags & (ML_IMPASSABLE|ML_BLOCKPLAYERS))
|
|
||||||
{
|
{
|
||||||
if (pass & PASS_SOLID)
|
if (pass & PASS_SOLID)
|
||||||
AM_drawMline(&l, TSWALLCOLORS); // Completely solid course boundary
|
AM_drawMline(&l, TSWALLCOLORS); // Completely solid course boundary
|
||||||
}
|
}
|
||||||
else if ((lines[i].flags & ML_MIDSOLID)
|
else if ((lines[i].flags & ML_EFFECT4) // ML_MIDSOLID
|
||||||
&& sides[lines->sidenum[0]].midtexture)
|
&& sides[lines->sidenum[0]].midtexture)
|
||||||
{
|
{
|
||||||
if (pass & PASS_SOLID)
|
if (pass & PASS_SOLID)
|
||||||
AM_drawMline(&l, TSWALLCOLORS); // solid midtexture, likely a course boundary
|
AM_drawMline(&l, TSWALLCOLORS); // solid midtexture, likely a course boundary
|
||||||
}*/
|
}
|
||||||
if ((backf1 != frontf1 && abs(backf1 - frontf1) > maxstep)
|
if ((backf1 != frontf1 && abs(backf1 - frontf1) > maxstep)
|
||||||
|| (backf2 != frontf2 && abs(backf2 - frontf2) > maxstep))
|
|| (backf2 != frontf2 && abs(backf2 - frontf2) > maxstep))
|
||||||
{
|
{
|
||||||
if (pass & PASS_SOLID)
|
if (pass & PASS_SOLID)
|
||||||
AM_drawMline(&l, TSWALLCOLORS); // floor-wall, likely a course boundary
|
AM_drawMline(&l, TSWALLCOLORS); // floor-wall, likely a course boundary
|
||||||
}
|
}
|
||||||
/*else if (lines[i].special == 2001) // guh its a sector effect in kart idk how to make it work tbh lol
|
else if (GETSECSPECIAL(lines[i].frontsector->special, 4) == 10 || GETSECSPECIAL(lines[i].backsector->special, 4) == 10)
|
||||||
{
|
{
|
||||||
if (pass & PASS_SOLID)
|
if (pass & PASS_SOLID)
|
||||||
AM_drawMline(&l, TSFINISHLINE); // finish line
|
AM_drawMline(&l, TSFINISHLINE); // finish line
|
||||||
}*/
|
}
|
||||||
else if (backf1 != frontf1 || backf2 != frontf2)
|
else if (backf1 != frontf1 || backf2 != frontf2)
|
||||||
{
|
{
|
||||||
if (pass & PASS_INTANGIBLE)
|
if (pass & PASS_INTANGIBLE)
|
||||||
@@ -1047,54 +1102,52 @@ static void AM_drawWalls(UINT8 pass)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
{
|
ffloor_t *rover = NULL;
|
||||||
ffloor_t *rover = NULL;
|
|
||||||
|
|
||||||
if (lines[i].frontsector->ffloors || lines[i].backsector->ffloors)
|
if (lines[i].frontsector->ffloors || lines[i].backsector->ffloors)
|
||||||
|
{
|
||||||
|
if (lines[i].backsector->ffloors == NULL)
|
||||||
{
|
{
|
||||||
if (lines[i].backsector->ffloors == NULL)
|
// Check frontside for one solid
|
||||||
|
for (rover = lines[i].frontsector->ffloors; rover; rover = rover->next)
|
||||||
{
|
{
|
||||||
// Check frontside for one solid
|
if (!(rover->flags & FF_EXISTS))
|
||||||
for (rover = lines[i].frontsector->ffloors; rover; rover = rover->next)
|
continue;
|
||||||
{
|
if (!(rover->flags & FF_BLOCKPLAYER))
|
||||||
if (!(rover->flags & FF_EXISTS))
|
continue;
|
||||||
continue;
|
break;
|
||||||
if (!(rover->flags & FF_BLOCKPLAYER))
|
|
||||||
continue;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (lines[i].frontsector->ffloors == NULL)
|
|
||||||
{
|
|
||||||
// Check backside for one solid
|
|
||||||
for (rover = lines[i].backsector->ffloors; rover; rover = rover->next)
|
|
||||||
{
|
|
||||||
if (!(rover->flags & FF_EXISTS))
|
|
||||||
continue;
|
|
||||||
if (!(rover->flags & FF_BLOCKPLAYER))
|
|
||||||
continue;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Check to see if any secnums exist in one but not the other.
|
|
||||||
rover = AM_CompareFOFs(i, lines[i].frontsector->ffloors, lines[i].backsector->ffloors);
|
|
||||||
if (rover == NULL)
|
|
||||||
rover = AM_CompareFOFs(i, lines[i].backsector->ffloors, lines[i].frontsector->ffloors);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rover != NULL)
|
else if (lines[i].frontsector->ffloors == NULL)
|
||||||
{
|
{
|
||||||
if (pass & PASS_FOF)
|
// Check backside for one solid
|
||||||
AM_drawMline(&l, TSFOFINFO); // a FOF is here but we don't know how to distinguish them yet
|
for (rover = lines[i].backsector->ffloors; rover; rover = rover->next)
|
||||||
|
{
|
||||||
|
if (!(rover->flags & FF_EXISTS))
|
||||||
|
continue;
|
||||||
|
if (!(rover->flags & FF_BLOCKPLAYER))
|
||||||
|
continue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!am_minigen)
|
else
|
||||||
{
|
{
|
||||||
if (pass & PASS_INTANGIBLE)
|
// Check to see if any secnums exist in one but not the other.
|
||||||
AM_drawMline(&l, GRIDCOLORS); // likely low-relevance line
|
rover = AM_CompareFOFs(i, lines[i].frontsector->ffloors, lines[i].backsector->ffloors);
|
||||||
|
if (rover == NULL)
|
||||||
|
rover = AM_CompareFOFs(i, lines[i].backsector->ffloors, lines[i].frontsector->ffloors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (rover != NULL)
|
||||||
|
{
|
||||||
|
if (pass & PASS_FOF)
|
||||||
|
AM_drawMline(&l, TSFOFINFO); // a FOF is here but we don't know how to distinguish them yet
|
||||||
|
}
|
||||||
|
else if (!am_minigen)
|
||||||
|
{
|
||||||
|
if (pass & PASS_INTANGIBLE)
|
||||||
|
AM_drawMline(&l, GRIDCOLORS); // likely low-relevance line
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1172,18 +1225,11 @@ static inline void AM_drawPlayers(void)
|
|||||||
player_t *p;
|
player_t *p;
|
||||||
INT32 color = GREENS;
|
INT32 color = GREENS;
|
||||||
|
|
||||||
if (!multiplayer)
|
|
||||||
{
|
|
||||||
AM_drawLineCharacter(player_arrow, NUMPLYRLINES, 16<<FRACBITS, plr->mo->angle, DWHITE, plr->mo->x, plr->mo->y);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// multiplayer (how??)
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
if (!playeringame[i] || players[i].spectator)
|
if (!playeringame[i] || players[i].spectator)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!players[i].mo)
|
if (!players[i].mo)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -1205,7 +1251,36 @@ static inline void AM_drawThings(UINT8 colors)
|
|||||||
t = sectors[i].thinglist;
|
t = sectors[i].thinglist;
|
||||||
while (t)
|
while (t)
|
||||||
{
|
{
|
||||||
AM_drawLineCharacter(thintriangle_guy, NUMTHINTRIANGLEGUYLINES, 16<<FRACBITS, t->angle, colors, t->x, t->y);
|
if (!t->player)
|
||||||
|
AM_drawLineCharacter(thintriangle_guy, NUMTHINTRIANGLEGUYLINES, 16<<FRACBITS, t->angle, colors, t->x, t->y);
|
||||||
|
t = t->snext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void AM_drawSpecialThingsOnly(UINT8 colors)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < numsectors; i++)
|
||||||
|
{
|
||||||
|
mobj_t *t = NULL;
|
||||||
|
|
||||||
|
// this is fucking horrible
|
||||||
|
const INT32 special = GETSECSPECIAL(sectors[i].special, 1);
|
||||||
|
|
||||||
|
if (GetDamage(special) != 0
|
||||||
|
//|| sectors[i].friction < ORIG_FRICTION
|
||||||
|
|| GetOffroad(special) != 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
t = sectors[i].thinglist;
|
||||||
|
while (t)
|
||||||
|
{
|
||||||
|
if (t->type == MT_RANDOMITEM
|
||||||
|
|| t->type == MT_STARPOST
|
||||||
|
|| (t->flags & MF_SPRING))
|
||||||
|
AM_drawLineCharacter(thintriangle_guy, NUMTHINTRIANGLEGUYLINES, 16<<FRACBITS, t->angle, colors, t->x, t->y);
|
||||||
t = t->snext;
|
t = t->snext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1220,16 +1295,19 @@ static inline void AM_drawCrosshair(UINT8 color)
|
|||||||
const fixed_t scale = 4<<FRACBITS;
|
const fixed_t scale = 4<<FRACBITS;
|
||||||
size_t i;
|
size_t i;
|
||||||
fline_t fl;
|
fline_t fl;
|
||||||
|
|
||||||
for (i = 0; i < NUMCROSSMARKLINES; i++)
|
for (i = 0; i < NUMCROSSMARKLINES; i++)
|
||||||
{
|
{
|
||||||
fl.a.x = FixedMul(cross_mark[i].a.x, scale) >> FRACBITS;
|
fl.a.x = FixedMul(cross_mark[i].a.x, scale) >> FRACBITS;
|
||||||
fl.a.y = FixedMul(cross_mark[i].a.y, scale) >> FRACBITS;
|
fl.a.y = FixedMul(cross_mark[i].a.y, scale) >> FRACBITS;
|
||||||
fl.b.x = FixedMul(cross_mark[i].b.x, scale) >> FRACBITS;
|
fl.b.x = FixedMul(cross_mark[i].b.x, scale) >> FRACBITS;
|
||||||
fl.b.y = FixedMul(cross_mark[i].b.y, scale) >> FRACBITS;
|
fl.b.y = FixedMul(cross_mark[i].b.y, scale) >> FRACBITS;
|
||||||
|
|
||||||
fl.a.x += f_x + (f_w / 2);
|
fl.a.x += f_x + (f_w / 2);
|
||||||
fl.a.y += f_y + (f_h / 2);
|
fl.a.y += f_y + (f_h / 2);
|
||||||
fl.b.x += f_x + (f_w / 2);
|
fl.b.x += f_x + (f_w / 2);
|
||||||
fl.b.y += f_y + (f_h / 2);
|
fl.b.y += f_y + (f_h / 2);
|
||||||
|
|
||||||
AM_drawFline(&fl, color);
|
AM_drawFline(&fl, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1250,8 +1328,8 @@ void AM_Drawer(void)
|
|||||||
AM_clearFB(BACKGROUND);
|
AM_clearFB(BACKGROUND);
|
||||||
if (draw_grid) AM_drawGrid(GRIDCOLORS);
|
if (draw_grid) AM_drawGrid(GRIDCOLORS);
|
||||||
AM_drawWalls(PASS_FOF|PASS_INTANGIBLE|PASS_SOLID);
|
AM_drawWalls(PASS_FOF|PASS_INTANGIBLE|PASS_SOLID);
|
||||||
AM_drawPlayers();
|
|
||||||
AM_drawThings(THINGCOLORS);
|
AM_drawThings(THINGCOLORS);
|
||||||
|
AM_drawPlayers();
|
||||||
|
|
||||||
if (!followplayer) AM_drawCrosshair(XHAIRCOLORS);
|
if (!followplayer) AM_drawCrosshair(XHAIRCOLORS);
|
||||||
}
|
}
|
||||||
@@ -1307,6 +1385,7 @@ minigen_t *AM_MinimapGenerate(INT32 mul)
|
|||||||
|
|
||||||
//AM_clearFB(BACKGROUND);
|
//AM_clearFB(BACKGROUND);
|
||||||
memset(am_buf, 0xff, (f_w*f_h));
|
memset(am_buf, 0xff, (f_w*f_h));
|
||||||
|
AM_drawSpecialThingsOnly(BACKGROUND);
|
||||||
AM_drawWalls(PASS_FOF);
|
AM_drawWalls(PASS_FOF);
|
||||||
AM_drawWalls(PASS_INTANGIBLE);
|
AM_drawWalls(PASS_INTANGIBLE);
|
||||||
AM_drawWalls(PASS_SOLID);
|
AM_drawWalls(PASS_SOLID);
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
ifdef UNIXCOMMON
|
|
||||||
LUA_CFLAGS+=-DLUA_USE_POSIX
|
|
||||||
endif
|
|
||||||
ifdef LINUX
|
|
||||||
LUA_CFLAGS+=-DLUA_USE_POSIX
|
|
||||||
endif
|
|
||||||
ifdef GCC43
|
|
||||||
ifndef GCC44
|
|
||||||
WFLAGS+=-Wno-logical-op
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
OBJS:=$(OBJS) \
|
|
||||||
$(OBJDIR)/lapi.o \
|
|
||||||
$(OBJDIR)/lbaselib.o \
|
|
||||||
$(OBJDIR)/ldo.o \
|
|
||||||
$(OBJDIR)/ldblib.o \
|
|
||||||
$(OBJDIR)/lfunc.o \
|
|
||||||
$(OBJDIR)/linit.o \
|
|
||||||
$(OBJDIR)/liolib.o \
|
|
||||||
$(OBJDIR)/llex.o \
|
|
||||||
$(OBJDIR)/lmem.o \
|
|
||||||
$(OBJDIR)/lobject.o \
|
|
||||||
$(OBJDIR)/lstate.o \
|
|
||||||
$(OBJDIR)/lstrlib.o \
|
|
||||||
$(OBJDIR)/ltablib.o \
|
|
||||||
$(OBJDIR)/lundump.o \
|
|
||||||
$(OBJDIR)/lzio.o \
|
|
||||||
$(OBJDIR)/lauxlib.o \
|
|
||||||
$(OBJDIR)/lcode.o \
|
|
||||||
$(OBJDIR)/ldebug.o \
|
|
||||||
$(OBJDIR)/ldump.o \
|
|
||||||
$(OBJDIR)/lgc.o \
|
|
||||||
$(OBJDIR)/lopcodes.o \
|
|
||||||
$(OBJDIR)/lparser.o \
|
|
||||||
$(OBJDIR)/lstring.o \
|
|
||||||
$(OBJDIR)/ltable.o \
|
|
||||||
$(OBJDIR)/ltm.o \
|
|
||||||
$(OBJDIR)/lvm.o \
|
|
||||||
$(OBJDIR)/lua_script.o \
|
|
||||||
$(OBJDIR)/lua_baselib.o \
|
|
||||||
$(OBJDIR)/lua_blockmaplib.o \
|
|
||||||
$(OBJDIR)/lua_mathlib.o \
|
|
||||||
$(OBJDIR)/lua_hooklib.o \
|
|
||||||
$(OBJDIR)/lua_consolelib.o \
|
|
||||||
$(OBJDIR)/lua_infolib.o \
|
|
||||||
$(OBJDIR)/lua_mobjlib.o \
|
|
||||||
$(OBJDIR)/lua_playerlib.o \
|
|
||||||
$(OBJDIR)/lua_skinlib.o \
|
|
||||||
$(OBJDIR)/lua_thinkerlib.o \
|
|
||||||
$(OBJDIR)/lua_maplib.o \
|
|
||||||
$(OBJDIR)/lua_hudlib.o \
|
|
||||||
$(OBJDIR)/lua_hudlib_drawlist.o \
|
|
||||||
$(OBJDIR)/lua_udatalib.o \
|
|
||||||
$(OBJDIR)/lua_glib.o
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
lapi.c
|
||||||
|
lauxlib.c
|
||||||
|
lbaselib.c
|
||||||
|
ldblib.c
|
||||||
|
lcode.c
|
||||||
|
ldebug.c
|
||||||
|
ldo.c
|
||||||
|
ldump.c
|
||||||
|
lfunc.c
|
||||||
|
lgc.c
|
||||||
|
linit.c
|
||||||
|
liolib.c
|
||||||
|
llex.c
|
||||||
|
lmem.c
|
||||||
|
lobject.c
|
||||||
|
lopcodes.c
|
||||||
|
lparser.c
|
||||||
|
lstate.c
|
||||||
|
lstring.c
|
||||||
|
lstrlib.c
|
||||||
|
ltable.c
|
||||||
|
ltablib.c
|
||||||
|
ltm.c
|
||||||
|
lundump.c
|
||||||
|
lvm.c
|
||||||
|
lzio.c
|
||||||
+2
-15
@@ -1493,11 +1493,7 @@ static void Got_NetVar(UINT8 **p, INT32 playernum)
|
|||||||
|
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1988,7 +1984,7 @@ static boolean CV_FilterJoyAxisVars(consvar_t *v, const char *valstr)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Block the Xbox DInput default axes and reset to the current defaults
|
// Block the Xbox DInput default axes and reset to the current defaults
|
||||||
static boolean CV_FilterJoyAxisVars2(consvar_t *v, const char *valstr)
|
static boolean CV_FilterJoyAxisVars2(consvar_t *v, const char *valstr)
|
||||||
{
|
{
|
||||||
if (!stricmp(v->name, "joyaxis_turn") && !stricmp(valstr, "X-Axis"))
|
if (!stricmp(v->name, "joyaxis_turn") && !stricmp(valstr, "X-Axis"))
|
||||||
@@ -2045,15 +2041,6 @@ static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr)
|
|||||||
|
|
||||||
if (GETMAJOREXECVERSION(cv_execversion.value) < 2) // 2 = 1.0.2
|
if (GETMAJOREXECVERSION(cv_execversion.value) < 2) // 2 = 1.0.2
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
// We don't have changed saved cvars yet
|
|
||||||
if (!stricmp(v->name, "alwaysmlook")
|
|
||||||
|| !stricmp(v->name, "alwaysmlook2")
|
|
||||||
|| !stricmp(v->name, "mousemove")
|
|
||||||
|| !stricmp(v->name, "mousemove2"))
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// axis defaults were changed to be friendly to 360 controllers
|
// axis defaults were changed to be friendly to 360 controllers
|
||||||
// if ALL axis settings are defaults, then change them to new values
|
// if ALL axis settings are defaults, then change them to new values
|
||||||
if (!CV_FilterJoyAxisVars(v, valstr))
|
if (!CV_FilterJoyAxisVars(v, valstr))
|
||||||
|
|||||||
+36
-32
@@ -275,29 +275,28 @@ void CON_SetupBackColormap(void)
|
|||||||
|
|
||||||
switch (cons_backcolor.value)
|
switch (cons_backcolor.value)
|
||||||
{
|
{
|
||||||
case 0: palindex = 15; break; // White
|
case 0: palindex = 15; break; // White
|
||||||
case 1: palindex = 31; break; // Gray
|
case 1: palindex = 31; break; // Gray
|
||||||
case 2: palindex = 47; break; // Sepia
|
case 2: palindex = 47; break; // Sepia
|
||||||
case 3: palindex = 63; break; // Brown
|
case 3: palindex = 63; break; // Brown
|
||||||
case 4: palindex = 150; shift = 7; break; // Pink
|
case 4: palindex = 150; shift = 7; break; // Pink
|
||||||
case 5: palindex = 127; shift = 7; break; // Raspberry
|
case 5: palindex = 127; shift = 7; break; // Raspberry
|
||||||
case 6: palindex = 143; break; // Red
|
case 6: palindex = 143; break; // Red
|
||||||
case 7: palindex = 86; shift = 7; break; // Creamsicle
|
case 7: palindex = 86; shift = 7; break; // Creamsicle
|
||||||
case 8: palindex = 95; break; // Orange
|
case 8: palindex = 95; break; // Orange
|
||||||
case 9: palindex = 119; shift = 7; break; // Gold
|
case 9: palindex = 119; shift = 7; break; // Gold
|
||||||
case 10: palindex = 111; break; // Yellow
|
case 10: palindex = 111; break; // Yellow
|
||||||
case 11: palindex = 191; shift = 7; break; // Emerald
|
case 11: palindex = 191; shift = 7; break; // Emerald
|
||||||
case 12: palindex = 175; break; // Green
|
case 12: palindex = 175; break; // Green
|
||||||
case 13: palindex = 219; break; // Cyan
|
case 13: palindex = 219; break; // Cyan
|
||||||
case 14: palindex = 207; shift = 7; break; // Steel
|
case 14: palindex = 207; shift = 7; break; // Steel
|
||||||
case 15: palindex = 230; shift = 7; break; // Periwinkle
|
case 15: palindex = 230; shift = 7; break; // Periwinkle
|
||||||
case 16: palindex = 239; break; // Blue
|
case 16: palindex = 239; break; // Blue
|
||||||
case 17: palindex = 199; shift = 7; break; // Purple
|
case 17: palindex = 199; shift = 7; break; // Purple
|
||||||
case 18: palindex = 255; shift = 7; break; // Lavender
|
case 18: palindex = 255; shift = 7; break; // Lavender
|
||||||
// Default green
|
// Default green
|
||||||
default: palindex = 175; break;
|
default: palindex = 175; break;
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// setup background colormap
|
// setup background colormap
|
||||||
for (i = 0, j = 0; i < 768; i += 3, j++)
|
for (i = 0, j = 0; i < 768; i += 3, j++)
|
||||||
@@ -621,11 +620,11 @@ static void CON_MoveConsole(void)
|
|||||||
con_curlines -= FixedInt(fracmovement);
|
con_curlines -= FixedInt(fracmovement);
|
||||||
if (con_curlines < con_destlines)
|
if (con_curlines < con_destlines)
|
||||||
con_curlines = con_destlines;
|
con_curlines = con_destlines;
|
||||||
|
|
||||||
if (con_destlines == 0) // If the console is being closed, not just moved up...
|
if (con_destlines == 0) // If the console is being closed, not just moved up...
|
||||||
con_tick = 0; // ...don't show the blinking cursor
|
con_tick = 0; // ...don't show the blinking cursor
|
||||||
}
|
}
|
||||||
|
|
||||||
fracmovement %= FRACUNIT; // Reset fracmovement's integer value, but keep the fraction
|
fracmovement %= FRACUNIT; // Reset fracmovement's integer value, but keep the fraction
|
||||||
|
|
||||||
Unlock_state();
|
Unlock_state();
|
||||||
@@ -635,7 +634,7 @@ INT32 CON_ShiftChar(INT32 ch)
|
|||||||
{
|
{
|
||||||
if (I_UseNativeKeyboard())
|
if (I_UseNativeKeyboard())
|
||||||
return ch;
|
return ch;
|
||||||
|
|
||||||
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
|
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
|
||||||
{
|
{
|
||||||
if (cv_keyboardlayout.value == 3)
|
if (cv_keyboardlayout.value == 3)
|
||||||
@@ -827,7 +826,7 @@ boolean CON_Responder(event_t *ev)
|
|||||||
// let go keyup events, don't eat them
|
// let go keyup events, don't eat them
|
||||||
if (ev->type != ev_keydown && ev->type != ev_console)
|
if (ev->type != ev_keydown && ev->type != ev_console)
|
||||||
{
|
{
|
||||||
if (ev->data1 == gamecontrol[gc_console][0] || ev->data1 == gamecontrol[gc_console][1])
|
if (ev->data1 == gamecontrol[0][gc_console][0] || ev->data1 == gamecontrol[0][gc_console][1])
|
||||||
consdown = false;
|
consdown = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -845,7 +844,7 @@ boolean CON_Responder(event_t *ev)
|
|||||||
INT32 i;
|
INT32 i;
|
||||||
for (i = 0; i < num_gamecontrols; i++)
|
for (i = 0; i < num_gamecontrols; i++)
|
||||||
{
|
{
|
||||||
if (gamecontrol[i][0] == ev->data1 || gamecontrol[i][1] == ev->data1)
|
if (gamecontrol[0][i][0] == ev->data1 || gamecontrol[0][i][1] == ev->data1)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -853,7 +852,7 @@ boolean CON_Responder(event_t *ev)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == gamecontrol[gc_console][0] || key == gamecontrol[gc_console][1])
|
if (key == gamecontrol[0][gc_console][0] || key == gamecontrol[0][gc_console][1])
|
||||||
{
|
{
|
||||||
if (consdown) // ignore repeat
|
if (consdown) // ignore repeat
|
||||||
return true;
|
return true;
|
||||||
@@ -1244,7 +1243,7 @@ void CONS_Printf(const char *fmt, ...)
|
|||||||
|
|
||||||
if (con_started)
|
if (con_started)
|
||||||
CON_Print(txt);
|
CON_Print(txt);
|
||||||
|
|
||||||
CON_LogMessage(txt);
|
CON_LogMessage(txt);
|
||||||
|
|
||||||
Lock_state();
|
Lock_state();
|
||||||
@@ -1334,7 +1333,12 @@ void CONS_Error(const char *msg)
|
|||||||
|
|
||||||
// dirty quick hack, but for the good cause
|
// dirty quick hack, but for the good cause
|
||||||
while (I_GetKey() != KEY_ENTER)
|
while (I_GetKey() != KEY_ENTER)
|
||||||
|
{
|
||||||
|
// Sleep so we don't take too much of cpu usage
|
||||||
|
I_Sleep(1.f/TICRATE*1000);
|
||||||
|
|
||||||
I_OsPolling();
|
I_OsPolling();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//======================================================================
|
//======================================================================
|
||||||
@@ -1474,7 +1478,7 @@ static void CON_DrawHudlines(void)
|
|||||||
;//charwidth = 4 * con_scalefactor;
|
;//charwidth = 4 * con_scalefactor;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//charwidth = SHORT(hu_font['A'-HU_FONTSTART]->width) * con_scalefactor;
|
//charwidth = hu_font['A'-HU_FONTSTART]->width * con_scalefactor;
|
||||||
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
|
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1509,7 +1513,7 @@ static void CON_DrawConsole(void)
|
|||||||
// draw console background
|
// draw console background
|
||||||
if (cons_backpic.value || con_forcepic)
|
if (cons_backpic.value || con_forcepic)
|
||||||
{
|
{
|
||||||
patch_t *con_backpic = W_CachePatchName("KARTKREW", PU_CACHE);
|
patch_t *con_backpic = W_CachePatchName("KARTKREW", PU_PATCH_LOWPRIORITY);
|
||||||
|
|
||||||
// Jimita: CON_DrawBackpic just called V_DrawScaledPatch
|
// Jimita: CON_DrawBackpic just called V_DrawScaledPatch
|
||||||
V_DrawFixedPatch(0, 0, FRACUNIT/2, 0, con_backpic, NULL);
|
V_DrawFixedPatch(0, 0, FRACUNIT/2, 0, con_backpic, NULL);
|
||||||
@@ -1577,11 +1581,11 @@ void CON_Drawer(void)
|
|||||||
if (con_recalc)
|
if (con_recalc)
|
||||||
{
|
{
|
||||||
CON_RecalcSize();
|
CON_RecalcSize();
|
||||||
|
|
||||||
if (con_curlines <= 0)
|
if (con_curlines <= 0)
|
||||||
CON_ClearHUD();
|
CON_ClearHUD();
|
||||||
}
|
}
|
||||||
|
|
||||||
// console movement
|
// console movement
|
||||||
if (con_curlines != con_destlines)
|
if (con_curlines != con_destlines)
|
||||||
CON_MoveConsole();
|
CON_MoveConsole();
|
||||||
|
|||||||
+190
-262
File diff suppressed because it is too large.
Load diff
+9
-5
@@ -108,12 +108,11 @@ typedef enum
|
|||||||
|
|
||||||
PT_PING, // Packet sent to tell clients the other client's latency to server.
|
PT_PING, // Packet sent to tell clients the other client's latency to server.
|
||||||
|
|
||||||
#ifdef SATURNSYNCH
|
#ifdef SATURNPAK
|
||||||
PT_WILLRESENDGAMESTATE, // Hey Client, I am about to resend you the gamestate!
|
PT_WILLRESENDGAMESTATE, // Hey Client, I am about to resend you the gamestate!
|
||||||
PT_CANRECEIVEGAMESTATE, // Okay Server, I'm ready to receive it, you can go ahead.
|
PT_CANRECEIVEGAMESTATE, // Okay Server, I'm ready to receive it, you can go ahead.
|
||||||
PT_RECEIVEDGAMESTATE, // Thank you Server, I am ready to play again!
|
PT_RECEIVEDGAMESTATE, // Thank you Server, I am ready to play again!
|
||||||
|
|
||||||
// we will reserve this for now even if unused, so order wont get mangled
|
|
||||||
PT_ISSATURN, // Saturn specific identifier packet
|
PT_ISSATURN, // Saturn specific identifier packet
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -394,6 +393,7 @@ typedef struct
|
|||||||
#define MAXSERVERNAME 32
|
#define MAXSERVERNAME 32
|
||||||
#define MAXFILENEEDED 915
|
#define MAXFILENEEDED 915
|
||||||
#define MAX_MIRROR_LENGTH 256
|
#define MAX_MIRROR_LENGTH 256
|
||||||
|
|
||||||
// This packet is too large
|
// This packet is too large
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -588,7 +588,7 @@ extern tic_t servermaxping;
|
|||||||
extern boolean server_lagless;
|
extern boolean server_lagless;
|
||||||
extern tic_t simulated_lag;
|
extern tic_t simulated_lag;
|
||||||
extern tic_t lowest_lag;
|
extern tic_t lowest_lag;
|
||||||
extern consvar_t cv_mindelay, cv_lagless;
|
extern consvar_t cv_mindelay, cv_gentlemens;
|
||||||
|
|
||||||
extern consvar_t
|
extern consvar_t
|
||||||
#ifdef VANILLAJOINNEXTROUND
|
#ifdef VANILLAJOINNEXTROUND
|
||||||
@@ -599,7 +599,7 @@ extern consvar_t
|
|||||||
cv_allownewsaturnplayer,
|
cv_allownewsaturnplayer,
|
||||||
#endif
|
#endif
|
||||||
cv_joinrefusemessage, cv_maxplayers, cv_resynchattempts,
|
cv_joinrefusemessage, cv_maxplayers, cv_resynchattempts,
|
||||||
#ifdef SATURNSYNCH
|
#ifdef SATURNPAK
|
||||||
cv_resynchcooldown, cv_gamestateattempts,
|
cv_resynchcooldown, cv_gamestateattempts,
|
||||||
#endif
|
#endif
|
||||||
cv_blamecfail, cv_maxsend, cv_noticedownload, cv_downloadspeed;
|
cv_blamecfail, cv_maxsend, cv_noticedownload, cv_downloadspeed;
|
||||||
@@ -616,6 +616,7 @@ void D_ClientServerInit(void);
|
|||||||
void RegisterNetXCmd(netxcmd_t id, void (*cmd_f)(UINT8 **p, INT32 playernum));
|
void RegisterNetXCmd(netxcmd_t id, void (*cmd_f)(UINT8 **p, INT32 playernum));
|
||||||
void SendNetXCmdForPlayer(UINT8 playerid, netxcmd_t id, const void *param, size_t nparam);
|
void SendNetXCmdForPlayer(UINT8 playerid, netxcmd_t id, const void *param, size_t nparam);
|
||||||
#define SendNetXCmd(id, param, nparam) SendNetXCmdForPlayer(0, id, param, nparam) // Shortcut for P1
|
#define SendNetXCmd(id, param, nparam) SendNetXCmdForPlayer(0, id, param, nparam) // Shortcut for P1
|
||||||
|
void SendKick(UINT8 playernum, UINT8 msg);
|
||||||
|
|
||||||
// Create any new ticcmds and broadcast to other players.
|
// Create any new ticcmds and broadcast to other players.
|
||||||
void NetKeepAlive(void);
|
void NetKeepAlive(void);
|
||||||
@@ -634,6 +635,9 @@ void CL_RemovePlayer(INT32 playernum, INT32 reason);
|
|||||||
void CL_QueryServerList(msg_server_t *list);
|
void CL_QueryServerList(msg_server_t *list);
|
||||||
void CL_UpdateServerList(void);
|
void CL_UpdateServerList(void);
|
||||||
void CL_TimeoutServerList(void);
|
void CL_TimeoutServerList(void);
|
||||||
|
|
||||||
|
void CL_AbortConnection(void);
|
||||||
|
|
||||||
// Is there a game running
|
// Is there a game running
|
||||||
boolean Playing(void);
|
boolean Playing(void);
|
||||||
|
|
||||||
@@ -666,7 +670,7 @@ tic_t GetLag(INT32 node);
|
|||||||
//UINT8 GetFreeXCmdSize(UINT8 playerid);
|
//UINT8 GetFreeXCmdSize(UINT8 playerid);
|
||||||
|
|
||||||
extern UINT8 hu_resynching;
|
extern UINT8 hu_resynching;
|
||||||
#ifdef SATURNSYNCH
|
#ifdef SATURNPAK
|
||||||
extern UINT8 hu_redownloadinggamestate;
|
extern UINT8 hu_redownloadinggamestate;
|
||||||
#endif
|
#endif
|
||||||
extern boolean hu_stopped; // kart, true when the game is stopped for players due to a disconnecting or connecting player
|
extern boolean hu_stopped; // kart, true when the game is stopped for players due to a disconnecting or connecting player
|
||||||
|
|||||||
+303
-173
@@ -147,7 +147,7 @@ INT32 eventhead, eventtail;
|
|||||||
|
|
||||||
boolean dedicated = false;
|
boolean dedicated = false;
|
||||||
|
|
||||||
boolean loaded_config = false;
|
boolean loaded_config = false; // true once config.cfg loaded AND executed
|
||||||
|
|
||||||
//
|
//
|
||||||
// D_PostEvent
|
// D_PostEvent
|
||||||
@@ -166,48 +166,56 @@ UINT8 ctrldown = 0; // 0x1 left, 0x2 right
|
|||||||
UINT8 altdown = 0; // 0x1 left, 0x2 right
|
UINT8 altdown = 0; // 0x1 left, 0x2 right
|
||||||
boolean capslock = 0; // gee i wonder what this does.
|
boolean capslock = 0; // gee i wonder what this does.
|
||||||
|
|
||||||
static void D_PadMenuScrollInput(int input)
|
static void D_PadMenuScrollInput(UINT8 input)
|
||||||
{
|
{
|
||||||
event_t myev = {0, 0, 0, 0};
|
event_t dpadev;
|
||||||
myev.type = ev_keydown;
|
memset(&dpadev, 0, sizeof(event_t));
|
||||||
myev.data1 = input;
|
dpadev.type = ev_keydown;
|
||||||
D_PostEvent(&myev); // put into eventlist
|
|
||||||
|
switch (input)
|
||||||
|
{
|
||||||
|
case DPAD_UP:
|
||||||
|
dpadev.data1 = KEY_UPARROW;
|
||||||
|
break;
|
||||||
|
case DPAD_DOWN:
|
||||||
|
dpadev.data1 = KEY_DOWNARROW;
|
||||||
|
break;
|
||||||
|
case DPAD_LEFT:
|
||||||
|
dpadev.data1 = KEY_LEFTARROW;
|
||||||
|
break;
|
||||||
|
case DPAD_RIGHT:
|
||||||
|
dpadev.data1 = KEY_RIGHTARROW;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
D_PostEvent(&dpadev); // put into eventlist
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SCROLLDELAY 19 // TICRATE * ( (k+2) (1 - [wz + h + j - q]^2 - [(gk + 2g + k + 1)(h + j) + h - z]^2 - [16(k + 1)^3(k + 2)(n + 1)^2 + 1 - f^2]^2 calculated by my butt
|
#define SCROLLDELAY 19
|
||||||
|
|
||||||
// this is absolutely awful and i hate it lmao
|
// Check if any dpad button is held
|
||||||
// but le hAx0r to make dpad also be able to scroll in the menu
|
// and pass it to the eventlist
|
||||||
static void D_GamePadMenuScrollTicker(void)
|
static void D_GamePadMenuScrollTicker(void)
|
||||||
{
|
{
|
||||||
static SINT8 menuInputDelayTimer = 0;
|
static UINT8 menuInputDelayTimer = 0;
|
||||||
int key = 0; // butt-on output
|
|
||||||
|
|
||||||
if (dedicated)
|
if (dedicated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// wish i had a switch ono
|
for (UINT8 i = 0; i < 4; i++)
|
||||||
if (DPADUPSCROLL)
|
|
||||||
key = KEY_UPARROW;
|
|
||||||
else if (DPADDOWNSCROLL)
|
|
||||||
key = KEY_DOWNARROW;
|
|
||||||
else if (DPADLEFTSCROLL)
|
|
||||||
key = KEY_LEFTARROW;
|
|
||||||
else if (DPADRIGHTSCROLL)
|
|
||||||
key = KEY_RIGHTARROW;
|
|
||||||
|
|
||||||
if (key)
|
|
||||||
{
|
{
|
||||||
if (menuInputDelayTimer < SCROLLDELAY)
|
if (dpadscrollstate[i])
|
||||||
menuInputDelayTimer++;
|
{
|
||||||
|
if (menuInputDelayTimer < SCROLLDELAY)
|
||||||
|
menuInputDelayTimer++;
|
||||||
|
else if (menuInputDelayTimer == SCROLLDELAY)
|
||||||
|
D_PadMenuScrollInput(i);
|
||||||
|
|
||||||
if (menuInputDelayTimer == SCROLLDELAY)
|
return;
|
||||||
D_PadMenuScrollInput(key);
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
menuInputDelayTimer = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
menuInputDelayTimer = 0;
|
||||||
}
|
}
|
||||||
#undef SCROLLDELAY
|
#undef SCROLLDELAY
|
||||||
|
|
||||||
@@ -464,6 +472,7 @@ static boolean D_Display(void)
|
|||||||
F_TitleScreenDrawer();
|
F_TitleScreenDrawer();
|
||||||
if (wipe)
|
if (wipe)
|
||||||
wipedefindex = wipe_titlescreen_toblack;
|
wipedefindex = wipe_titlescreen_toblack;
|
||||||
|
HU_DrawSongCredits();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GS_WAITINGPLAYERS:
|
case GS_WAITINGPLAYERS:
|
||||||
@@ -603,8 +612,8 @@ static boolean D_Display(void)
|
|||||||
py = 4;
|
py = 4;
|
||||||
else
|
else
|
||||||
py = viewwindowy + 4;
|
py = viewwindowy + 4;
|
||||||
patch = W_CachePatchName("M_PAUSE", PU_CACHE);
|
patch = W_CachePatchName("M_PAUSE", PU_PATCH);
|
||||||
V_DrawScaledPatch(viewwindowx + (BASEVIDWIDTH - SHORT(patch->width))/2, py, V_SNAPTOTOP, patch);
|
V_DrawScaledPatch(viewwindowx + (BASEVIDWIDTH - patch->width)/2, py, V_SNAPTOTOP, patch);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rendermode == render_soft && demo.rewinding)
|
if (rendermode == render_soft && demo.rewinding)
|
||||||
@@ -641,6 +650,8 @@ static boolean D_Display(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NetUpdate(); // send out any new accumulation
|
||||||
|
|
||||||
// It's safe to end the game now.
|
// It's safe to end the game now.
|
||||||
if (G_GetExitGameFlag())
|
if (G_GetExitGameFlag())
|
||||||
{
|
{
|
||||||
@@ -731,7 +742,7 @@ void D_SRB2Loop(void)
|
|||||||
COM_ImmedExecute("cls;version");
|
COM_ImmedExecute("cls;version");
|
||||||
|
|
||||||
if (rendermode == render_soft)
|
if (rendermode == render_soft)
|
||||||
V_DrawFixedPatch(0, 0, FRACUNIT/2, 0, (patch_t *)W_CacheLumpNum(W_GetNumForName("KARTKREW"), PU_CACHE), NULL);
|
V_DrawFixedPatch(0, 0, FRACUNIT/2, 0, W_CachePatchNum(W_GetNumForName("KARTKREW"), PU_PATCH_LOWPRIORITY), NULL);
|
||||||
I_FinishUpdate(); // page flip or blit buffer
|
I_FinishUpdate(); // page flip or blit buffer
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
@@ -823,7 +834,12 @@ void D_SRB2Loop(void)
|
|||||||
|
|
||||||
if (interp)
|
if (interp)
|
||||||
{
|
{
|
||||||
renderdeltatics = FLOAT_TO_FIXED(deltatics);
|
renderdeltatics = FloatToFixed(deltatics);
|
||||||
|
|
||||||
|
// I looked at the possibility of putting in a float drawer for
|
||||||
|
// perfstats and it's very complicated, so we'll just do this instead...
|
||||||
|
ps_interp_frac.value.p = (precise_t)((FIXED_TO_FLOAT(g_time.timefrac)) * 1000.0f);
|
||||||
|
ps_interp_lag.value.p = (precise_t)((deltasecs) * 1000.0f);
|
||||||
|
|
||||||
if (!(paused || P_AutoPause()) && deltatics < 1.0 && !hu_stopped)
|
if (!(paused || P_AutoPause()) && deltatics < 1.0 && !hu_stopped)
|
||||||
{
|
{
|
||||||
@@ -867,7 +883,7 @@ void D_SRB2Loop(void)
|
|||||||
LUA_Step();
|
LUA_Step();
|
||||||
|
|
||||||
#ifdef HAVE_DISCORDRPC
|
#ifdef HAVE_DISCORDRPC
|
||||||
if (!dedicated)
|
if (!dedicated && renderisnewtic)
|
||||||
{
|
{
|
||||||
Discord_RunCallbacks();
|
Discord_RunCallbacks();
|
||||||
}
|
}
|
||||||
@@ -927,6 +943,7 @@ void D_SRB2Loop(void)
|
|||||||
void D_StartTitle(void)
|
void D_StartTitle(void)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
|
||||||
if (netgame)
|
if (netgame)
|
||||||
{
|
{
|
||||||
if (gametype == GT_RACE) // SRB2kart
|
if (gametype == GT_RACE) // SRB2kart
|
||||||
@@ -948,6 +965,8 @@ void D_StartTitle(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
M_ClearMenus(true);
|
||||||
|
|
||||||
// okay, stop now
|
// okay, stop now
|
||||||
// (otherwise the game still thinks we're playing!)
|
// (otherwise the game still thinks we're playing!)
|
||||||
SV_StopServer();
|
SV_StopServer();
|
||||||
@@ -1060,18 +1079,21 @@ static void D_AutoloadFile(const char *file, char **filearray)
|
|||||||
COM_BufAddText(va("exec %s\n", newfile));
|
COM_BufAddText(va("exec %s\n", newfile));
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *strremove(char *str, const char *sub) {
|
static char *strremove(char *str, const char *sub)
|
||||||
char *p, *q, *r;
|
{
|
||||||
if (*sub && (q = r = strstr(str, sub)) != NULL) {
|
char *p, *q, *r;
|
||||||
size_t len = strlen(sub);
|
if (*sub && (q = r = strstr(str, sub)) != NULL)
|
||||||
while ((r = strstr(p = r + len, sub)) != NULL) {
|
{
|
||||||
while (p < r)
|
size_t len = strlen(sub);
|
||||||
*q++ = *p++;
|
while ((r = strstr(p = r + len, sub)) != NULL)
|
||||||
}
|
{
|
||||||
while ((*q++ = *p++) != '\0')
|
while (p < r)
|
||||||
continue;
|
*q++ = *p++;
|
||||||
}
|
}
|
||||||
return str;
|
while ((*q++ = *p++) != '\0')
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIND THEM
|
// FIND THEM
|
||||||
@@ -1179,47 +1201,49 @@ void D_CleanFile(char **filearray)
|
|||||||
|
|
||||||
static boolean AddIWAD(void)
|
static boolean AddIWAD(void)
|
||||||
{
|
{
|
||||||
char * path = va(pandf,srb2path,"srb2.srb");
|
char * path = va(pandf, srb2path, "srb2.srb");
|
||||||
|
|
||||||
if (FIL_ReadFileOK(path))
|
if (FIL_ReadFileOK(path))
|
||||||
{
|
{
|
||||||
D_AddFile(path, startupwadfiles);
|
D_AddFile(path, startupwadfiles);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// extra graphic patches for saturn specific thingies
|
// extra graphic patches for saturn specific thingies
|
||||||
boolean found_extra_kart;
|
boolean found_extra_kart = false;
|
||||||
boolean found_extra2_kart;
|
boolean found_extra2_kart = false;
|
||||||
boolean found_extra3_kart;
|
boolean found_extra3_kart = false;
|
||||||
|
|
||||||
boolean xtra_speedo; // extra speedometer check
|
boolean xtra_speedo = false; // extra speedometer check
|
||||||
boolean xtra_speedo_clr; // extra speedometer colour check
|
boolean xtra_speedo_clr = false; // extra speedometer colour check
|
||||||
boolean xtra_speedo3; // 80x 11 extra speedometer check
|
boolean xtra_speedo3 = false; // 80x 11 extra speedometer check
|
||||||
boolean xtra_speedo_clr3; // 80x 11 extra speedometer colour check
|
boolean xtra_speedo_clr3 = false; // 80x 11 extra speedometer colour check
|
||||||
boolean achi_speedo; // achiiro speedometer check
|
boolean achi_speedo = false; // achiiro speedometer check
|
||||||
boolean achi_speedo_clr; // extra speedometer colour check
|
boolean achi_speedo_clr = false; // extra speedometer colour check
|
||||||
boolean kartz_speedo; // kartZ speedo
|
boolean dial_speedo = false; // dial speedometer check
|
||||||
|
boolean dial_speedo_clr = false; // dial speedometer colour check
|
||||||
|
boolean kartz_speedo = false; // kartZ speedo
|
||||||
|
boolean kartz_speedo_smol = false; // kartZ speedo but smol
|
||||||
|
|
||||||
boolean clr_hud; // colour hud check
|
boolean clr_hud = false; // colour hud check
|
||||||
boolean big_lap; // bigger lap counter
|
boolean driftgaugegfx_clr = false; // driftgauge colour check
|
||||||
boolean big_lap_color; // bigger lap counter but colour
|
boolean big_lap = false; // bigger lap counter
|
||||||
boolean statdp; // stat display for extended player setup
|
boolean big_lap_color = false; // bigger lap counter but colour
|
||||||
boolean nametaggfx; // Nametag stuffs
|
boolean statdp = false; // stat display for extended player setup
|
||||||
boolean driftgaugegfx; // Driftgauge stuffs
|
boolean nametaggfx = false; // Nametag stuffs
|
||||||
boolean multiitem_icon; // Extra icons for Sneakers, Banana and Jawz
|
boolean driftgaugegfx = false; // Driftgauge stuffs
|
||||||
|
boolean multiitem_icon = false; // Extra icons for Sneakers, Banana and Jawz
|
||||||
|
boolean joystickicon = false; // Extra icons for the joystick input display
|
||||||
|
boolean minidoticon = false; // Dot graphic for minimap player angle display
|
||||||
|
boolean minilighticon = false; // mkwii-style minimap headlight
|
||||||
//
|
//
|
||||||
|
|
||||||
static void IdentifyVersion(void)
|
static void IdentifyVersion(void)
|
||||||
{
|
{
|
||||||
const char *srb2waddir = NULL;
|
const char *srb2waddir = NULL;
|
||||||
found_extra_kart = false;
|
|
||||||
found_extra2_kart = false;
|
|
||||||
found_extra3_kart = false;
|
|
||||||
|
|
||||||
#if defined (__unix__) || defined (UNIXCOMMON) || defined (HAVE_SDL)
|
#if defined (__unix__) || defined (UNIXCOMMON) || defined (HAVE_SDL)
|
||||||
// change to the directory where 'srb2.srb' is found
|
// change to the directory where 'srb2.srb' is found
|
||||||
@@ -1229,11 +1253,11 @@ static void IdentifyVersion(void)
|
|||||||
// get the current directory (possible problem on NT with "." as current dir)
|
// get the current directory (possible problem on NT with "." as current dir)
|
||||||
if (srb2waddir)
|
if (srb2waddir)
|
||||||
{
|
{
|
||||||
strlcpy(srb2path,srb2waddir,sizeof (srb2path));
|
strlcpy(srb2path, srb2waddir, sizeof(srb2path));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (getcwd(srb2path, 256) != NULL)
|
if (getcwd(srb2path, sizeof(srb2path)))
|
||||||
srb2waddir = srb2path;
|
srb2waddir = srb2path;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1242,7 +1266,7 @@ static void IdentifyVersion(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load the IWAD
|
// Load the IWAD
|
||||||
if (! AddIWAD())
|
if (!AddIWAD())
|
||||||
{
|
{
|
||||||
I_Error("SRB2.SRB not found! Expected in %s\n", srb2waddir);
|
I_Error("SRB2.SRB not found! Expected in %s\n", srb2waddir);
|
||||||
}
|
}
|
||||||
@@ -1267,18 +1291,21 @@ static void IdentifyVersion(void)
|
|||||||
D_AddFile(va(pandf,srb2waddir,"patch.kart"), startupwadfiles);
|
D_AddFile(va(pandf,srb2waddir,"patch.kart"), startupwadfiles);
|
||||||
#endif
|
#endif
|
||||||
// completely optional
|
// completely optional
|
||||||
if (FIL_ReadFileOK(va(pandf,srb2waddir,"extra.kart"))) {
|
if (FIL_ReadFileOK(va(pandf,srb2waddir,"extra.kart")))
|
||||||
|
{
|
||||||
D_AddFile(va(pandf,srb2waddir,"extra.kart"), startupwadfiles);
|
D_AddFile(va(pandf,srb2waddir,"extra.kart"), startupwadfiles);
|
||||||
found_extra_kart = true;
|
found_extra_kart = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// completely optional 2: Back with a vengence
|
// completely optional 2: Back with a vengence
|
||||||
if (FIL_ReadFileOK(va(pandf,srb2waddir,"extra2.kart"))) {
|
if (FIL_ReadFileOK(va(pandf,srb2waddir,"extra2.kart")))
|
||||||
|
{
|
||||||
D_AddFile(va(pandf,srb2waddir,"extra2.kart"), startupwadfiles);
|
D_AddFile(va(pandf,srb2waddir,"extra2.kart"), startupwadfiles);
|
||||||
found_extra2_kart = true;
|
found_extra2_kart = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FIL_ReadFileOK(va(pandf,srb2waddir,"extra3.kart"))) {
|
if (FIL_ReadFileOK(va(pandf,srb2waddir,"extra3.kart")))
|
||||||
|
{
|
||||||
D_AddFile(va(pandf,srb2waddir,"extra3.kart"), startupwadfiles);
|
D_AddFile(va(pandf,srb2waddir,"extra3.kart"), startupwadfiles);
|
||||||
found_extra3_kart = true;
|
found_extra3_kart = true;
|
||||||
}
|
}
|
||||||
@@ -1326,6 +1353,197 @@ static inline void D_MakeTitleString(char *s)
|
|||||||
strcpy(s, temp);
|
strcpy(s, temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void D_CheckSaturnExtraFiles(void)
|
||||||
|
{
|
||||||
|
// Possible value that changes depending on whether required files for speedometer are found or not
|
||||||
|
CV_PossibleValue_t speedo_cons_temp[NUMSPEEDOSTUFF] = {{1, "Default"}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}};
|
||||||
|
CV_PossibleValue_t driftgaugestyle_cons_temp[NUMDGAUGESTUFF] = {{1, "Default"}, {2, "Small"}, {3, "Big Numbers"}, {4, "Numbers Only"}, {0, NULL}, {0, NULL}};
|
||||||
|
CV_PossibleValue_t inputdisplay_cons_temp[NUMINPUTDISPLAYSTUFF] = {{0, "Off"}, {1, "Wheel"}, {2, "Stick"}, {0, NULL}, {0, NULL}};
|
||||||
|
CV_PossibleValue_t minimapdot_cons_temp[NUMMINIMAPDOTSTUFF] = {{0, "Off"}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}};
|
||||||
|
|
||||||
|
unsigned last_speedo_i = 0;
|
||||||
|
unsigned last_driftgauge_i = 3;
|
||||||
|
unsigned last_inputdisplay_i = 2;
|
||||||
|
unsigned last_minimapdot_i = 0;
|
||||||
|
#define PUSHCONS(cons, i, id, name) { ++i; cons[i].value = id; cons[i].strvalue = name; }
|
||||||
|
|
||||||
|
// found the funny, add it in!
|
||||||
|
if (found_extra_kart)
|
||||||
|
{
|
||||||
|
mainwads++;
|
||||||
|
|
||||||
|
// now check for extra speedometer stuff
|
||||||
|
if (W_CheckMultipleLumps("SP_SMSTC", "K_TRNULL", "SP_MKMH", "SP_MMPH", "SP_MFRAC", "SP_MPERC", NULL))
|
||||||
|
{
|
||||||
|
xtra_speedo = true;
|
||||||
|
PUSHCONS(speedo_cons_temp, last_speedo_i, 2, "Small");
|
||||||
|
}
|
||||||
|
|
||||||
|
// now check for achii speedometer stuff
|
||||||
|
if (W_CheckMultipleLumps("SP_AMSTC", "K_TRNULL", "SP_AKMH", "SP_AMPH", "SP_AFRAC", "SP_APERC", NULL))
|
||||||
|
{
|
||||||
|
achi_speedo = true;
|
||||||
|
PUSHCONS(speedo_cons_temp, last_speedo_i, 3, "Achii");
|
||||||
|
}
|
||||||
|
|
||||||
|
// now check for dial speedometer stuff
|
||||||
|
if (W_CheckMultipleLumps("K_DSPBS1", "K_DSPBS2", "K_DSDIAL",
|
||||||
|
"K_TRNULL", "SP_DKMH", "SP_DMPH", "SP_DFRAC", "SP_DPERC",
|
||||||
|
"K_DSPNM0", "K_DSPNM1", "K_DSPNM2", "K_DSPNM3", "K_DSPNM4",
|
||||||
|
"K_DSPNM5", "K_DSPNM6", "K_DSPNM7", "K_DSPNM8", "K_DSPNM9",
|
||||||
|
"RANKFIN", NULL))
|
||||||
|
{
|
||||||
|
dial_speedo = true;
|
||||||
|
PUSHCONS(speedo_cons_temp, last_speedo_i, 4, "Dial");
|
||||||
|
}
|
||||||
|
|
||||||
|
// check for bigger lap count
|
||||||
|
if (W_CheckMultipleLumps("K_STLAPB", "K_STLA2B", NULL))
|
||||||
|
{
|
||||||
|
big_lap = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// kartzspeedo
|
||||||
|
if (W_CheckMultipleLumps("K_KZSP1", "K_KZSP2", "K_KZSP3", "K_KZSP4", "K_KZSP5",
|
||||||
|
"K_KZSP6", "K_KZSP7", "K_KZSP8", "K_KZSP9", "K_KZSP10", "K_KZSP11", "K_KZSP12",
|
||||||
|
"K_KZSP13", "K_KZSP14", "K_KZSP15", "K_KZSP16", "K_KZSP17", "K_KZSP18", "K_KZSP19",
|
||||||
|
"K_KZSP20", "K_KZSP21", "K_KZSP22", "K_KZSP23", "K_KZSP24", "K_KZSP25", NULL))
|
||||||
|
{
|
||||||
|
kartz_speedo = true;
|
||||||
|
PUSHCONS(speedo_cons_temp, last_speedo_i, 5, "P-Meter");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (W_CheckMultipleLumps("K_KZSS1", "K_KZSS2", "K_KZSS3", "K_KZSS4", "K_KZSS5",
|
||||||
|
"K_KZSS6", "K_KZSS7", "K_KZSS8", "K_KZSS9", "K_KZSS10", "K_KZSS11", "K_KZSS12",
|
||||||
|
"K_KZSS13", "K_KZSS14", "K_KZSS15", "K_KZSS16", "K_KZSS17", "K_KZSS18", "K_KZSS19",
|
||||||
|
"K_KZSS20", "K_KZSS21", "K_KZSS22", "K_KZSS23", "K_KZSS24", "K_KZSS25", NULL))
|
||||||
|
{
|
||||||
|
kartz_speedo_smol = true;
|
||||||
|
PUSHCONS(speedo_cons_temp, last_speedo_i, 6, "P-Meter Small");
|
||||||
|
}
|
||||||
|
|
||||||
|
// stat display for extended player setup
|
||||||
|
if (W_CheckMultipleLumps("K_STATNB", "K_STATN1", "K_STATN2",
|
||||||
|
"K_STATN3", "K_STATN4", "K_STATN5", "K_STATN6", NULL))
|
||||||
|
{
|
||||||
|
statdp = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Nametag stuffs
|
||||||
|
if (W_CheckMultipleLumps("NTLINE", "NTLINEV", "NTSP", "NTWH", NULL))
|
||||||
|
{
|
||||||
|
nametaggfx = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// driftgauge
|
||||||
|
if (W_CheckMultipleLumps("K_DGAU","K_DGSU", NULL))
|
||||||
|
{
|
||||||
|
driftgaugegfx = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// extra item icons
|
||||||
|
if (W_CheckMultipleLumps("K_ITSHO2", "K_ITSHO3", "K_ITBAN2", "K_ITBAN3", "K_ITBAN4", "K_ITJAW2", NULL))
|
||||||
|
{
|
||||||
|
multiitem_icon = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// extra round joystick inputdisplay sprites
|
||||||
|
if (W_CheckMultipleLumps("JOYBCK","JOYKNB","JOYSHD", NULL))
|
||||||
|
{
|
||||||
|
joystickicon = true;
|
||||||
|
PUSHCONS(inputdisplay_cons_temp, last_inputdisplay_i, 3, "StickGFX");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (W_LumpExists("MMAPDOT"))
|
||||||
|
{
|
||||||
|
minidoticon = true;
|
||||||
|
PUSHCONS(minimapdot_cons_temp, last_minimapdot_i, 1, "Dot");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (W_LumpExists("MMAPHDLT"))
|
||||||
|
{
|
||||||
|
minilighticon = true;
|
||||||
|
PUSHCONS(minimapdot_cons_temp, last_minimapdot_i, 2, "Headlight");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// now check for colour hud stuff
|
||||||
|
if (found_extra2_kart)
|
||||||
|
{
|
||||||
|
mainwads++;
|
||||||
|
|
||||||
|
// kart vanilla hud patches but colourizable
|
||||||
|
if (W_CheckMultipleLumps("K_SCTIME", "K_SCTIMW", "K_SCLAPS", "K_SCLAPW","K_SCBALN", "K_SCBALW",
|
||||||
|
"K_SCKARM", "K_SCTOUT", "K_ISMULC", "K_ITMULC", "K_ITBC", "K_ITBCD", "K_ISBC", "K_ISBCD", NULL))
|
||||||
|
{
|
||||||
|
clr_hud = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// extra speedo but colour
|
||||||
|
if (W_LumpExists("SC_SMSTC"))
|
||||||
|
{
|
||||||
|
xtra_speedo_clr = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// achii speedo but colour
|
||||||
|
if (W_CheckMultipleLumps("SC_AMSTC", "K_TRNULL", "SC_AKMH", "SC_AMPH", "SC_AFRAC", "SC_APERC", NULL))
|
||||||
|
{
|
||||||
|
achi_speedo_clr = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// dial speedo but colour
|
||||||
|
if (W_CheckMultipleLumps("K_DSPBC1", "K_DSPBC2", "K_DSDIAL",
|
||||||
|
"K_TRNULL", "SC_DKMH", "SC_DMPH", "SC_DFRAC", "SC_DPERC",
|
||||||
|
"K_DSPNC0", "K_DSPNC1", "K_DSPNC2", "K_DSPNC3", "K_DSPNC4",
|
||||||
|
"K_DSPNC5", "K_DSPNC6", "K_DSPNC7", "K_DSPNC8", "K_DSPNC9",
|
||||||
|
"RANKFIN", NULL))
|
||||||
|
{
|
||||||
|
dial_speedo_clr = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// driftgauge but colour
|
||||||
|
if (W_CheckMultipleLumps("K_DCAU","K_DCSU", NULL))
|
||||||
|
{
|
||||||
|
driftgaugegfx_clr = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// check for bigger lap count but color** its color bitch
|
||||||
|
if (W_CheckMultipleLumps("K_SCLAPB", "K_SCLA2B", NULL))
|
||||||
|
{
|
||||||
|
big_lap_color = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// can be used for custom hud stuff
|
||||||
|
// currently used for the v1 beta hud
|
||||||
|
if (found_extra3_kart)
|
||||||
|
{
|
||||||
|
mainwads++;
|
||||||
|
|
||||||
|
// 80x11 speedometer crap
|
||||||
|
if (W_LumpExists("SP_SM3TC"))
|
||||||
|
{
|
||||||
|
xtra_speedo3 = true;
|
||||||
|
PUSHCONS(speedo_cons_temp, last_speedo_i, 7, "Extra");
|
||||||
|
PUSHCONS(driftgaugestyle_cons_temp, last_driftgauge_i, 5, "Extra");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 80x11 speedometer crap but colour
|
||||||
|
if (W_LumpExists("SC_SM3TC"))
|
||||||
|
{
|
||||||
|
xtra_speedo_clr3 = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef PUSHCONS
|
||||||
|
memcpy(speedo_cons_t, speedo_cons_temp, sizeof(speedo_cons_t));
|
||||||
|
memcpy(driftgaugestyle_cons_t, driftgaugestyle_cons_temp, sizeof(driftgaugestyle_cons_t));
|
||||||
|
memcpy(inputdisplay_cons_t, inputdisplay_cons_temp, sizeof(inputdisplay_cons_t));
|
||||||
|
memcpy(minimapdot_cons_t, minimapdot_cons_temp, sizeof(minimapdot_cons_t));
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
// D_SRB2Main
|
// D_SRB2Main
|
||||||
//
|
//
|
||||||
@@ -1389,7 +1607,9 @@ void D_SRB2Main(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// for dedicated server
|
// for dedicated server
|
||||||
|
#if !defined (DEDICATED)
|
||||||
dedicated = M_CheckParm("-dedicated") != 0;
|
dedicated = M_CheckParm("-dedicated") != 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
strcpy(title, "SRB2Kart");
|
strcpy(title, "SRB2Kart");
|
||||||
strcpy(srb2, "SRB2Kart");
|
strcpy(srb2, "SRB2Kart");
|
||||||
@@ -1523,6 +1743,7 @@ void D_SRB2Main(void)
|
|||||||
|
|
||||||
CONS_Printf("I_InitializeTime()...\n");
|
CONS_Printf("I_InitializeTime()...\n");
|
||||||
I_InitializeTime();
|
I_InitializeTime();
|
||||||
|
setlocale(LC_TIME, "");
|
||||||
|
|
||||||
// Make backups of some SOCcable tables.
|
// Make backups of some SOCcable tables.
|
||||||
P_BackupTables();
|
P_BackupTables();
|
||||||
@@ -1574,100 +1795,7 @@ void D_SRB2Main(void)
|
|||||||
|
|
||||||
#endif //ifndef DEVELOP
|
#endif //ifndef DEVELOP
|
||||||
|
|
||||||
// Possible value that changes depending on whether required files for speedometer are found or not
|
D_CheckSaturnExtraFiles(); // check all the saturn stuff :3
|
||||||
CV_PossibleValue_t speedo_cons_temp[NUMSPEEDOSTUFF] = {{1, "Default"}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}};
|
|
||||||
CV_PossibleValue_t driftgaugestyle_cons_temp[NUMSPEEDOSTUFF] = {{1, "Default"}, {2, "Small"}, {3, "Big Numbers"}, {4, "Numbers Only"}, {0, NULL}, {0, NULL}}; // ugh i dont want this but bleh
|
|
||||||
unsigned last_speedo_i = 0;
|
|
||||||
unsigned last_driftgauge_i = 0;
|
|
||||||
#define PUSHCONS(cons, i, id, name) { ++i; cons[i].value = id; cons[i].strvalue = name; }
|
|
||||||
|
|
||||||
if (found_extra_kart || found_extra2_kart || found_extra3_kart) // found the funny, add it in!
|
|
||||||
{
|
|
||||||
// HAYA: These are seperated for a reason lmao
|
|
||||||
if (found_extra_kart)
|
|
||||||
mainwads++;
|
|
||||||
if (found_extra2_kart)
|
|
||||||
mainwads++;
|
|
||||||
if (found_extra3_kart)
|
|
||||||
mainwads++;
|
|
||||||
|
|
||||||
// now check for extra speedometer stuff
|
|
||||||
if (W_CheckMultipleLumps("SP_SMSTC", "K_TRNULL", "SP_MKMH", "SP_MMPH", "SP_MFRAC", "SP_MPERC", NULL))
|
|
||||||
{
|
|
||||||
xtra_speedo = true;
|
|
||||||
PUSHCONS(speedo_cons_temp, last_speedo_i, 2, "Small");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (W_LumpExists("SC_SMSTC"))
|
|
||||||
xtra_speedo_clr = true;
|
|
||||||
|
|
||||||
// now check for achii speedometer stuff
|
|
||||||
if (W_CheckMultipleLumps("SP_AMSTC", "K_TRNULL", "SP_AKMH", "SP_AMPH", "SP_AFRAC", "SP_APERC", NULL))
|
|
||||||
{
|
|
||||||
achi_speedo = true;
|
|
||||||
PUSHCONS(speedo_cons_temp, last_speedo_i, 3, "Achii");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (W_CheckMultipleLumps("SC_AMSTC", "K_TRNULL", "SC_AKMH", "SC_AMPH", "SC_AFRAC", "SC_APERC", NULL))
|
|
||||||
achi_speedo_clr = true;
|
|
||||||
|
|
||||||
// check for bigger lap count
|
|
||||||
if (W_CheckMultipleLumps("K_STLAPB", "K_STLA2B", NULL))
|
|
||||||
big_lap = true;
|
|
||||||
|
|
||||||
// now check for colour hud stuff
|
|
||||||
if (W_CheckMultipleLumps("K_SCTIME", "K_SCTIMW", "K_SCLAPS", "K_SCLAPW", \
|
|
||||||
"K_SCBALN", "K_SCBALW", "K_SCKARM", "K_SCTOUT", "K_ISMULC", "K_ITMULC", "K_ITBC", "K_ITBCD", "K_ISBC", "K_ISBCD", NULL))
|
|
||||||
clr_hud = true;
|
|
||||||
|
|
||||||
// check for bigger lap count but color** its color bitch
|
|
||||||
if (W_CheckMultipleLumps("K_SCLAPB", "K_SCLA2B", NULL))
|
|
||||||
big_lap_color = true;
|
|
||||||
|
|
||||||
// kartzspeedo
|
|
||||||
if (W_CheckMultipleLumps("K_KZSP1", "K_KZSP2", "K_KZSP3", "K_KZSP4", "K_KZSP5", \
|
|
||||||
"K_KZSP6", "K_KZSP7", "K_KZSP8", "K_KZSP9", "K_KZSP10", "K_KZSP11", "K_KZSP12", \
|
|
||||||
"K_KZSP13", "K_KZSP14", "K_KZSP15", "K_KZSP16", "K_KZSP17", "K_KZSP18", "K_KZSP19", \
|
|
||||||
"K_KZSP20", "K_KZSP21", "K_KZSP22", "K_KZSP23", "K_KZSP24", "K_KZSP25", NULL))
|
|
||||||
{
|
|
||||||
kartz_speedo = true;
|
|
||||||
PUSHCONS(speedo_cons_temp, last_speedo_i, 4, "P-Meter");
|
|
||||||
}
|
|
||||||
|
|
||||||
// stat display for extended player setup
|
|
||||||
if (W_CheckMultipleLumps("K_STATNB", "K_STATN1", "K_STATN2", "K_STATN3", "K_STATN4", \
|
|
||||||
"K_STATN5", "K_STATN6", NULL))
|
|
||||||
statdp = true;
|
|
||||||
|
|
||||||
// Nametag stuffs
|
|
||||||
if (W_CheckMultipleLumps("NTLINE", "NTLINEV", "NTSP", "NTWH", NULL))
|
|
||||||
nametaggfx = true;
|
|
||||||
|
|
||||||
if (W_CheckMultipleLumps("K_DGAU","K_DCAU","K_DGSU","K_DCSU", NULL))
|
|
||||||
driftgaugegfx = true;
|
|
||||||
|
|
||||||
// extra item icons
|
|
||||||
if (W_CheckMultipleLumps("K_ITSHO2", "K_ITSHO3", "K_ITBAN2", "K_ITBAN3", "K_ITBAN4", "K_ITJAW2", NULL))
|
|
||||||
multiitem_icon = true;
|
|
||||||
|
|
||||||
if (found_extra3_kart)
|
|
||||||
{
|
|
||||||
// 80x11 speedometer crap
|
|
||||||
if (W_LumpExists("SP_SM3TC"))
|
|
||||||
{
|
|
||||||
xtra_speedo3 = true;
|
|
||||||
PUSHCONS(speedo_cons_temp, last_speedo_i, 5, "Extra");
|
|
||||||
PUSHCONS(driftgaugestyle_cons_temp, last_driftgauge_i, 5, "Extra");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (W_LumpExists("SC_SM3TC"))
|
|
||||||
xtra_speedo_clr3 = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef PUSHCONS
|
|
||||||
memcpy(speedo_cons_t, speedo_cons_temp, sizeof(speedo_cons_t));
|
|
||||||
memcpy(driftgaugestyle_cons_t, driftgaugestyle_cons_temp, sizeof(driftgaugestyle_cons_t));
|
|
||||||
|
|
||||||
// Do it before P_InitMapData because PNG patch
|
// Do it before P_InitMapData because PNG patch
|
||||||
// conversion sometimes needs the palette
|
// conversion sometimes needs the palette
|
||||||
@@ -1782,7 +1910,9 @@ void D_SRB2Main(void)
|
|||||||
|
|
||||||
savedata.lives = 0; // flag this as not-used
|
savedata.lives = 0; // flag this as not-used
|
||||||
|
|
||||||
loaded_config = true; // so pallettechange doesent get called 500 times at startup lol
|
// make sure I_Quit() will write back the correct config
|
||||||
|
// (do not write back the config if it crash before)
|
||||||
|
loaded_config = true; // so palettechange doesent get called 500 times at startup lol
|
||||||
|
|
||||||
//------------------------------------------------ COMMAND LINE PARAMS
|
//------------------------------------------------ COMMAND LINE PARAMS
|
||||||
|
|
||||||
|
|||||||
+9
-2
@@ -17,9 +17,9 @@
|
|||||||
#include "d_event.h"
|
#include "d_event.h"
|
||||||
#include "w_wad.h" // for MAX_WADFILES
|
#include "w_wad.h" // for MAX_WADFILES
|
||||||
|
|
||||||
// make sure not to write back the config until it's been correctly loaded
|
|
||||||
extern tic_t rendergametic;
|
extern tic_t rendergametic;
|
||||||
|
|
||||||
|
// make sure not to write back the config until it's been correctly loaded
|
||||||
extern boolean loaded_config;
|
extern boolean loaded_config;
|
||||||
|
|
||||||
extern char srb2home[256]; //Alam: My Home
|
extern char srb2home[256]; //Alam: My Home
|
||||||
@@ -38,15 +38,22 @@ extern boolean xtra_speedo3; // 80x11 extra speedometer check
|
|||||||
extern boolean xtra_speedo_clr3; // 80x11 extra speedometer colour check
|
extern boolean xtra_speedo_clr3; // 80x11 extra speedometer colour check
|
||||||
extern boolean achi_speedo; // achiiro speedometer check
|
extern boolean achi_speedo; // achiiro speedometer check
|
||||||
extern boolean achi_speedo_clr; // extra speedometer colour check
|
extern boolean achi_speedo_clr; // extra speedometer colour check
|
||||||
extern boolean kartz_speedo; // kartZ speedo
|
extern boolean dial_speedo; // dial speedometer check
|
||||||
|
extern boolean dial_speedo_clr; // dial speedometer colour check
|
||||||
|
extern boolean kartz_speedo; // kartZ speedo
|
||||||
|
extern boolean kartz_speedo_smol; // kartZ speedo but smol
|
||||||
|
|
||||||
extern boolean clr_hud; // colour hud check
|
extern boolean clr_hud; // colour hud check
|
||||||
|
extern boolean driftgaugegfx_clr; // driftgauge colour check
|
||||||
extern boolean big_lap; // bigger lap counter
|
extern boolean big_lap; // bigger lap counter
|
||||||
extern boolean big_lap_color; // bigger lap counter but colour
|
extern boolean big_lap_color; // bigger lap counter but colour
|
||||||
extern boolean statdp; // stat display for extended player setup
|
extern boolean statdp; // stat display for extended player setup
|
||||||
extern boolean nametaggfx; // Nametag stuffs
|
extern boolean nametaggfx; // Nametag stuffs
|
||||||
extern boolean driftgaugegfx; // Driftgauge stuffs
|
extern boolean driftgaugegfx; // Driftgauge stuffs
|
||||||
extern boolean multiitem_icon; // Extra icons for Sneakers, Banana and Jawz
|
extern boolean multiitem_icon; // Extra icons for Sneakers, Banana and Jawz
|
||||||
|
extern boolean joystickicon; // Extra icons for the joystick input display
|
||||||
|
extern boolean minidoticon; // Dot icon for minimap player angle display
|
||||||
|
extern boolean minilighticon; // mkwii-style minimap headlight
|
||||||
//
|
//
|
||||||
|
|
||||||
// autoload stuff
|
// autoload stuff
|
||||||
|
|||||||
+63
-69
@@ -109,20 +109,24 @@ boolean Net_GetNetStat(void)
|
|||||||
{
|
{
|
||||||
const tic_t t = I_GetTime();
|
const tic_t t = I_GetTime();
|
||||||
static INT64 oldsendbyte = 0;
|
static INT64 oldsendbyte = 0;
|
||||||
|
|
||||||
if (statstarttic+STATLENGTH <= t)
|
if (statstarttic+STATLENGTH <= t)
|
||||||
{
|
{
|
||||||
const tic_t df = t-statstarttic;
|
const tic_t df = t-statstarttic;
|
||||||
const INT64 newsendbyte = sendbytes - oldsendbyte;
|
const INT64 newsendbyte = sendbytes - oldsendbyte;
|
||||||
sendbps = (INT32)(newsendbyte*TICRATE)/df;
|
sendbps = (INT32)(newsendbyte*TICRATE)/df;
|
||||||
getbps = (getbytes*TICRATE)/df;
|
getbps = (getbytes*TICRATE)/df;
|
||||||
|
|
||||||
if (sendackpacket)
|
if (sendackpacket)
|
||||||
lostpercent = 100.0f*(float)retransmit/(float)sendackpacket;
|
lostpercent = 100.0f*(float)retransmit/(float)sendackpacket;
|
||||||
else
|
else
|
||||||
lostpercent = 0.0f;
|
lostpercent = 0.0f;
|
||||||
|
|
||||||
if (getackpacket)
|
if (getackpacket)
|
||||||
duppercent = 100.0f*(float)duppacket/(float)getackpacket;
|
duppercent = 100.0f*(float)duppacket/(float)getackpacket;
|
||||||
else
|
else
|
||||||
duppercent = 0.0f;
|
duppercent = 0.0f;
|
||||||
|
|
||||||
if (ticruned)
|
if (ticruned)
|
||||||
gamelostpercent = 100.0f*(float)ticmiss/(float)ticruned;
|
gamelostpercent = 100.0f*(float)ticmiss/(float)ticruned;
|
||||||
else
|
else
|
||||||
@@ -220,7 +224,7 @@ FUNCMATH static INT32 cmpack(UINT8 a, UINT8 b)
|
|||||||
* \param lowtimer ???
|
* \param lowtimer ???
|
||||||
* \return True if a free acknum was found
|
* \return True if a free acknum was found
|
||||||
*/
|
*/
|
||||||
static boolean GetFreeAcknum(UINT8 *freeack, boolean lowtimer)
|
static boolean GetFreeAcknum(UINT8 *freeack)
|
||||||
{
|
{
|
||||||
node_t *node = &nodes[doomcom->remotenode];
|
node_t *node = &nodes[doomcom->remotenode];
|
||||||
INT32 i, numfreeslot = 0;
|
INT32 i, numfreeslot = 0;
|
||||||
@@ -232,6 +236,7 @@ static boolean GetFreeAcknum(UINT8 *freeack, boolean lowtimer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < MAXACKPACKETS; i++)
|
for (i = 0; i < MAXACKPACKETS; i++)
|
||||||
|
{
|
||||||
if (!ackpak[i].acknum)
|
if (!ackpak[i].acknum)
|
||||||
{
|
{
|
||||||
// For low priority packets, make sure to let freeslots so urgent packets can be sent
|
// For low priority packets, make sure to let freeslots so urgent packets can be sent
|
||||||
@@ -249,17 +254,8 @@ static boolean GetFreeAcknum(UINT8 *freeack, boolean lowtimer)
|
|||||||
node->nextacknum++;
|
node->nextacknum++;
|
||||||
ackpak[i].destinationnode = (UINT8)(node - nodes);
|
ackpak[i].destinationnode = (UINT8)(node - nodes);
|
||||||
ackpak[i].length = doomcom->datalength;
|
ackpak[i].length = doomcom->datalength;
|
||||||
if (lowtimer)
|
ackpak[i].senttime = I_GetTime();
|
||||||
{
|
ackpak[i].resentnum = 0;
|
||||||
// Lowtime means can't be sent now so try it as soon as possible
|
|
||||||
ackpak[i].senttime = 0;
|
|
||||||
ackpak[i].resentnum = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ackpak[i].senttime = I_GetTime();
|
|
||||||
ackpak[i].resentnum = 0;
|
|
||||||
}
|
|
||||||
M_Memcpy(ackpak[i].pak.raw, netbuffer, ackpak[i].length);
|
M_Memcpy(ackpak[i].pak.raw, netbuffer, ackpak[i].length);
|
||||||
|
|
||||||
*freeack = ackpak[i].acknum;
|
*freeack = ackpak[i].acknum;
|
||||||
@@ -268,46 +264,17 @@ static boolean GetFreeAcknum(UINT8 *freeack, boolean lowtimer)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
CONS_Debug(DBG_NETPLAY, "No more free ackpacket\n");
|
CONS_Debug(DBG_NETPLAY, "No more free ackpacket\n");
|
||||||
#endif
|
#endif
|
||||||
if (netbuffer->packettype < PT_CANFAIL)
|
if (netbuffer->packettype < PT_CANFAIL)
|
||||||
I_Error("Connection lost\n");
|
I_Error("Connection lost\n");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Counts how many acks are free
|
|
||||||
*
|
|
||||||
* \param urgent True if the type of the packet meant to
|
|
||||||
* use an ack is lower than PT_CANFAIL
|
|
||||||
* If for some reason you don't want use it
|
|
||||||
* for any packet type in particular,
|
|
||||||
* just set to false
|
|
||||||
* \return The number of free acks
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
INT32 Net_GetFreeAcks(boolean urgent)
|
|
||||||
{
|
|
||||||
INT32 i, numfreeslot = 0;
|
|
||||||
INT32 n = 0; // Number of free acks found
|
|
||||||
|
|
||||||
for (i = 0; i < MAXACKPACKETS; i++)
|
|
||||||
if (!ackpak[i].acknum)
|
|
||||||
{
|
|
||||||
// For low priority packets, make sure to let freeslots so urgent packets can be sent
|
|
||||||
if (!urgent)
|
|
||||||
{
|
|
||||||
numfreeslot++;
|
|
||||||
if (numfreeslot <= URGENTFREESLOTNUM)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
n++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get a ack to send in the queue of this node
|
// Get a ack to send in the queue of this node
|
||||||
static UINT8 GetAcktosend(INT32 node)
|
static UINT8 GetAcktosend(INT32 node)
|
||||||
{
|
{
|
||||||
@@ -320,6 +287,7 @@ static void RemoveAck(INT32 i)
|
|||||||
INT32 node = ackpak[i].destinationnode;
|
INT32 node = ackpak[i].destinationnode;
|
||||||
DEBFILE(va("Remove ack %d\n",ackpak[i].acknum));
|
DEBFILE(va("Remove ack %d\n",ackpak[i].acknum));
|
||||||
ackpak[i].acknum = 0;
|
ackpak[i].acknum = 0;
|
||||||
|
|
||||||
if (nodes[node].flags & NF_CLOSE)
|
if (nodes[node].flags & NF_CLOSE)
|
||||||
Net_CloseConnection(node);
|
Net_CloseConnection(node);
|
||||||
}
|
}
|
||||||
@@ -335,13 +303,16 @@ static boolean Processackpak(void)
|
|||||||
if (netbuffer->ackreturn && cmpack(node->remotefirstack, netbuffer->ackreturn) < 0)
|
if (netbuffer->ackreturn && cmpack(node->remotefirstack, netbuffer->ackreturn) < 0)
|
||||||
{
|
{
|
||||||
node->remotefirstack = netbuffer->ackreturn;
|
node->remotefirstack = netbuffer->ackreturn;
|
||||||
|
|
||||||
// Search the ackbuffer and free it
|
// Search the ackbuffer and free it
|
||||||
for (i = 0; i < MAXACKPACKETS; i++)
|
for (i = 0; i < MAXACKPACKETS; i++)
|
||||||
|
{
|
||||||
if (ackpak[i].acknum && ackpak[i].destinationnode == node - nodes
|
if (ackpak[i].acknum && ackpak[i].destinationnode == node - nodes
|
||||||
&& cmpack(ackpak[i].acknum, netbuffer->ackreturn) <= 0)
|
&& cmpack(ackpak[i].acknum, netbuffer->ackreturn) <= 0)
|
||||||
{
|
{
|
||||||
RemoveAck(i);
|
RemoveAck(i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Received a packet with ack, queue it to send the ack back
|
// Received a packet with ack, queue it to send the ack back
|
||||||
@@ -349,6 +320,7 @@ static boolean Processackpak(void)
|
|||||||
{
|
{
|
||||||
UINT8 ack = netbuffer->ack;
|
UINT8 ack = netbuffer->ack;
|
||||||
getackpacket++;
|
getackpacket++;
|
||||||
|
|
||||||
if (cmpack(ack, node->firstacktosend) <= 0)
|
if (cmpack(ack, node->firstacktosend) <= 0)
|
||||||
{
|
{
|
||||||
DEBFILE(va("Discard(1) ack %d (duplicated)\n", ack));
|
DEBFILE(va("Discard(1) ack %d (duplicated)\n", ack));
|
||||||
@@ -359,6 +331,7 @@ static boolean Processackpak(void)
|
|||||||
{
|
{
|
||||||
// Check if it is not already in the queue
|
// Check if it is not already in the queue
|
||||||
for (i = node->acktosend_tail; i != node->acktosend_head; i = (i+1) % MAXACKTOSEND)
|
for (i = node->acktosend_tail; i != node->acktosend_head; i = (i+1) % MAXACKTOSEND)
|
||||||
|
{
|
||||||
if (node->acktosend[i] == ack)
|
if (node->acktosend[i] == ack)
|
||||||
{
|
{
|
||||||
DEBFILE(va("Discard(2) ack %d (duplicated)\n", ack));
|
DEBFILE(va("Discard(2) ack %d (duplicated)\n", ack));
|
||||||
@@ -366,11 +339,14 @@ static boolean Processackpak(void)
|
|||||||
goodpacket = false; // Discard packet (duplicate)
|
goodpacket = false; // Discard packet (duplicate)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (goodpacket)
|
if (goodpacket)
|
||||||
{
|
{
|
||||||
// Is a good packet so increment the acknowledge number,
|
// Is a good packet so increment the acknowledge number,
|
||||||
// Then search for a "hole" in the queue
|
// Then search for a "hole" in the queue
|
||||||
UINT8 nextfirstack = (UINT8)(node->firstacktosend + 1);
|
UINT8 nextfirstack = (UINT8)(node->firstacktosend + 1);
|
||||||
|
|
||||||
if (!nextfirstack)
|
if (!nextfirstack)
|
||||||
nextfirstack = 1;
|
nextfirstack = 1;
|
||||||
|
|
||||||
@@ -383,9 +359,11 @@ static boolean Processackpak(void)
|
|||||||
if (!nextfirstack)
|
if (!nextfirstack)
|
||||||
nextfirstack = 1;
|
nextfirstack = 1;
|
||||||
hm1 = (UINT8)((node->acktosend_head-1+MAXACKTOSEND) % MAXACKTOSEND);
|
hm1 = (UINT8)((node->acktosend_head-1+MAXACKTOSEND) % MAXACKTOSEND);
|
||||||
|
|
||||||
while (change)
|
while (change)
|
||||||
{
|
{
|
||||||
change = false;
|
change = false;
|
||||||
|
|
||||||
for (i = node->acktosend_tail; i != node->acktosend_head;
|
for (i = node->acktosend_tail; i != node->acktosend_head;
|
||||||
i = (i+1) % MAXACKTOSEND)
|
i = (i+1) % MAXACKTOSEND)
|
||||||
{
|
{
|
||||||
@@ -398,6 +376,7 @@ static boolean Processackpak(void)
|
|||||||
nextfirstack = 1;
|
nextfirstack = 1;
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == node->acktosend_tail)
|
if (i == node->acktosend_tail)
|
||||||
{
|
{
|
||||||
node->acktosend[node->acktosend_tail] = 0;
|
node->acktosend[node->acktosend_tail] = 0;
|
||||||
@@ -419,6 +398,7 @@ static boolean Processackpak(void)
|
|||||||
// Will be incremented when the nextfirstack comes (code above)
|
// Will be incremented when the nextfirstack comes (code above)
|
||||||
UINT8 newhead = (UINT8)((node->acktosend_head+1) % MAXACKTOSEND);
|
UINT8 newhead = (UINT8)((node->acktosend_head+1) % MAXACKTOSEND);
|
||||||
DEBFILE(va("out of order packet (%d expected)\n", nextfirstack));
|
DEBFILE(va("out of order packet (%d expected)\n", nextfirstack));
|
||||||
|
|
||||||
if (newhead != node->acktosend_tail)
|
if (newhead != node->acktosend_tail)
|
||||||
{
|
{
|
||||||
node->acktosend[node->acktosend_head] = ack;
|
node->acktosend[node->acktosend_head] = ack;
|
||||||
@@ -455,8 +435,11 @@ static void GotAcks(void)
|
|||||||
INT32 i, j;
|
INT32 i, j;
|
||||||
|
|
||||||
for (j = 0; j < MAXACKTOSEND; j++)
|
for (j = 0; j < MAXACKTOSEND; j++)
|
||||||
|
{
|
||||||
if (netbuffer->u.textcmd[j])
|
if (netbuffer->u.textcmd[j])
|
||||||
|
{
|
||||||
for (i = 0; i < MAXACKPACKETS; i++)
|
for (i = 0; i < MAXACKPACKETS; i++)
|
||||||
|
{
|
||||||
if (ackpak[i].acknum && ackpak[i].destinationnode == doomcom->remotenode)
|
if (ackpak[i].acknum && ackpak[i].destinationnode == doomcom->remotenode)
|
||||||
{
|
{
|
||||||
if (ackpak[i].acknum == netbuffer->u.textcmd[j])
|
if (ackpak[i].acknum == netbuffer->u.textcmd[j])
|
||||||
@@ -471,6 +454,9 @@ static void GotAcks(void)
|
|||||||
ackpak[i].senttime--; // hurry up
|
ackpak[i].senttime--; // hurry up
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -505,6 +491,7 @@ void Net_AckTicker(void)
|
|||||||
{
|
{
|
||||||
const INT32 nodei = ackpak[i].destinationnode;
|
const INT32 nodei = ackpak[i].destinationnode;
|
||||||
node_t *node = &nodes[nodei];
|
node_t *node = &nodes[nodei];
|
||||||
|
|
||||||
if (ackpak[i].acknum && ackpak[i].senttime + NODETIMEOUT < I_GetTime())
|
if (ackpak[i].acknum && ackpak[i].senttime + NODETIMEOUT < I_GetTime())
|
||||||
{
|
{
|
||||||
if (ackpak[i].resentnum > 10 && (node->flags & NF_CLOSE))
|
if (ackpak[i].resentnum > 10 && (node->flags & NF_CLOSE))
|
||||||
@@ -557,8 +544,10 @@ void Net_UnAcknowledgePacket(INT32 node)
|
|||||||
#else
|
#else
|
||||||
INT32 hm1 = (nodes[node].acktosend_head-1+MAXACKTOSEND) % MAXACKTOSEND;
|
INT32 hm1 = (nodes[node].acktosend_head-1+MAXACKTOSEND) % MAXACKTOSEND;
|
||||||
DEBFILE(va("UnAcknowledge node %d\n", node));
|
DEBFILE(va("UnAcknowledge node %d\n", node));
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (nodes[node].acktosend[hm1] == netbuffer->ack)
|
if (nodes[node].acktosend[hm1] == netbuffer->ack)
|
||||||
{
|
{
|
||||||
nodes[node].acktosend[hm1] = 0;
|
nodes[node].acktosend[hm1] = 0;
|
||||||
@@ -582,6 +571,7 @@ void Net_UnAcknowledgePacket(INT32 node)
|
|||||||
if (!nodes[node].firstacktosend)
|
if (!nodes[node].firstacktosend)
|
||||||
nodes[node].firstacktosend = UINT8_MAX;
|
nodes[node].firstacktosend = UINT8_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
nodes[node].firstacktosend++;
|
nodes[node].firstacktosend++;
|
||||||
if (!nodes[node].firstacktosend)
|
if (!nodes[node].firstacktosend)
|
||||||
nodes[node].firstacktosend = 1;
|
nodes[node].firstacktosend = 1;
|
||||||
@@ -600,8 +590,10 @@ static boolean Net_AllAcksReceived(void)
|
|||||||
INT32 i;
|
INT32 i;
|
||||||
|
|
||||||
for (i = 0; i < MAXACKPACKETS; i++)
|
for (i = 0; i < MAXACKPACKETS; i++)
|
||||||
|
{
|
||||||
if (ackpak[i].acknum)
|
if (ackpak[i].acknum)
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -621,6 +613,7 @@ void Net_WaitAllAckReceived(UINT32 timeout)
|
|||||||
timeout = tictac + timeout*NEWTICRATE;
|
timeout = tictac + timeout*NEWTICRATE;
|
||||||
|
|
||||||
HGetPacket();
|
HGetPacket();
|
||||||
|
|
||||||
while (timeout > I_GetTime() && !Net_AllAcksReceived())
|
while (timeout > I_GetTime() && !Net_AllAcksReceived())
|
||||||
{
|
{
|
||||||
while (tictac == I_GetTime())
|
while (tictac == I_GetTime())
|
||||||
@@ -628,6 +621,7 @@ void Net_WaitAllAckReceived(UINT32 timeout)
|
|||||||
I_Sleep(cv_sleep.value);
|
I_Sleep(cv_sleep.value);
|
||||||
I_UpdateTime(cv_timescale.value);
|
I_UpdateTime(cv_timescale.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
tictac = I_GetTime();
|
tictac = I_GetTime();
|
||||||
HGetPacket();
|
HGetPacket();
|
||||||
Net_AckTicker();
|
Net_AckTicker();
|
||||||
@@ -668,13 +662,14 @@ void Net_AbortPacketType(UINT8 packettype)
|
|||||||
#ifdef NONET
|
#ifdef NONET
|
||||||
(void)packettype;
|
(void)packettype;
|
||||||
#else
|
#else
|
||||||
INT32 i;
|
for (INT32 i = 0; i < MAXACKPACKETS; i++)
|
||||||
for (i = 0; i < MAXACKPACKETS; i++)
|
{
|
||||||
if (ackpak[i].acknum && (ackpak[i].pak.data.packettype == packettype
|
if (ackpak[i].acknum && (ackpak[i].pak.data.packettype == packettype
|
||||||
|| packettype == UINT8_MAX))
|
|| packettype == UINT8_MAX))
|
||||||
{
|
{
|
||||||
ackpak[i].acknum = 0;
|
ackpak[i].acknum = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -719,6 +714,7 @@ void Net_CloseConnection(INT32 node)
|
|||||||
|
|
||||||
// check if we are waiting for an ack from this node
|
// check if we are waiting for an ack from this node
|
||||||
for (i = 0; i < MAXACKPACKETS; i++)
|
for (i = 0; i < MAXACKPACKETS; i++)
|
||||||
|
{
|
||||||
if (ackpak[i].acknum && ackpak[i].destinationnode == node)
|
if (ackpak[i].acknum && ackpak[i].destinationnode == node)
|
||||||
{
|
{
|
||||||
if (!forceclose)
|
if (!forceclose)
|
||||||
@@ -726,6 +722,7 @@ void Net_CloseConnection(INT32 node)
|
|||||||
else
|
else
|
||||||
ackpak[i].acknum = 0;
|
ackpak[i].acknum = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
InitNode(&nodes[node]);
|
InitNode(&nodes[node]);
|
||||||
SV_AbortSendFiles(node);
|
SV_AbortSendFiles(node);
|
||||||
@@ -742,9 +739,8 @@ static UINT32 NetbufferChecksum(void)
|
|||||||
UINT32 c = 0x1234567;
|
UINT32 c = 0x1234567;
|
||||||
const INT32 l = doomcom->datalength - 4;
|
const INT32 l = doomcom->datalength - 4;
|
||||||
const UINT8 *buf = (UINT8 *)netbuffer + 4;
|
const UINT8 *buf = (UINT8 *)netbuffer + 4;
|
||||||
INT32 i;
|
|
||||||
|
|
||||||
for (i = 0; i < l; i++, buf++)
|
for (INT32 i = 0; i < l; i++, buf++)
|
||||||
c += (*buf) * (i+1);
|
c += (*buf) * (i+1);
|
||||||
|
|
||||||
return LONG(c);
|
return LONG(c);
|
||||||
@@ -759,6 +755,7 @@ static void fprintfstring(char *s, size_t len)
|
|||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
|
{
|
||||||
if (s[i] < 32)
|
if (s[i] < 32)
|
||||||
{
|
{
|
||||||
if (!mode)
|
if (!mode)
|
||||||
@@ -778,6 +775,8 @@ static void fprintfstring(char *s, size_t len)
|
|||||||
}
|
}
|
||||||
fprintf(debugfile, "%c", s[i]);
|
fprintf(debugfile, "%c", s[i]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mode)
|
if (mode)
|
||||||
fprintf(debugfile, "]");
|
fprintf(debugfile, "]");
|
||||||
}
|
}
|
||||||
@@ -832,15 +831,14 @@ const char *packettypename[NUMPACKETTYPE] =
|
|||||||
"MOREFILESNEEDED",
|
"MOREFILESNEEDED",
|
||||||
|
|
||||||
"PING"
|
"PING"
|
||||||
#ifdef SATURNSYNCH
|
#ifdef SATURNPAK
|
||||||
,
|
,
|
||||||
|
|
||||||
"WILLRESENDGAMESTATE",
|
"WILLRESENDGAMESTATE",
|
||||||
"CANRECEIVEGAMESTATE",
|
"CANRECEIVEGAMESTATE",
|
||||||
"RECEIVEDGAMESTATE",
|
"RECEIVEDGAMESTATE",
|
||||||
|
|
||||||
// we will reserve this for now even if unused, so order wont get mangled
|
"ISSATURN" // special packet to identify saturn clients
|
||||||
"ISSATURN"
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1035,6 +1033,7 @@ static boolean ShouldDropPacket(void)
|
|||||||
boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlength)
|
boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlength)
|
||||||
{
|
{
|
||||||
doomcom->datalength = (INT16)(packetlength + BASEPACKETSIZE);
|
doomcom->datalength = (INT16)(packetlength + BASEPACKETSIZE);
|
||||||
|
|
||||||
if (node == 0) // Packet is to go back to us
|
if (node == 0) // Packet is to go back to us
|
||||||
{
|
{
|
||||||
if ((rebound_head+1) % MAXREBOUND == rebound_tail)
|
if ((rebound_head+1) % MAXREBOUND == rebound_tail)
|
||||||
@@ -1070,6 +1069,7 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen
|
|||||||
// do this before GetFreeAcknum because this function backups
|
// do this before GetFreeAcknum because this function backups
|
||||||
// the current packet
|
// the current packet
|
||||||
doomcom->remotenode = (INT16)node;
|
doomcom->remotenode = (INT16)node;
|
||||||
|
|
||||||
if (doomcom->datalength <= 0)
|
if (doomcom->datalength <= 0)
|
||||||
{
|
{
|
||||||
DEBFILE("HSendPacket: nothing to send\n");
|
DEBFILE("HSendPacket: nothing to send\n");
|
||||||
@@ -1084,9 +1084,10 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen
|
|||||||
netbuffer->ackreturn = GetAcktosend(node);
|
netbuffer->ackreturn = GetAcktosend(node);
|
||||||
else
|
else
|
||||||
netbuffer->ackreturn = 0;
|
netbuffer->ackreturn = 0;
|
||||||
|
|
||||||
if (reliable)
|
if (reliable)
|
||||||
{
|
{
|
||||||
if (!GetFreeAcknum(&netbuffer->ack, false))
|
if (!GetFreeAcknum(&netbuffer->ack))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1158,7 +1159,6 @@ boolean HGetPacket(void)
|
|||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
//nodejustjoined = I_NetGet();
|
|
||||||
I_NetGet();
|
I_NetGet();
|
||||||
|
|
||||||
if (doomcom->remotenode == -1) // No packet received
|
if (doomcom->remotenode == -1) // No packet received
|
||||||
@@ -1187,21 +1187,6 @@ boolean HGetPacket(void)
|
|||||||
DebugPrintpacket("GET");
|
DebugPrintpacket("GET");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*// If a new node sends an unexpected packet, just ignore it
|
|
||||||
if (nodejustjoined && server
|
|
||||||
&& !(netbuffer->packettype == PT_ASKINFO
|
|
||||||
|| netbuffer->packettype == PT_SERVERINFO
|
|
||||||
|| netbuffer->packettype == PT_PLAYERINFO
|
|
||||||
|| netbuffer->packettype == PT_REQUESTFILE
|
|
||||||
|| netbuffer->packettype == PT_ASKINFOVIAMS
|
|
||||||
|| netbuffer->packettype == PT_CLIENTJOIN))
|
|
||||||
{
|
|
||||||
DEBFILE(va("New node sent an unexpected %s packet\n", packettypename[netbuffer->packettype]));
|
|
||||||
//CONS_Alert(CONS_NOTICE, "New node sent an unexpected %s packet\n", packettypename[netbuffer->packettype]);
|
|
||||||
Net_CloseConnection(doomcom->remotenode | FORCECLOSE);
|
|
||||||
continue;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// Proceed the ack and ackreturn field
|
// Proceed the ack and ackreturn field
|
||||||
if (!Processackpak())
|
if (!Processackpak())
|
||||||
continue; // discarded (duplicated)
|
continue; // discarded (duplicated)
|
||||||
@@ -1238,6 +1223,7 @@ static void Internal_FreeNodenum(INT32 nodenum)
|
|||||||
SINT8 I_NetMakeNode(const char *hostname)
|
SINT8 I_NetMakeNode(const char *hostname)
|
||||||
{
|
{
|
||||||
SINT8 newnode = -1;
|
SINT8 newnode = -1;
|
||||||
|
|
||||||
if (I_NetMakeNodewPort)
|
if (I_NetMakeNodewPort)
|
||||||
{
|
{
|
||||||
char *localhostname = strdup(hostname);
|
char *localhostname = strdup(hostname);
|
||||||
@@ -1264,7 +1250,10 @@ void D_SetDoomcom(void)
|
|||||||
{
|
{
|
||||||
if (doomcom) return;
|
if (doomcom) return;
|
||||||
doomcom = Z_Calloc(sizeof (doomcom_t), PU_STATIC, NULL);
|
doomcom = Z_Calloc(sizeof (doomcom_t), PU_STATIC, NULL);
|
||||||
|
doomcom->id = DOOMCOM_ID;
|
||||||
doomcom->numslots = doomcom->numnodes = 1;
|
doomcom->numslots = doomcom->numnodes = 1;
|
||||||
|
doomcom->gametype = 0;
|
||||||
|
doomcom->consoleplayer = 0;
|
||||||
doomcom->extratics = 0;
|
doomcom->extratics = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1288,6 +1277,7 @@ boolean D_CheckNetGame(void)
|
|||||||
I_NetMakeNodewPort = NULL;
|
I_NetMakeNodewPort = NULL;
|
||||||
|
|
||||||
hardware_MAXPACKETLENGTH = MAXPACKETLENGTH;
|
hardware_MAXPACKETLENGTH = MAXPACKETLENGTH;
|
||||||
|
|
||||||
// I_InitNetwork sets doomcom and netgame
|
// I_InitNetwork sets doomcom and netgame
|
||||||
// check and initialize the network driver
|
// check and initialize the network driver
|
||||||
multiplayer = false;
|
multiplayer = false;
|
||||||
@@ -1307,6 +1297,7 @@ boolean D_CheckNetGame(void)
|
|||||||
server = true; // WTF? server always true???
|
server = true; // WTF? server always true???
|
||||||
// no! The deault mode is server. Client is set elsewhere
|
// no! The deault mode is server. Client is set elsewhere
|
||||||
// when the client executes connect command.
|
// when the client executes connect command.
|
||||||
|
doomcom->ticdup = 1;
|
||||||
|
|
||||||
if (M_CheckParm("-extratic"))
|
if (M_CheckParm("-extratic"))
|
||||||
{
|
{
|
||||||
@@ -1336,6 +1327,8 @@ boolean D_CheckNetGame(void)
|
|||||||
if (netgame)
|
if (netgame)
|
||||||
multiplayer = true;
|
multiplayer = true;
|
||||||
|
|
||||||
|
if (doomcom->id != DOOMCOM_ID)
|
||||||
|
I_Error("Doomcom buffer invalid!");
|
||||||
if (doomcom->numnodes > MAXNETNODES)
|
if (doomcom->numnodes > MAXNETNODES)
|
||||||
I_Error("Too many nodes (%d), max:%d", doomcom->numnodes, MAXNETNODES);
|
I_Error("Too many nodes (%d), max:%d", doomcom->numnodes, MAXNETNODES);
|
||||||
|
|
||||||
@@ -1348,7 +1341,7 @@ boolean D_CheckNetGame(void)
|
|||||||
if (M_CheckParm("-debugfile"))
|
if (M_CheckParm("-debugfile"))
|
||||||
{
|
{
|
||||||
char filename[21];
|
char filename[21];
|
||||||
INT32 k = consoleplayer - 1;
|
INT32 k = doomcom->consoleplayer - 1;
|
||||||
if (M_IsNextParm())
|
if (M_IsNextParm())
|
||||||
k = atoi(M_GetNextParm()) - 1;
|
k = atoi(M_GetNextParm()) - 1;
|
||||||
while (!debugfile && k < MAXPLAYERS)
|
while (!debugfile && k < MAXPLAYERS)
|
||||||
@@ -1404,6 +1397,7 @@ void Command_Ping_f(void)
|
|||||||
INT32 i;
|
INT32 i;
|
||||||
|
|
||||||
pingc = 0;
|
pingc = 0;
|
||||||
|
|
||||||
for (i = 1; i < MAXPLAYERS; ++i)
|
for (i = 1; i < MAXPLAYERS; ++i)
|
||||||
{
|
{
|
||||||
if (playeringame[i])
|
if (playeringame[i])
|
||||||
|
|||||||
+1
-3
@@ -45,12 +45,10 @@ extern boolean nodeingame[MAXNETNODES]; // Set false as nodes leave game
|
|||||||
|
|
||||||
extern boolean serverrunning;
|
extern boolean serverrunning;
|
||||||
|
|
||||||
INT32 Net_GetFreeAcks(boolean urgent);
|
|
||||||
void Net_AckTicker(void);
|
void Net_AckTicker(void);
|
||||||
|
|
||||||
// If reliable return true if packet sent, 0 else
|
// If reliable return true if packet sent, 0 else
|
||||||
boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum,
|
boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlength);
|
||||||
size_t packetlength);
|
|
||||||
boolean HGetPacket(void);
|
boolean HGetPacket(void);
|
||||||
void D_SetDoomcom(void);
|
void D_SetDoomcom(void);
|
||||||
#ifndef NONET
|
#ifndef NONET
|
||||||
|
|||||||
+137
-298
@@ -39,6 +39,7 @@
|
|||||||
#include "d_main.h"
|
#include "d_main.h"
|
||||||
#include "m_random.h"
|
#include "m_random.h"
|
||||||
#include "f_finale.h"
|
#include "f_finale.h"
|
||||||
|
#include "v_video.h"
|
||||||
#include "filesrch.h"
|
#include "filesrch.h"
|
||||||
#include "mserv.h"
|
#include "mserv.h"
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
@@ -210,14 +211,6 @@ void SendWeaponPref4(void);
|
|||||||
|
|
||||||
static CV_PossibleValue_t usemouse_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Force"}, {0, NULL}};
|
static CV_PossibleValue_t usemouse_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Force"}, {0, NULL}};
|
||||||
|
|
||||||
#ifdef LJOYSTICK
|
|
||||||
static CV_PossibleValue_t joyport_cons_t[] = {{1, "/dev/js0"}, {2, "/dev/js1"}, {3, "/dev/js2"},
|
|
||||||
{4, "/dev/js3"}, {0, NULL}};
|
|
||||||
#else
|
|
||||||
// accept whatever value - it is in fact the joystick device number
|
|
||||||
#define usejoystick_cons_t NULL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static CV_PossibleValue_t autobalance_cons_t[] = {{0, "MIN"}, {4, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t autobalance_cons_t[] = {{0, "MIN"}, {4, "MAX"}, {0, NULL}};
|
||||||
static CV_PossibleValue_t teamscramble_cons_t[] = {{0, "Off"}, {1, "Random"}, {2, "Points"}, {0, NULL}};
|
static CV_PossibleValue_t teamscramble_cons_t[] = {{0, "Off"}, {1, "Random"}, {2, "Points"}, {0, NULL}};
|
||||||
|
|
||||||
@@ -290,40 +283,48 @@ consvar_t cv_skipmapcheck = {"skipmapcheck", "Off", CV_SAVE, CV_OnOff, NULL, 0,
|
|||||||
|
|
||||||
INT32 cv_debug;
|
INT32 cv_debug;
|
||||||
|
|
||||||
consvar_t cv_usemouse = {"use_mouse", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse, 0, NULL, NULL, 0, 0, NULL};
|
static void UseMouse_OnChange(void);
|
||||||
|
consvar_t cv_usemouse = {"use_mouse", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, UseMouse_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
static void UseMouse_OnChange(void)
|
||||||
|
{
|
||||||
|
GameFocus_menu_Onchange();
|
||||||
|
I_StartupMouse();
|
||||||
|
}
|
||||||
|
|
||||||
//WTF
|
//WTF
|
||||||
consvar_t cv_mouseturn = {"mouseturn", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_mouseturn = {"mouseturn", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
// Lagless camera! Yay!
|
// Lagless camera! Yay!
|
||||||
consvar_t cv_laglesscam = {"laglesscamera", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_laglesscam = {"lagless_camera", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_verticallook = {"verticallook", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_verticallook[MAXSPLITSCREENPLAYERS] = {
|
||||||
|
{"verticallook", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||||
#if defined(HAVE_SDL) || defined(_WINDOWS) //joystick 1 and 2
|
{"verticallook2", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||||
consvar_t cv_usejoystick[MAXSPLITSCREENPLAYERS] = {
|
{"verticallook3", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"use_joystick", "1", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick1, 0, NULL, NULL, 0, 0, NULL},
|
{"verticallook4", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||||
{"use_joystick2", "2", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick2, 0, NULL, NULL, 0, 0, NULL},
|
|
||||||
{"use_joystick3", "3", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick3, 0, NULL, NULL, 0, 0, NULL},
|
|
||||||
{"use_joystick4", "4", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick4, 0, NULL, NULL, 0, 0, NULL}
|
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (defined (LJOYSTICK) || defined (HAVE_SDL))
|
consvar_t cv_usejoystick[MAXSPLITSCREENPLAYERS] = {
|
||||||
#ifdef LJOYSTICK
|
{"use_joystick", "1", CV_SAVE|CV_CALL, NULL, I_InitJoystick1, 0, NULL, NULL, 0, 0, NULL},
|
||||||
consvar_t cv_joyport = {"joyport", "/dev/js0", CV_SAVE, joyport_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
{"use_joystick2", "2", CV_SAVE|CV_CALL, NULL, I_InitJoystick2, 0, NULL, NULL, 0, 0, NULL},
|
||||||
consvar_t cv_joyport2 = {"joyport2", "/dev/js0", CV_SAVE, joyport_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; //Alam: for later
|
{"use_joystick3", "3", CV_SAVE|CV_CALL, NULL, I_InitJoystick3, 0, NULL, NULL, 0, 0, NULL},
|
||||||
#endif
|
{"use_joystick4", "4", CV_SAVE|CV_CALL, NULL, I_InitJoystick4, 0, NULL, NULL, 0, 0, NULL}
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined (HAVE_SDL)
|
||||||
consvar_t cv_joyscale[MAXSPLITSCREENPLAYERS] = {
|
consvar_t cv_joyscale[MAXSPLITSCREENPLAYERS] = {
|
||||||
{"joyscale", "1", CV_SAVE|CV_CALL, NULL, I_JoyScale, 0, NULL, NULL, 0, 0, NULL},
|
{"joyscale", "1", CV_SAVE|CV_CALL, NULL, I_JoyScale, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"joyscale2", "1", CV_SAVE|CV_CALL, NULL, I_JoyScale2, 0, NULL, NULL, 0, 0, NULL},
|
{"joyscale2", "1", CV_SAVE|CV_CALL, NULL, I_JoyScale2, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"joyscale3", "1", CV_SAVE|CV_CALL, NULL, I_JoyScale3, 0, NULL, NULL, 0, 0, NULL},
|
{"joyscale3", "1", CV_SAVE|CV_CALL, NULL, I_JoyScale3, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"joyscale4", "1", CV_SAVE|CV_CALL, NULL, I_JoyScale4, 0, NULL, NULL, 0, 0, NULL}
|
{"joyscale4", "1", CV_SAVE|CV_CALL, NULL, I_JoyScale4, 0, NULL, NULL, 0, 0, NULL}
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
consvar_t cv_joyscale[2] = { //Alam: Dummy for save
|
consvar_t cv_joyscale[MAXSPLITSCREENPLAYERS] = { //Alam: Dummy for save
|
||||||
{"joyscale", "1", CV_SAVE|CV_HIDEN, NULL, NULL, 0, NULL, NULL, 0, 0, NULL},
|
{"joyscale", "1", CV_SAVE|CV_HIDEN, NULL, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"joyscale", "1", CV_SAVE|CV_HIDEN, NULL, NULL, 0, NULL, NULL, 0, 0, NULL}
|
{"joyscale2", "1", CV_SAVE|CV_HIDEN, NULL, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||||
|
{"joyscale3", "1", CV_SAVE|CV_HIDEN, NULL, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||||
|
{"joyscale4", "1", CV_SAVE|CV_HIDEN, NULL, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -331,19 +332,6 @@ consvar_t cv_matchboxes = {"matchboxes", "Normal", CV_NETVAR|CV_CHEAT|CV_NOSHOWH
|
|||||||
consvar_t cv_specialrings = {"specialrings", "On", CV_NETVAR|CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_specialrings = {"specialrings", "On", CV_NETVAR|CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_powerstones = {"powerstones", "On", CV_NETVAR|CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_powerstones = {"powerstones", "On", CV_NETVAR|CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
/*consvar_t cv_recycler = {"tv_recycler", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_teleporters = {"tv_teleporter", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_superring = {"tv_superring", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_supersneakers = {"tv_supersneaker", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_invincibility = {"tv_invincibility", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_jumpshield = {"tv_jumpshield", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_watershield = {"tv_watershield", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_ringshield = {"tv_ringshield", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_forceshield = {"tv_forceshield", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_bombshield = {"tv_bombshield", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_1up = {"tv_1up", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_eggmanbox = {"tv_eggman", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};*/
|
|
||||||
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
consvar_t cv_sneaker = {"sneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_sneaker = {"sneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_rocketsneaker = {"rocketsneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_rocketsneaker = {"rocketsneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
@@ -459,7 +447,6 @@ consvar_t cv_killingdead = {"killingdead", "Off", CV_NETVAR|CV_NOSHOWHELP, CV_On
|
|||||||
consvar_t cv_netstat = {"netstat", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; // show bandwidth statistics
|
consvar_t cv_netstat = {"netstat", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; // show bandwidth statistics
|
||||||
static CV_PossibleValue_t nettimeout_cons_t[] = {{TICRATE/7, "MIN"}, {60*TICRATE, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t nettimeout_cons_t[] = {{TICRATE/7, "MIN"}, {60*TICRATE, "MAX"}, {0, NULL}};
|
||||||
consvar_t cv_nettimeout = {"nettimeout", "210", CV_CALL|CV_SAVE, nettimeout_cons_t, NetTimeout_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_nettimeout = {"nettimeout", "210", CV_CALL|CV_SAVE, nettimeout_cons_t, NetTimeout_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
//static CV_PossibleValue_t jointimeout_cons_t[] = {{5*TICRATE, "MIN"}, {60*TICRATE, "MAX"}, {0, NULL}};
|
|
||||||
consvar_t cv_jointimeout = {"jointimeout", "210", CV_CALL|CV_SAVE, nettimeout_cons_t, JoinTimeout_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_jointimeout = {"jointimeout", "210", CV_CALL|CV_SAVE, nettimeout_cons_t, JoinTimeout_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_maxping = {"maxdelay", "20", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_maxping = {"maxdelay", "20", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
@@ -652,7 +639,6 @@ void D_RegisterServerCommands(void)
|
|||||||
COM_AddCommand("addfilelocal", Command_Addfilelocal);
|
COM_AddCommand("addfilelocal", Command_Addfilelocal);
|
||||||
COM_AddCommand("addfile", Command_Addfile);
|
COM_AddCommand("addfile", Command_Addfile);
|
||||||
COM_AddCommand("addskins", Command_Addskins);
|
COM_AddCommand("addskins", Command_Addskins);
|
||||||
COM_AddCommand("localskin", Command_GLocalSkin);
|
|
||||||
COM_AddCommand("listwad", Command_ListWADS_f);
|
COM_AddCommand("listwad", Command_ListWADS_f);
|
||||||
COM_AddCommand("listmapthings", Command_ListDoomednums_f);
|
COM_AddCommand("listmapthings", Command_ListDoomednums_f);
|
||||||
COM_AddCommand("listunusedsprites", Command_ListUnusedSprites_f);
|
COM_AddCommand("listunusedsprites", Command_ListUnusedSprites_f);
|
||||||
@@ -717,7 +703,7 @@ void D_RegisterServerCommands(void)
|
|||||||
CV_RegisterVar(&cv_competitionboxes);
|
CV_RegisterVar(&cv_competitionboxes);
|
||||||
CV_RegisterVar(&cv_matchboxes);
|
CV_RegisterVar(&cv_matchboxes);
|
||||||
|
|
||||||
K_RegisterKartStuff(); // SRB2kart
|
K_RegisterServerKartStuff(); // SRB2kart
|
||||||
|
|
||||||
CV_RegisterVar(&cv_ringslinger);
|
CV_RegisterVar(&cv_ringslinger);
|
||||||
|
|
||||||
@@ -741,9 +727,14 @@ void D_RegisterServerCommands(void)
|
|||||||
CV_RegisterVar(&cv_killingdead);
|
CV_RegisterVar(&cv_killingdead);
|
||||||
|
|
||||||
// d_clisrv
|
// d_clisrv
|
||||||
|
#ifndef NONET
|
||||||
|
#ifdef SATURNJOIN
|
||||||
|
CV_RegisterVar(&cv_allownewsaturnplayer); // need to register it before cv_maxplayers && cv_allownewplayer
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
CV_RegisterVar(&cv_maxplayers);
|
CV_RegisterVar(&cv_maxplayers);
|
||||||
CV_RegisterVar(&cv_resynchattempts);
|
CV_RegisterVar(&cv_resynchattempts);
|
||||||
#ifdef SATURNSYNCH
|
#ifdef SATURNPAK
|
||||||
CV_RegisterVar(&cv_gamestateattempts);
|
CV_RegisterVar(&cv_gamestateattempts);
|
||||||
CV_RegisterVar(&cv_resynchcooldown);
|
CV_RegisterVar(&cv_resynchcooldown);
|
||||||
#endif
|
#endif
|
||||||
@@ -754,9 +745,7 @@ void D_RegisterServerCommands(void)
|
|||||||
CV_RegisterVar(&cv_httpsource);
|
CV_RegisterVar(&cv_httpsource);
|
||||||
#ifndef NONET
|
#ifndef NONET
|
||||||
CV_RegisterVar(&cv_allownewplayer);
|
CV_RegisterVar(&cv_allownewplayer);
|
||||||
#ifdef SATURNJOIN
|
|
||||||
CV_RegisterVar(&cv_allownewsaturnplayer);
|
|
||||||
#endif
|
|
||||||
CV_RegisterVar(&cv_joinrefusemessage);
|
CV_RegisterVar(&cv_joinrefusemessage);
|
||||||
CV_RegisterVar(&cv_chatlogsize);
|
CV_RegisterVar(&cv_chatlogsize);
|
||||||
#ifdef VANILLAJOINNEXTROUND
|
#ifdef VANILLAJOINNEXTROUND
|
||||||
@@ -795,8 +784,6 @@ void D_RegisterServerCommands(void)
|
|||||||
CV_RegisterVar(&cv_netdemosyncquality);
|
CV_RegisterVar(&cv_netdemosyncquality);
|
||||||
CV_RegisterVar(&cv_maxdemosize);
|
CV_RegisterVar(&cv_maxdemosize);
|
||||||
CV_RegisterVar(&cv_demochangemap);
|
CV_RegisterVar(&cv_demochangemap);
|
||||||
|
|
||||||
CV_RegisterVar(&cv_keyboardlayout);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
@@ -855,6 +842,10 @@ void D_RegisterClientCommands(void)
|
|||||||
COM_AddCommand("stopmovie", Command_StopMovie_f);
|
COM_AddCommand("stopmovie", Command_StopMovie_f);
|
||||||
COM_AddCommand("minigen", M_MinimapGenerate);
|
COM_AddCommand("minigen", M_MinimapGenerate);
|
||||||
|
|
||||||
|
COM_AddCommand("localskin", Command_GLocalSkin);
|
||||||
|
|
||||||
|
K_RegisterClientKartStuff(); // SRB2kart
|
||||||
|
|
||||||
CV_RegisterVar(&cv_screenshot_option);
|
CV_RegisterVar(&cv_screenshot_option);
|
||||||
CV_RegisterVar(&cv_screenshot_folder);
|
CV_RegisterVar(&cv_screenshot_folder);
|
||||||
CV_RegisterVar(&cv_moviemode);
|
CV_RegisterVar(&cv_moviemode);
|
||||||
@@ -905,11 +896,13 @@ void D_RegisterClientCommands(void)
|
|||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
CV_RegisterVar(&cv_seenames);
|
CV_RegisterVar(&cv_seenames);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CV_RegisterVar(&cv_rollingdemos);
|
CV_RegisterVar(&cv_rollingdemos);
|
||||||
|
|
||||||
CV_RegisterVar(&cv_netstat);
|
CV_RegisterVar(&cv_netstat);
|
||||||
CV_RegisterVar(&cv_netticbuffer);
|
CV_RegisterVar(&cv_netticbuffer);
|
||||||
CV_RegisterVar(&cv_mindelay);
|
CV_RegisterVar(&cv_mindelay);
|
||||||
CV_RegisterVar(&cv_lagless);
|
CV_RegisterVar(&cv_gentlemens);
|
||||||
|
|
||||||
#ifdef NETGAME_DEVMODE
|
#ifdef NETGAME_DEVMODE
|
||||||
CV_RegisterVar(&cv_fishcake);
|
CV_RegisterVar(&cv_fishcake);
|
||||||
@@ -924,6 +917,8 @@ void D_RegisterClientCommands(void)
|
|||||||
|
|
||||||
CV_RegisterVar(&cv_cechotoggle);
|
CV_RegisterVar(&cv_cechotoggle);
|
||||||
|
|
||||||
|
CV_RegisterVar(&cv_keyboardlayout);
|
||||||
|
|
||||||
// time attack ghost options are also saved to config
|
// time attack ghost options are also saved to config
|
||||||
CV_RegisterVar(&cv_ghost_besttime);
|
CV_RegisterVar(&cv_ghost_besttime);
|
||||||
CV_RegisterVar(&cv_ghost_bestlap);
|
CV_RegisterVar(&cv_ghost_bestlap);
|
||||||
@@ -933,7 +928,10 @@ void D_RegisterClientCommands(void)
|
|||||||
|
|
||||||
COM_AddCommand("displayplayer", Command_Displayplayer_f);
|
COM_AddCommand("displayplayer", Command_Displayplayer_f);
|
||||||
|
|
||||||
CV_RegisterVar(&cv_audbuffersize);
|
CV_RegisterVar(&cv_audbuffersize);
|
||||||
|
|
||||||
|
CV_RegisterVar(&cv_palette);
|
||||||
|
CV_RegisterVar(&cv_palettenum);
|
||||||
|
|
||||||
// m_menu.c
|
// m_menu.c
|
||||||
CV_RegisterVar(&cv_chatheight);
|
CV_RegisterVar(&cv_chatheight);
|
||||||
@@ -944,10 +942,10 @@ void D_RegisterClientCommands(void)
|
|||||||
CV_RegisterVar(&cv_chatnotifications);
|
CV_RegisterVar(&cv_chatnotifications);
|
||||||
CV_RegisterVar(&cv_chatbacktint);
|
CV_RegisterVar(&cv_chatbacktint);
|
||||||
CV_RegisterVar(&cv_songcredits);
|
CV_RegisterVar(&cv_songcredits);
|
||||||
CV_RegisterVar(&cv_showfreeplay);
|
CV_RegisterVar(&cv_showfreeplay);
|
||||||
CV_RegisterVar(&cv_skinselectspin);
|
CV_RegisterVar(&cv_skinselectspin);
|
||||||
CV_RegisterVar(&cv_showallmaps);
|
CV_RegisterVar(&cv_showallmaps);
|
||||||
|
|
||||||
CV_RegisterVar(&cv_growmusic);
|
CV_RegisterVar(&cv_growmusic);
|
||||||
CV_RegisterVar(&cv_supermusic);
|
CV_RegisterVar(&cv_supermusic);
|
||||||
|
|
||||||
@@ -968,7 +966,18 @@ void D_RegisterClientCommands(void)
|
|||||||
CV_RegisterVar(&cv_showfocuslost);
|
CV_RegisterVar(&cv_showfocuslost);
|
||||||
CV_RegisterVar(&cv_pauseifunfocused);
|
CV_RegisterVar(&cv_pauseifunfocused);
|
||||||
|
|
||||||
|
// filesrch.c
|
||||||
|
CV_RegisterVar(&cv_addons_option);
|
||||||
|
CV_RegisterVar(&cv_addons_folder);
|
||||||
|
CV_RegisterVar(&cv_addons_md5);
|
||||||
|
CV_RegisterVar(&cv_addons_showall);
|
||||||
|
CV_RegisterVar(&cv_addons_search_type);
|
||||||
|
CV_RegisterVar(&cv_addons_search_case);
|
||||||
|
|
||||||
// g_input.c
|
// g_input.c
|
||||||
|
CV_RegisterVar(&cv_controlperkey);
|
||||||
|
CV_RegisterVar(&cv_turnsmooth);
|
||||||
|
|
||||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||||
{
|
{
|
||||||
CV_RegisterVar(&cv_turnaxis[i]);
|
CV_RegisterVar(&cv_turnaxis[i]);
|
||||||
@@ -986,45 +995,17 @@ void D_RegisterClientCommands(void)
|
|||||||
CV_RegisterVar(&cv_custom3axis[i]);
|
CV_RegisterVar(&cv_custom3axis[i]);
|
||||||
CV_RegisterVar(&cv_xdeadzone[i]);
|
CV_RegisterVar(&cv_xdeadzone[i]);
|
||||||
CV_RegisterVar(&cv_ydeadzone[i]);
|
CV_RegisterVar(&cv_ydeadzone[i]);
|
||||||
}
|
|
||||||
|
|
||||||
// filesrch.c
|
CV_RegisterVar(&cv_usejoystick[i]);
|
||||||
CV_RegisterVar(&cv_addons_option);
|
CV_RegisterVar(&cv_joyscale[i]);
|
||||||
CV_RegisterVar(&cv_addons_folder);
|
|
||||||
CV_RegisterVar(&cv_addons_md5);
|
|
||||||
CV_RegisterVar(&cv_addons_showall);
|
|
||||||
CV_RegisterVar(&cv_addons_search_type);
|
|
||||||
CV_RegisterVar(&cv_addons_search_case);
|
|
||||||
|
|
||||||
CV_RegisterVar(&cv_controlperkey);
|
|
||||||
CV_RegisterVar(&cv_turnsmooth);
|
|
||||||
|
|
||||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
|
||||||
{
|
|
||||||
CV_RegisterVar(&cv_rumble[i]);
|
CV_RegisterVar(&cv_rumble[i]);
|
||||||
CV_RegisterVar(&cv_gamepadled[i]);
|
CV_RegisterVar(&cv_gamepadled[i]);
|
||||||
CV_RegisterVar(&cv_ledpowerup[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CV_RegisterVar(&cv_usemouse);
|
CV_RegisterVar(&cv_usemouse);
|
||||||
CV_RegisterVar(&cv_invertmouse);
|
CV_RegisterVar(&cv_invertmouse);
|
||||||
CV_RegisterVar(&cv_mousesens);
|
CV_RegisterVar(&cv_mousesens);
|
||||||
CV_RegisterVar(&cv_mouseysens);
|
CV_RegisterVar(&cv_mouseysens);
|
||||||
//CV_RegisterVar(&cv_mousemove);
|
|
||||||
|
|
||||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
|
||||||
{
|
|
||||||
CV_RegisterVar(&cv_usejoystick[i]);
|
|
||||||
}
|
|
||||||
#ifdef LJOYSTICK
|
|
||||||
CV_RegisterVar(&cv_joyport);
|
|
||||||
CV_RegisterVar(&cv_joyport2);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
|
||||||
{
|
|
||||||
CV_RegisterVar(&cv_joyscale[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// s_sound.c
|
// s_sound.c
|
||||||
CV_RegisterVar(&cv_soundvolume);
|
CV_RegisterVar(&cv_soundvolume);
|
||||||
@@ -1033,7 +1014,7 @@ void D_RegisterClientCommands(void)
|
|||||||
CV_RegisterVar(&cv_midimusicvolume);
|
CV_RegisterVar(&cv_midimusicvolume);
|
||||||
#endif
|
#endif
|
||||||
CV_RegisterVar(&cv_numChannels);
|
CV_RegisterVar(&cv_numChannels);
|
||||||
|
|
||||||
#ifdef HAVE_OPENMPT
|
#ifdef HAVE_OPENMPT
|
||||||
CV_RegisterVar(&cv_modfilter);
|
CV_RegisterVar(&cv_modfilter);
|
||||||
CV_RegisterVar(&cv_stereosep);
|
CV_RegisterVar(&cv_stereosep);
|
||||||
@@ -1048,7 +1029,6 @@ void D_RegisterClientCommands(void)
|
|||||||
CV_RegisterVar(&cv_renderview);
|
CV_RegisterVar(&cv_renderview);
|
||||||
CV_RegisterVar(&cv_vhseffect);
|
CV_RegisterVar(&cv_vhseffect);
|
||||||
CV_RegisterVar(&cv_shittyscreen);
|
CV_RegisterVar(&cv_shittyscreen);
|
||||||
CV_RegisterVar(&cv_scr_depth);
|
|
||||||
CV_RegisterVar(&cv_scr_width);
|
CV_RegisterVar(&cv_scr_width);
|
||||||
CV_RegisterVar(&cv_scr_height);
|
CV_RegisterVar(&cv_scr_height);
|
||||||
|
|
||||||
@@ -1068,7 +1048,13 @@ void D_RegisterClientCommands(void)
|
|||||||
|
|
||||||
CV_RegisterVar(&cv_laglesscam);
|
CV_RegisterVar(&cv_laglesscam);
|
||||||
|
|
||||||
CV_RegisterVar(&cv_verticallook);
|
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||||
|
{
|
||||||
|
CV_RegisterVar(&cv_verticallook[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
CV_RegisterVar(&cv_demodateformat);
|
||||||
|
CV_RegisterVar(&cv_showspecstuff);
|
||||||
|
|
||||||
// ingame object placing
|
// ingame object placing
|
||||||
COM_AddCommand("objectplace", Command_ObjectPlace_f);
|
COM_AddCommand("objectplace", Command_ObjectPlace_f);
|
||||||
@@ -1103,8 +1089,6 @@ void D_RegisterClientCommands(void)
|
|||||||
CV_RegisterVar(&cv_discordasks);
|
CV_RegisterVar(&cv_discordasks);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CV_RegisterVar(&cv_showspecstuff);
|
|
||||||
|
|
||||||
COM_AddCommand("listskins", Command_ListSkins);
|
COM_AddCommand("listskins", Command_ListSkins);
|
||||||
COM_AddCommand("skinsearch", Command_SkinSearch);
|
COM_AddCommand("skinsearch", Command_SkinSearch);
|
||||||
}
|
}
|
||||||
@@ -1413,13 +1397,10 @@ static void SetPlayerName(INT32 playernum, char *newname)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
CONS_Printf(M_GetText("Player %d sent a bad name change\n"), playernum+1);
|
CONS_Printf(M_GetText("Player %d sent a bad name change\n"), playernum+1);
|
||||||
|
|
||||||
if (server && netgame)
|
if (server && netgame)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1774,24 +1755,8 @@ static void SendNameAndColor3(void)
|
|||||||
|
|
||||||
if ((foundskin = R_SkinAvailable(cv_skin3.string)) != -1)
|
if ((foundskin = R_SkinAvailable(cv_skin3.string)) != -1)
|
||||||
{
|
{
|
||||||
//boolean notsame;
|
|
||||||
|
|
||||||
cv_skin3.value = foundskin;
|
cv_skin3.value = foundskin;
|
||||||
|
|
||||||
//notsame = (cv_skin3.value != players[thirdplaya].skin);
|
|
||||||
|
|
||||||
SetPlayerSkin(thirdplaya, cv_skin3.string);
|
SetPlayerSkin(thirdplaya, cv_skin3.string);
|
||||||
|
|
||||||
// SRB2Kart
|
|
||||||
/*if (notsame)
|
|
||||||
{
|
|
||||||
CV_StealthSetValue(&cv_playercolor3, skins[players[thirdplaya].skin].prefcolor);
|
|
||||||
|
|
||||||
players[thirdplaya].skincolor = (cv_playercolor3.value&0x3F) % MAXSKINCOLORS;
|
|
||||||
|
|
||||||
if (players[thirdplaya].mo)
|
|
||||||
players[thirdplaya].mo->color = players[thirdplaya].skincolor;
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2013,12 +1978,8 @@ static void Got_NameAndColor(UINT8 **cp, INT32 playernum)
|
|||||||
|
|
||||||
if (kick)
|
if (kick)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal color change received from %s (team: %d), color: %d)\n"), player_names[playernum], p->ctfteam, p->skincolor);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal color change received from %s (team: %d), color: %d)\n"), player_names[playernum], p->ctfteam, p->skincolor);
|
||||||
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2107,6 +2068,7 @@ void D_SendPlayerConfig(void)
|
|||||||
SendNameAndColor3();
|
SendNameAndColor3();
|
||||||
if (splitscreen > 2)
|
if (splitscreen > 2)
|
||||||
SendNameAndColor4();
|
SendNameAndColor4();
|
||||||
|
|
||||||
SendWeaponPref();
|
SendWeaponPref();
|
||||||
if (splitscreen)
|
if (splitscreen)
|
||||||
SendWeaponPref2();
|
SendWeaponPref2();
|
||||||
@@ -2130,7 +2092,7 @@ static INT32 LookupPlayer(const char *s)
|
|||||||
if (*s == '0')/* clever way to bypass atoi */
|
if (*s == '0')/* clever way to bypass atoi */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (( playernum = atoi(s) ))
|
if ((playernum = atoi(s)))
|
||||||
{
|
{
|
||||||
playernum = max(min(playernum, MAXPLAYERS-1), 0);/* not out of range */
|
playernum = max(min(playernum, MAXPLAYERS-1), 0);/* not out of range */
|
||||||
return playernum;
|
return playernum;
|
||||||
@@ -2211,8 +2173,7 @@ static void Command_View_f(void)
|
|||||||
|
|
||||||
if (viewnum > 1 && !( multiplayer && demo.playback ))
|
if (viewnum > 1 && !( multiplayer && demo.playback ))
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_NOTICE,
|
CONS_Alert(CONS_NOTICE, "You must be viewing a multiplayer replay to use this.\n");
|
||||||
"You must be viewing a multiplayer replay to use this.\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2224,13 +2185,16 @@ static void Command_View_f(void)
|
|||||||
if (COM_Argc() > 1)/* switch to player */
|
if (COM_Argc() > 1)/* switch to player */
|
||||||
{
|
{
|
||||||
playerparam = COM_Argv(1);
|
playerparam = COM_Argv(1);
|
||||||
|
|
||||||
if (playerparam[0] == '#')/* search by placement */
|
if (playerparam[0] == '#')/* search by placement */
|
||||||
{
|
{
|
||||||
placenum = atoi(&playerparam[1]);
|
placenum = atoi(&playerparam[1]);
|
||||||
playernum = FindPlayerByPlace(placenum);
|
playernum = FindPlayerByPlace(placenum);
|
||||||
|
|
||||||
if (playernum == -1 || !G_CouldView(playernum))
|
if (playernum == -1 || !G_CouldView(playernum))
|
||||||
{
|
{
|
||||||
GetViewablePlayerPlaceRange(&firstplace, &lastplace);
|
GetViewablePlayerPlaceRange(&firstplace, &lastplace);
|
||||||
|
|
||||||
if (playernum == -1)
|
if (playernum == -1)
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_WARNING, "There is no player in that place! ");
|
CONS_Alert(CONS_WARNING, "There is no player in that place! ");
|
||||||
@@ -2242,6 +2206,7 @@ static void Command_View_f(void)
|
|||||||
"The first player that you can view is \x82#%d\x80; ",
|
"The first player that you can view is \x82#%d\x80; ",
|
||||||
firstplace);
|
firstplace);
|
||||||
}
|
}
|
||||||
|
|
||||||
CONS_Printf("Last place is \x82#%d\x80.\n", lastplace);
|
CONS_Printf("Last place is \x82#%d\x80.\n", lastplace);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2290,10 +2255,9 @@ static void Command_SetViews_f(void)
|
|||||||
UINT8 splits;
|
UINT8 splits;
|
||||||
UINT8 newsplits;
|
UINT8 newsplits;
|
||||||
|
|
||||||
if (!( demo.playback && multiplayer ))
|
if (!(demo.playback && multiplayer))
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_NOTICE,
|
CONS_Alert(CONS_NOTICE, "You must be viewing a multiplayer replay to use this.\n");
|
||||||
"You must be viewing a multiplayer replay to use this.\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2512,18 +2476,8 @@ void D_MapChange(INT32 mapnum, INT32 newgametype, boolean pencoremode, boolean r
|
|||||||
// Kick bot from special stages
|
// Kick bot from special stages
|
||||||
if (botskin)
|
if (botskin)
|
||||||
{
|
{
|
||||||
if (G_IsSpecialStage(mapnum))
|
if (!botingame)
|
||||||
{
|
{
|
||||||
if (botingame)
|
|
||||||
{
|
|
||||||
//CL_RemoveSplitscreenPlayer();
|
|
||||||
botingame = false;
|
|
||||||
playeringame[1] = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!botingame)
|
|
||||||
{
|
|
||||||
//CL_AddSplitscreenPlayer();
|
|
||||||
botingame = true;
|
botingame = true;
|
||||||
displayplayers[1] = 1;
|
displayplayers[1] = 1;
|
||||||
playeringame[1] = true;
|
playeringame[1] = true;
|
||||||
@@ -2596,6 +2550,7 @@ void D_PickVote(void)
|
|||||||
{
|
{
|
||||||
if (!playeringame[i] || players[i].spectator)
|
if (!playeringame[i] || players[i].spectator)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (votes[i] != -1)
|
if (votes[i] != -1)
|
||||||
{
|
{
|
||||||
temppicks[numvotes] = i;
|
temppicks[numvotes] = i;
|
||||||
@@ -2671,7 +2626,8 @@ static tic_t last_map_cmd = 0;
|
|||||||
//
|
//
|
||||||
static void Command_Map_f(void)
|
static void Command_Map_f(void)
|
||||||
{
|
{
|
||||||
if (I_GetTime() - last_map_cmd < 20) {
|
if (I_GetTime() - last_map_cmd < 20)
|
||||||
|
{
|
||||||
CONS_Alert(CONS_WARNING, "Map command is used too frequently!\n");
|
CONS_Alert(CONS_WARNING, "Map command is used too frequently!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2729,8 +2685,7 @@ static void Command_Map_f(void)
|
|||||||
{
|
{
|
||||||
if (!multiplayer)
|
if (!multiplayer)
|
||||||
{
|
{
|
||||||
CONS_Printf(M_GetText(
|
CONS_Printf(M_GetText("You can't switch gametypes in single player!\n"));
|
||||||
"You can't switch gametypes in single player!\n"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (COM_Argc() < option_gametype + 2)/* no argument after? */
|
else if (COM_Argc() < option_gametype + 2)/* no argument after? */
|
||||||
@@ -2899,11 +2854,7 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal map change received from %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal map change received from %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2944,9 +2895,6 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||||||
CON_LogMessage(M_GetText("Speeding off to level...\n"));
|
CON_LogMessage(M_GetText("Speeding off to level...\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (demo.playback && !demo.timing)
|
|
||||||
precache = false;
|
|
||||||
|
|
||||||
if (resetplayer)
|
if (resetplayer)
|
||||||
{
|
{
|
||||||
if (!FLS || (netgame || multiplayer))
|
if (!FLS || (netgame || multiplayer))
|
||||||
@@ -2962,8 +2910,7 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||||||
demo.savemode = (cv_recordmultiplayerdemos.value == 2) ? DSM_WILLAUTOSAVE : DSM_NOTSAVING;
|
demo.savemode = (cv_recordmultiplayerdemos.value == 2) ? DSM_WILLAUTOSAVE : DSM_NOTSAVING;
|
||||||
demo.savebutton = 0;
|
demo.savebutton = 0;
|
||||||
G_InitNew(pencoremode, mapname, resetplayer, skipprecutscene);
|
G_InitNew(pencoremode, mapname, resetplayer, skipprecutscene);
|
||||||
if (demo.playback && !demo.timing)
|
|
||||||
precache = true;
|
|
||||||
if (demo.timing)
|
if (demo.timing)
|
||||||
G_DoneLevelLoad();
|
G_DoneLevelLoad();
|
||||||
|
|
||||||
@@ -3022,11 +2969,7 @@ static void Got_Pause(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal pause command received from %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal pause command received from %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3071,18 +3014,25 @@ static void Command_ReplayMarker(void)
|
|||||||
CONS_Printf(M_GetText("You must be in a level to use this.\n"));
|
CONS_Printf(M_GetText("You must be in a level to use this.\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (demo.savemode == DSM_WILLAUTOSAVE) {
|
if (demo.savemode == DSM_WILLAUTOSAVE)
|
||||||
|
{
|
||||||
demo.savemode = DSM_NOTSAVING;
|
demo.savemode = DSM_NOTSAVING;
|
||||||
CONS_Printf("Replay unmarked.\n");
|
CONS_Printf("Replay unmarked.\n");
|
||||||
} else {
|
}
|
||||||
int adjustedleveltime = leveltime - starttime;
|
else
|
||||||
|
{
|
||||||
demo.savemode = DSM_WILLAUTOSAVE;
|
demo.savemode = DSM_WILLAUTOSAVE;
|
||||||
|
|
||||||
|
int adjustedleveltime = leveltime - starttime;
|
||||||
|
|
||||||
if (adjustedleveltime < 0)
|
if (adjustedleveltime < 0)
|
||||||
adjustedleveltime = 0;
|
adjustedleveltime = 0;
|
||||||
|
|
||||||
char *title = G_BuildMapTitle(gamemap);
|
char *title = G_BuildMapTitle(gamemap);
|
||||||
snprintf(demo.titlename, 64, "%s [%i:%02d/%.5s]", title, G_TicsToMinutes(adjustedleveltime, false), G_TicsToSeconds(adjustedleveltime), modeattacking ? "Record Attack" : connectedservername);
|
snprintf(demo.titlename, 64, "%s [%i:%02d/%.5s]", title, G_TicsToMinutes(adjustedleveltime, false), G_TicsToSeconds(adjustedleveltime), modeattacking ? "Record Attack" : connectedservername);
|
||||||
if (title)
|
if (title)
|
||||||
Z_Free(title);
|
Z_Free(title);
|
||||||
|
|
||||||
CONS_Printf("Replay will be saved!\n");
|
CONS_Printf("Replay will be saved!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3113,20 +3063,6 @@ static void Command_Respawn(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (!G_RaceGametype()) // srb2kart: not necessary, respawning makes you lose a bumper in battle, so it's not desirable to use as a way to escape a hit
|
|
||||||
{
|
|
||||||
CONS_Printf(M_GetText("You may only use this in co-op, race, and competition!\n"));
|
|
||||||
return;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// Retry is quicker. Probably should force people to use it.
|
|
||||||
// nope, this is srb2kart - a complete retry is overkill
|
|
||||||
/*if (!(netgame || multiplayer))
|
|
||||||
{
|
|
||||||
CONS_Printf(M_GetText("You can't use this in Single Player! Use \"retry\" instead.\n"));
|
|
||||||
return;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
SendNetXCmd(XD_RESPAWN, &buf, 4);
|
SendNetXCmd(XD_RESPAWN, &buf, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3140,11 +3076,7 @@ static void Got_Respawn(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal respawn command received from %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal respawn command received from %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3214,11 +3146,7 @@ static void Got_Clearscores(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal clear scores command received from %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal clear scores command received from %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3737,11 +3665,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3752,11 +3676,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3790,11 +3710,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -3843,12 +3759,8 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||||||
|
|
||||||
if (server && ((NetPacket.packet.newteam < 0 || NetPacket.packet.newteam > 3) || error))
|
if (server && ((NetPacket.packet.newteam < 0 || NetPacket.packet.newteam > 3) || error))
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Safety first!
|
//Safety first!
|
||||||
@@ -4217,11 +4129,7 @@ static void Got_Verification(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal verification received from %s (serverplayer is %s)\n"), player_names[playernum], player_names[serverplayer]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal verification received from %s (serverplayer is %s)\n"), player_names[playernum], player_names[serverplayer]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4273,11 +4181,7 @@ static void Got_Removal(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal demotion received from %s (serverplayer is %s)\n"), player_names[playernum], player_names[serverplayer]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal demotion received from %s (serverplayer is %s)\n"), player_names[playernum], player_names[serverplayer]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4353,11 +4257,7 @@ static void Got_MotD_f(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal motd change received from %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal motd change received from %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Z_Free(mymotd);
|
Z_Free(mymotd);
|
||||||
@@ -4416,11 +4316,7 @@ static void Got_RunSOCcmd(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal runsoc command received from %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal runsoc command received from %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4474,7 +4370,7 @@ static void Command_Addfilelocal(void)
|
|||||||
// Add any wad file, ignoring checks for if it contains complex things like
|
// Add any wad file, ignoring checks for if it contains complex things like
|
||||||
// lua. Great for complex but client-side customizations, like different
|
// lua. Great for complex but client-side customizations, like different
|
||||||
// level cards or anything like that.
|
// level cards or anything like that.
|
||||||
P_AddWadFileLocal(fn);
|
P_AddWadFile(fn, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -4569,38 +4465,9 @@ static void Command_Addfile(void)
|
|||||||
|
|
||||||
/** Adds something at runtime.
|
/** Adds something at runtime.
|
||||||
*/
|
*/
|
||||||
static void
|
static void Command_Addskins(void)
|
||||||
Command_Addskins (void)
|
|
||||||
{
|
{
|
||||||
if (COM_Argc() > 3)
|
CONS_Printf("addskins has been deprecated\nuse addfilelocal instead!\n");
|
||||||
{
|
|
||||||
CONS_Printf(
|
|
||||||
"addskins <file>: Load a skin file.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// no forcing?
|
|
||||||
/*
|
|
||||||
if (fasticmp(COM_Argv(2), "-force") || fasticmp(COM_Argv(2), "-f")) {
|
|
||||||
CONS_Alert(CONS_NOTICE, M_GetText("Adding file %s. May or may not be a skin.\n"), COM_Argv(1));
|
|
||||||
P_AddWadFile(COM_Argv(1), 0, true);
|
|
||||||
} else {
|
|
||||||
if (DumbStartsWith("KC_", COM_Argv(1))) {
|
|
||||||
P_AddWadFile(COM_Argv(1), 0, true);
|
|
||||||
} else if (DumbStartsWith("KCL_", COM_Argv(1))) {
|
|
||||||
if (!demo.playback) {
|
|
||||||
CONS_Alert(CONS_ERROR, M_GetText("Cannot add file %s as it is a skin with lua. Include -force or -f to force it to load.\n"), COM_Argv(1));
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
*/
|
|
||||||
P_AddWadFile(COM_Argv(1), true);
|
|
||||||
/*
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
CONS_Alert(CONS_ERROR, M_GetText("Cannot add file %s as it is not a skin.\n"), COM_Argv(1));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Command_GLocalSkin (void)
|
static void Command_GLocalSkin (void)
|
||||||
@@ -4616,7 +4483,7 @@ static void Command_GLocalSkin (void)
|
|||||||
|
|
||||||
char* fuck; // local skin name
|
char* fuck; // local skin name
|
||||||
|
|
||||||
if (!( first_option = COM_FirstOption() ))
|
if (!(first_option = COM_FirstOption()))
|
||||||
first_option = COM_Argc();
|
first_option = COM_Argc();
|
||||||
|
|
||||||
if (first_option < 2)
|
if (first_option < 2)
|
||||||
@@ -4624,14 +4491,14 @@ static void Command_GLocalSkin (void)
|
|||||||
/* holy fucking shit */
|
/* holy fucking shit */
|
||||||
CONS_Printf("localskin <name> [-player <name>] [-display <number>] [-all]:\n");
|
CONS_Printf("localskin <name> [-player <name>] [-display <number>] [-all]:\n");
|
||||||
CONS_Printf(M_GetText("Set a localskin via its internal name (usually printed on the console).\n\n\
|
CONS_Printf(M_GetText("Set a localskin via its internal name (usually printed on the console).\n\n\
|
||||||
* Using \"-player\" will set a localskin to a specified player.\n\
|
* Using \"-player\" will set a localskin to a specified player.\n\
|
||||||
Defaults to yourself.\n\
|
Defaults to yourself.\n\
|
||||||
* Using \"-display\" will set a localskin to the displayed player.\n\
|
* Using \"-display\" will set a localskin to the displayed player.\n\
|
||||||
Defaults to 0, which is the first player displayed.\n\
|
Defaults to 0, which is the first player displayed.\n\
|
||||||
Can go up to 3 for splitscreen.\n\
|
Can go up to 3 for splitscreen.\n\
|
||||||
* Using \"-all\" will set a localskin to ALL players.\n\
|
* Using \"-all\" will set a localskin to ALL players.\n\
|
||||||
* \"localskin none\" removes the localskin, just like how\n\
|
* \"localskin none\" removes the localskin, just like how\n\
|
||||||
\"forceskin none\" does.\n"));
|
\"forceskin none\" does.\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4662,7 +4529,7 @@ static void Command_GLocalSkin (void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; ++i)
|
for (i = 0; i < MAXPLAYERS; ++i)
|
||||||
{
|
{
|
||||||
if (!playeringame[i])
|
if (!playeringame[i])
|
||||||
continue;
|
continue;
|
||||||
@@ -4729,13 +4596,8 @@ static void Got_RequestAddfilecmd(UINT8 **cp, INT32 playernum)
|
|||||||
|
|
||||||
if ((playernum != serverplayer && !IsPlayerAdmin(playernum)) || kick)
|
if ((playernum != serverplayer && !IsPlayerAdmin(playernum)) || kick)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
|
||||||
|
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal addfile command received from %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal addfile command received from %s\n"), player_names[playernum]);
|
||||||
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4784,11 +4646,7 @@ static void Got_Addfilecmd(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal addfile command received from %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal addfile command received from %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5598,11 +5456,7 @@ static void Got_ExitLevelcmd(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal exitlevel command received from %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal exitlevel command received from %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5620,11 +5474,7 @@ static void Got_SetupVotecmd(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal vote setup received from %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal vote setup received from %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5685,11 +5535,7 @@ static void Got_PickVotecmd(UINT8 **cp, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal vote setup received from %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal vote setup received from %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5732,6 +5578,7 @@ void Command_ExitGame_f(void)
|
|||||||
botskin = 0;
|
botskin = 0;
|
||||||
cv_debug = 0;
|
cv_debug = 0;
|
||||||
emeralds = 0;
|
emeralds = 0;
|
||||||
|
automapactive = false;
|
||||||
|
|
||||||
if (dirmenu)
|
if (dirmenu)
|
||||||
closefilemenu(true);
|
closefilemenu(true);
|
||||||
@@ -5778,12 +5625,8 @@ static void Fishcake_OnChange(void)
|
|||||||
*/
|
*/
|
||||||
static void Command_Isgamemodified_f(void)
|
static void Command_Isgamemodified_f(void)
|
||||||
{
|
{
|
||||||
if (majormods)
|
if (majormods || modifiedgame)
|
||||||
CONS_Printf("The game has been modified with major addons, so you cannot play Record Attack.\n");
|
CONS_Printf("The game has been modified, Record Attack data will be saved to a seperate savegame.\n");
|
||||||
else if (savemoddata)
|
|
||||||
CONS_Printf("The game has been modified with an addon with its own save data, so you can play Record Attack and earn medals.\n");
|
|
||||||
else if (modifiedgame)
|
|
||||||
CONS_Printf("The game has been modified with only minor addons. You can play Record Attack, earn medals and unlock extras.\n");
|
|
||||||
else
|
else
|
||||||
CONS_Printf("The game has not been modified. You can play Record Attack, earn medals and unlock extras.\n");
|
CONS_Printf("The game has not been modified. You can play Record Attack, earn medals and unlock extras.\n");
|
||||||
}
|
}
|
||||||
@@ -6073,7 +5916,7 @@ static void Command_ListSkins(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void Command_SkinSearch(void)
|
static void Command_SkinSearch(void)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
UINT16 s;
|
UINT16 s;
|
||||||
UINT16 ic = 0;
|
UINT16 ic = 0;
|
||||||
@@ -6083,7 +5926,7 @@ static void Command_SkinSearch(void)
|
|||||||
{
|
{
|
||||||
skin_t *skininput = &skins[s];
|
skin_t *skininput = &skins[s];
|
||||||
if (strcasestr(skininput->realname,COM_Argv(i)))
|
if (strcasestr(skininput->realname,COM_Argv(i)))
|
||||||
{
|
{
|
||||||
ic++;
|
ic++;
|
||||||
CONS_Printf("%d. %s%s:\x80 %s\n", ic,HU_SkinColorToConsoleColor(skininput->prefcolor),skininput->realname,skininput->name);
|
CONS_Printf("%d. %s%s:\x80 %s\n", ic,HU_SkinColorToConsoleColor(skininput->prefcolor),skininput->realname,skininput->name);
|
||||||
}
|
}
|
||||||
@@ -6328,11 +6171,7 @@ void Got_DiscordInfo(UINT8 **p, INT32 playernum)
|
|||||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal Discord info command received from %s\n"), player_names[playernum]);
|
CONS_Alert(CONS_WARNING, M_GetText("Illegal Discord info command received from %s\n"), player_names[playernum]);
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
UINT8 buf[2];
|
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||||
|
|
||||||
buf[0] = (UINT8)playernum;
|
|
||||||
buf[1] = KICK_MSG_CON_FAIL;
|
|
||||||
SendNetXCmd(XD_KICK, &buf, 2);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-3
@@ -149,8 +149,9 @@ extern consvar_t cv_pingstyle;
|
|||||||
//extern consvar_t cv_smallpos;
|
//extern consvar_t cv_smallpos;
|
||||||
extern consvar_t cv_showminimapnames;
|
extern consvar_t cv_showminimapnames;
|
||||||
extern consvar_t cv_minihead;
|
extern consvar_t cv_minihead;
|
||||||
|
extern consvar_t cv_showminimapangle;
|
||||||
|
|
||||||
extern consvar_t cv_showlapemblem;
|
extern consvar_t cv_showlapemblem;
|
||||||
|
|
||||||
extern consvar_t cv_showviewpointtext;
|
extern consvar_t cv_showviewpointtext;
|
||||||
extern consvar_t cv_showdownloadprompt;
|
extern consvar_t cv_showdownloadprompt;
|
||||||
@@ -198,8 +199,6 @@ extern consvar_t cv_betainterscreen;
|
|||||||
|
|
||||||
extern consvar_t cv_laglesscam;
|
extern consvar_t cv_laglesscam;
|
||||||
|
|
||||||
extern consvar_t cv_verticallook;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
SKINMENUTYPE_SCROLL = 0,
|
SKINMENUTYPE_SCROLL = 0,
|
||||||
|
|||||||
+71
-60
@@ -64,11 +64,11 @@ static boolean SV_SendFile(INT32 node, const char *filename, UINT8 fileid);
|
|||||||
|
|
||||||
#ifdef HAVE_CURL
|
#ifdef HAVE_CURL
|
||||||
size_t curlwrite_data(void *ptr, size_t size, size_t nmemb, FILE *stream);
|
size_t curlwrite_data(void *ptr, size_t size, size_t nmemb, FILE *stream);
|
||||||
#if defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7, 35, 0)
|
#if (LIBCURL_VERSION_MAJOR <= 7) && (LIBCURL_VERSION_MINOR < 35)
|
||||||
|
static int curlprogress_callback(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow);
|
||||||
|
#else
|
||||||
static int curlprogress_callbackx(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow);
|
static int curlprogress_callbackx(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow);
|
||||||
#define XFERINFOFUNCTION
|
#define XFERINFOFUNCTION
|
||||||
#else
|
|
||||||
static int curlprogress_callback(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow);
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -114,24 +114,14 @@ fileneeded_t fileneeded[MAX_WADFILES]; // List of needed files
|
|||||||
static I_mutex downloadmutex;
|
static I_mutex downloadmutex;
|
||||||
char downloaddir[512] = "DOWNLOAD";
|
char downloaddir[512] = "DOWNLOAD";
|
||||||
|
|
||||||
#ifdef CLIENT_LOADINGSCREEN
|
file_download_t filedownload;
|
||||||
// for cl loading screen
|
|
||||||
INT32 lastfilenum = -1;
|
|
||||||
INT32 downloadcompletednum = 0;
|
|
||||||
UINT32 downloadcompletedsize = 0;
|
|
||||||
INT32 totalfilesrequestednum = 0;
|
|
||||||
UINT32 totalfilesrequestedsize = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CURL
|
#ifdef HAVE_CURL
|
||||||
static CURL *http_handle;
|
static CURL *http_handle;
|
||||||
static CURLM *multi_handle;
|
static CURLM *multi_handle;
|
||||||
boolean curl_running = false;
|
static UINT32 curl_dlnow;
|
||||||
boolean curl_failedwebdownload = false;
|
static UINT32 curl_dltotal;
|
||||||
static double curl_dlnow;
|
|
||||||
static double curl_dltotal;
|
|
||||||
static time_t curl_starttime;
|
static time_t curl_starttime;
|
||||||
INT32 curl_transfers = 0;
|
|
||||||
static int curl_runninghandles = 0;
|
static int curl_runninghandles = 0;
|
||||||
static UINT32 curl_origfilesize;
|
static UINT32 curl_origfilesize;
|
||||||
static UINT32 curl_origtotalfilesize;
|
static UINT32 curl_origtotalfilesize;
|
||||||
@@ -222,6 +212,7 @@ void D_ParseFileneeded(INT32 fileneedednum_parm, UINT8 *fileneededstr, UINT16 fi
|
|||||||
for (i = firstfile; i < fileneedednum; i++)
|
for (i = firstfile; i < fileneedednum; i++)
|
||||||
{
|
{
|
||||||
fileneeded[i].status = FS_NOTCHECKED; // We haven't even started looking for the file yet
|
fileneeded[i].status = FS_NOTCHECKED; // We haven't even started looking for the file yet
|
||||||
|
fileneeded[i].justdownloaded = false;
|
||||||
filestatus = READUINT8(p); // The first byte is the file status
|
filestatus = READUINT8(p); // The first byte is the file status
|
||||||
fileneeded[i].willsend = (UINT8)(filestatus >> 4);
|
fileneeded[i].willsend = (UINT8)(filestatus >> 4);
|
||||||
fileneeded[i].totalsize = READUINT32(p); // The four next bytes are the file size
|
fileneeded[i].totalsize = READUINT32(p); // The four next bytes are the file size
|
||||||
@@ -234,10 +225,11 @@ void D_ParseFileneeded(INT32 fileneedednum_parm, UINT8 *fileneededstr, UINT16 fi
|
|||||||
void CL_PrepareDownloadSaveGame(const char *tmpsave)
|
void CL_PrepareDownloadSaveGame(const char *tmpsave)
|
||||||
{
|
{
|
||||||
#ifdef CLIENT_LOADINGSCREEN
|
#ifdef CLIENT_LOADINGSCREEN
|
||||||
lastfilenum = -1;
|
filedownload.current = -1;
|
||||||
#endif
|
#endif
|
||||||
fileneedednum = 1;
|
fileneedednum = 1;
|
||||||
fileneeded[0].status = FS_REQUESTED;
|
fileneeded[0].status = FS_REQUESTED;
|
||||||
|
fileneeded[0].justdownloaded = false;
|
||||||
fileneeded[0].totalsize = UINT32_MAX;
|
fileneeded[0].totalsize = UINT32_MAX;
|
||||||
fileneeded[0].file = NULL;
|
fileneeded[0].file = NULL;
|
||||||
memset(fileneeded[0].md5sum, 0, 16);
|
memset(fileneeded[0].md5sum, 0, 16);
|
||||||
@@ -552,13 +544,13 @@ INT32 CL_CheckFiles(void)
|
|||||||
{
|
{
|
||||||
if (fileneeded[i].status == FS_NOTFOUND || fileneeded[i].status == FS_MD5SUMBAD || fileneeded[i].status == FS_FALLBACK)
|
if (fileneeded[i].status == FS_NOTFOUND || fileneeded[i].status == FS_MD5SUMBAD || fileneeded[i].status == FS_FALLBACK)
|
||||||
downloadrequired = true;
|
downloadrequired = true;
|
||||||
|
|
||||||
if (fileneeded[i].status != FS_OPEN)
|
if (fileneeded[i].status != FS_OPEN)
|
||||||
filestoload++;
|
filestoload++;
|
||||||
|
|
||||||
if (fileneeded[i].status != FS_NOTCHECKED) //since we're running this over multiple tics now, its possible for us to come across files checked in previous tics
|
if (fileneeded[i].status != FS_NOTCHECKED) //since we're running this over multiple tics now, its possible for us to come across files checked in previous tics
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
CONS_Debug(DBG_NETPLAY, "searching for '%s' ", fileneeded[i].filename);
|
CONS_Debug(DBG_NETPLAY, "searching for '%s' ", fileneeded[i].filename);
|
||||||
|
|
||||||
// Check in already loaded files
|
// Check in already loaded files
|
||||||
@@ -662,13 +654,10 @@ static boolean SV_SendFile(INT32 node, const char *filename, UINT8 fileid)
|
|||||||
q = &((*q)->next);
|
q = &((*q)->next);
|
||||||
|
|
||||||
// Allocate a file request and append it to the file list
|
// Allocate a file request and append it to the file list
|
||||||
p = *q = (filetx_t *)malloc(sizeof (filetx_t));
|
p = *q = (filetx_t *)calloc(1, sizeof(filetx_t)); // Initialise with zeros
|
||||||
if (!p)
|
if (!p)
|
||||||
I_Error("SV_SendFile: No more memory\n");
|
I_Error("SV_SendFile: No more memory\n");
|
||||||
|
|
||||||
// Initialise with zeros
|
|
||||||
memset(p, 0, sizeof (filetx_t));
|
|
||||||
|
|
||||||
// Allocate the file name
|
// Allocate the file name
|
||||||
p->id.filename = (char *)malloc(MAX_WADPATH);
|
p->id.filename = (char *)malloc(MAX_WADPATH);
|
||||||
if (!p->id.filename)
|
if (!p->id.filename)
|
||||||
@@ -747,13 +736,10 @@ void SV_SendRam(INT32 node, void *data, size_t size, freemethod_t freemethod, UI
|
|||||||
q = &((*q)->next);
|
q = &((*q)->next);
|
||||||
|
|
||||||
// Allocate a file request and append it to the file list
|
// Allocate a file request and append it to the file list
|
||||||
p = *q = (filetx_t *)malloc(sizeof (filetx_t));
|
p = *q = (filetx_t *)calloc(1, sizeof(filetx_t)); // Initialise with zeros
|
||||||
if (!p)
|
if (!p)
|
||||||
I_Error("SV_SendRam: No more memory\n");
|
I_Error("SV_SendRam: No more memory\n");
|
||||||
|
|
||||||
// Initialise with zeros
|
|
||||||
memset(p, 0, sizeof (filetx_t));
|
|
||||||
|
|
||||||
p->ram = freemethod; // Remember how to free the memory block for when we're done sending it
|
p->ram = freemethod; // Remember how to free the memory block for when we're done sending it
|
||||||
p->id.ram = data;
|
p->id.ram = data;
|
||||||
p->size = (UINT32)size;
|
p->size = (UINT32)size;
|
||||||
@@ -837,6 +823,7 @@ void SV_FileSendTicker(void)
|
|||||||
|
|
||||||
netbuffer->packettype = PT_FILEFRAGMENT;
|
netbuffer->packettype = PT_FILEFRAGMENT;
|
||||||
|
|
||||||
|
// (((sendbytes-nowsentbyte)*TICRATE)/(I_GetTime()-starttime)<(UINT32)net_bandwidth)
|
||||||
while (packetsent-- && filestosend != 0)
|
while (packetsent-- && filestosend != 0)
|
||||||
{
|
{
|
||||||
for (i = currentnode, j = 0; j < MAXNETNODES;
|
for (i = currentnode, j = 0; j < MAXNETNODES;
|
||||||
@@ -867,8 +854,12 @@ void SV_FileSendTicker(void)
|
|||||||
|
|
||||||
if (!transferFiles[f->fileid].file)
|
if (!transferFiles[f->fileid].file)
|
||||||
{
|
{
|
||||||
I_Error("Can't open file %s: %s",
|
CONS_Alert(CONS_ERROR, "Can't open file %s: %s\n",
|
||||||
f->id.filename, strerror(errno));
|
f->id.filename, strerror(errno));
|
||||||
|
|
||||||
|
SV_EndFileSend(i);
|
||||||
|
HSendPacket(i, true, 0, PT_SERVERREFUSE);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -973,7 +964,7 @@ void Got_Filetxpak(void)
|
|||||||
|
|
||||||
if (filenum >= fileneedednum)
|
if (filenum >= fileneedednum)
|
||||||
{
|
{
|
||||||
DEBFILE(va("fileframent not needed %d>%d\n", filenum, fileneedednum));
|
DEBFILE(va("filefragment not needed %d>%d\n", filenum, fileneedednum));
|
||||||
//I_Error("Received an unneeded file fragment (file id received: %d, file id needed: %d)\n", filenum, fileneedednum);
|
//I_Error("Received an unneeded file fragment (file id received: %d, file id needed: %d)\n", filenum, fileneedednum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -994,6 +985,7 @@ void Got_Filetxpak(void)
|
|||||||
{
|
{
|
||||||
UINT32 pos = LONG(netbuffer->u.filetxpak.position);
|
UINT32 pos = LONG(netbuffer->u.filetxpak.position);
|
||||||
UINT16 size = SHORT(netbuffer->u.filetxpak.size);
|
UINT16 size = SHORT(netbuffer->u.filetxpak.size);
|
||||||
|
|
||||||
// Use a special trick to know when the file is complete (not always used)
|
// Use a special trick to know when the file is complete (not always used)
|
||||||
// WARNING: file fragments can arrive out of order so don't stop yet!
|
// WARNING: file fragments can arrive out of order so don't stop yet!
|
||||||
if (pos & 0x80000000)
|
if (pos & 0x80000000)
|
||||||
@@ -1013,15 +1005,16 @@ void Got_Filetxpak(void)
|
|||||||
fclose(file->file);
|
fclose(file->file);
|
||||||
file->file = NULL;
|
file->file = NULL;
|
||||||
file->status = FS_FOUND;
|
file->status = FS_FOUND;
|
||||||
|
file->justdownloaded = true;
|
||||||
CONS_Printf(M_GetText("Downloading %s...(done)\n"),
|
CONS_Printf(M_GetText("Downloading %s...(done)\n"),
|
||||||
filename);
|
filename);
|
||||||
#ifndef NONET
|
#ifndef NONET
|
||||||
downloadcompletednum++;
|
filedownload.completednum++;
|
||||||
downloadcompletedsize += file->totalsize;
|
filedownload.completedsize += file->totalsize;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (!file->justdownloaded)
|
||||||
{
|
{
|
||||||
const char *s;
|
const char *s;
|
||||||
switch(file->status)
|
switch(file->status)
|
||||||
@@ -1044,6 +1037,7 @@ void Got_Filetxpak(void)
|
|||||||
}
|
}
|
||||||
I_Error("Received a file not requested (file id: %d, file status: %s)\n", filenum, s);
|
I_Error("Received a file not requested (file id: %d, file status: %s)\n", filenum, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send ack back quickly
|
// Send ack back quickly
|
||||||
if (++filetime == 3)
|
if (++filetime == 3)
|
||||||
{
|
{
|
||||||
@@ -1052,7 +1046,7 @@ void Got_Filetxpak(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CLIENT_LOADINGSCREEN
|
#ifdef CLIENT_LOADINGSCREEN
|
||||||
lastfilenum = filenum;
|
filedownload.current = filenum;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1201,9 +1195,7 @@ filestatus_t findfile(char *filename, const UINT8 *wantedmd5sum, boolean complet
|
|||||||
#ifdef HAVE_CURL
|
#ifdef HAVE_CURL
|
||||||
size_t curlwrite_data(void *ptr, size_t size, size_t nmemb, FILE *stream)
|
size_t curlwrite_data(void *ptr, size_t size, size_t nmemb, FILE *stream)
|
||||||
{
|
{
|
||||||
size_t written;
|
return fwrite(ptr, size, nmemb, stream);
|
||||||
written = fwrite(ptr, size, nmemb, stream);
|
|
||||||
return written;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XFERINFOFUNCTION
|
#ifdef XFERINFOFUNCTION
|
||||||
@@ -1217,12 +1209,12 @@ static int curlprogress_callbackx(void *clientp, curl_off_t dltotal, curl_off_t
|
|||||||
|
|
||||||
curtime = time(NULL);
|
curtime = time(NULL);
|
||||||
|
|
||||||
curl_dlnow = dlnow;
|
curl_dlnow = (UINT32)dlnow;
|
||||||
curl_dltotal = dltotal;
|
curl_dltotal = (UINT32)dltotal;
|
||||||
|
|
||||||
if (curtime > curl_starttime)
|
if (curtime > curl_starttime)
|
||||||
{
|
{
|
||||||
getbytes = curl_dlnow / (curtime - curl_starttime); // To-do: Make this more accurate???
|
getbytes = ((double)dlnow) / (curtime - curl_starttime); // To-do: Make this more accurate???
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1242,12 +1234,12 @@ static int curlprogress_callback(void *clientp, double dltotal, double dlnow, do
|
|||||||
|
|
||||||
curtime = time(NULL);
|
curtime = time(NULL);
|
||||||
|
|
||||||
curl_dlnow = dlnow;
|
curl_dlnow = (UINT32)dlnow;
|
||||||
curl_dltotal = dltotal;
|
curl_dltotal = (UINT32)dltotal;
|
||||||
|
|
||||||
if (curtime > curl_starttime)
|
if (curtime > curl_starttime)
|
||||||
{
|
{
|
||||||
getbytes = curl_dlnow / (curtime - curl_starttime); // To-do: Make this more accurate???
|
getbytes = ((double)dlnow) / (curtime - curl_starttime); // To-do: Make this more accurate???
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1289,10 +1281,10 @@ void CURLPrepareFile(const char* url, int dfilenum)
|
|||||||
curl_easy_setopt(http_handle, CURLOPT_URL, va("%s/%s", url, curl_realname));
|
curl_easy_setopt(http_handle, CURLOPT_URL, va("%s/%s", url, curl_realname));
|
||||||
|
|
||||||
// Only allow HTTP and HTTPS
|
// Only allow HTTP and HTTPS
|
||||||
#if defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7, 85, 0)
|
#if (LIBCURL_VERSION_MAJOR <= 7) && (LIBCURL_VERSION_MINOR < 85)
|
||||||
curl_easy_setopt(http_handle, CURLOPT_PROTOCOLS_STR, "http,https");
|
|
||||||
#else
|
|
||||||
curl_easy_setopt(http_handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS);
|
curl_easy_setopt(http_handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS);
|
||||||
|
#else
|
||||||
|
curl_easy_setopt(http_handle, CURLOPT_PROTOCOLS_STR, "http,https");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
curl_easy_setopt(http_handle, CURLOPT_USERAGENT, va("SRB2Kart/v%d.%d", VERSION, SUBVERSION)); // Set user agent as some servers won't accept invalid user agents.
|
curl_easy_setopt(http_handle, CURLOPT_USERAGENT, va("SRB2Kart/v%d.%d", VERSION, SUBVERSION)); // Set user agent as some servers won't accept invalid user agents.
|
||||||
@@ -1314,6 +1306,21 @@ void CURLPrepareFile(const char* url, int dfilenum)
|
|||||||
|
|
||||||
strcatbf(curl_curfile->filename, downloaddir, "/");
|
strcatbf(curl_curfile->filename, downloaddir, "/");
|
||||||
curl_curfile->file = fopen(curl_curfile->filename, "wb");
|
curl_curfile->file = fopen(curl_curfile->filename, "wb");
|
||||||
|
|
||||||
|
if (!curl_curfile->file)
|
||||||
|
{
|
||||||
|
CONS_Alert(CONS_ERROR, "Couldnt open %s for writing!\nAborting file download.\nCheck if you have write access to your download folder!\n", curl_curfile->filename);
|
||||||
|
CL_AbortConnection();
|
||||||
|
M_StartMessage(M_GetText(
|
||||||
|
"An error occured when trying to\n"
|
||||||
|
"download missing addons.\n"
|
||||||
|
"See the console or log file\n"
|
||||||
|
"for additional details.\n\n"
|
||||||
|
"Press ESC\n"
|
||||||
|
), NULL, MM_NOTHING);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
curl_easy_setopt(http_handle, CURLOPT_WRITEDATA, curl_curfile->file);
|
curl_easy_setopt(http_handle, CURLOPT_WRITEDATA, curl_curfile->file);
|
||||||
curl_easy_setopt(http_handle, CURLOPT_WRITEFUNCTION, curlwrite_data);
|
curl_easy_setopt(http_handle, CURLOPT_WRITEFUNCTION, curlwrite_data);
|
||||||
curl_easy_setopt(http_handle, CURLOPT_NOPROGRESS, 0L);
|
curl_easy_setopt(http_handle, CURLOPT_NOPROGRESS, 0L);
|
||||||
@@ -1324,23 +1331,25 @@ void CURLPrepareFile(const char* url, int dfilenum)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
curl_curfile->status = FS_DOWNLOADING;
|
curl_curfile->status = FS_DOWNLOADING;
|
||||||
lastfilenum = dfilenum;
|
|
||||||
curl_multi_add_handle(multi_handle, http_handle);
|
curl_multi_add_handle(multi_handle, http_handle);
|
||||||
|
|
||||||
curl_multi_perform(multi_handle, &curl_runninghandles);
|
curl_multi_perform(multi_handle, &curl_runninghandles);
|
||||||
curl_starttime = time(NULL);
|
curl_starttime = time(NULL);
|
||||||
|
|
||||||
curl_running = true;
|
filedownload.current = dfilenum;
|
||||||
|
filedownload.http_running = true;
|
||||||
|
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
I_spawn_thread("http-download", (I_thread_fn)CURLGetFile, NULL);
|
I_spawn_thread("http-download", (I_thread_fn)CURLGetFile, NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
filedownload.http_running = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CURLAbortFile(void)
|
void CURLAbortFile(void)
|
||||||
{
|
{
|
||||||
curl_running = false;
|
filedownload.http_running = false;
|
||||||
|
|
||||||
// lock and unlock to wait for the download thread to exit
|
// lock and unlock to wait for the download thread to exit
|
||||||
I_lock_mutex(&downloadmutex);
|
I_lock_mutex(&downloadmutex);
|
||||||
@@ -1357,10 +1366,8 @@ void CURLGetFile(void)
|
|||||||
int msgs_left; /* how many messages are left */
|
int msgs_left; /* how many messages are left */
|
||||||
const char *easy_handle_error;
|
const char *easy_handle_error;
|
||||||
boolean running = true;
|
boolean running = true;
|
||||||
long response_code = 0;
|
|
||||||
static char *filename;
|
|
||||||
|
|
||||||
while (running && curl_running)
|
while (running && filedownload.http_running)
|
||||||
{
|
{
|
||||||
if (curl_runninghandles)
|
if (curl_runninghandles)
|
||||||
{
|
{
|
||||||
@@ -1374,6 +1381,7 @@ void CURLGetFile(void)
|
|||||||
CONS_Alert(CONS_WARNING, "curl_multi_wait() failed, code %d.\n", mc);
|
CONS_Alert(CONS_WARNING, "curl_multi_wait() failed, code %d.\n", mc);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
curl_curfile->currentsize = curl_dlnow;
|
curl_curfile->currentsize = curl_dlnow;
|
||||||
curl_curfile->totalsize = curl_dltotal;
|
curl_curfile->totalsize = curl_dltotal;
|
||||||
}
|
}
|
||||||
@@ -1387,11 +1395,13 @@ void CURLGetFile(void)
|
|||||||
e = m->easy_handle;
|
e = m->easy_handle;
|
||||||
easyres = m->data.result;
|
easyres = m->data.result;
|
||||||
|
|
||||||
filename = Z_StrDup(curl_realname);
|
char *filename = Z_StrDup(curl_realname);
|
||||||
nameonly(filename);
|
nameonly(filename);
|
||||||
|
|
||||||
if (easyres != CURLE_OK)
|
if (easyres != CURLE_OK)
|
||||||
{
|
{
|
||||||
|
long response_code = 0;
|
||||||
|
|
||||||
if (easyres == CURLE_HTTP_RETURNED_ERROR)
|
if (easyres == CURLE_HTTP_RETURNED_ERROR)
|
||||||
curl_easy_getinfo(e, CURLINFO_RESPONSE_CODE, &response_code);
|
curl_easy_getinfo(e, CURLINFO_RESPONSE_CODE, &response_code);
|
||||||
|
|
||||||
@@ -1399,7 +1409,7 @@ void CURLGetFile(void)
|
|||||||
curl_curfile->status = FS_FALLBACK;
|
curl_curfile->status = FS_FALLBACK;
|
||||||
curl_curfile->currentsize = curl_origfilesize;
|
curl_curfile->currentsize = curl_origfilesize;
|
||||||
curl_curfile->totalsize = curl_origtotalfilesize;
|
curl_curfile->totalsize = curl_origtotalfilesize;
|
||||||
curl_failedwebdownload = true;
|
filedownload.http_failed = true;
|
||||||
fclose(curl_curfile->file);
|
fclose(curl_curfile->file);
|
||||||
remove(curl_curfile->filename);
|
remove(curl_curfile->filename);
|
||||||
CONS_Printf(M_GetText("Failed to download %s (%s)\n"), filename, easy_handle_error);
|
CONS_Printf(M_GetText("Failed to download %s (%s)\n"), filename, easy_handle_error);
|
||||||
@@ -1412,36 +1422,37 @@ void CURLGetFile(void)
|
|||||||
{
|
{
|
||||||
CONS_Alert(CONS_ERROR, M_GetText("HTTP Download of %s finished but is corrupt or has been modified\n"), filename);
|
CONS_Alert(CONS_ERROR, M_GetText("HTTP Download of %s finished but is corrupt or has been modified\n"), filename);
|
||||||
curl_curfile->status = FS_FALLBACK;
|
curl_curfile->status = FS_FALLBACK;
|
||||||
curl_failedwebdownload = true;
|
filedownload.http_failed = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CONS_Printf(M_GetText("Finished HTTP download of %s\n"), filename);
|
CONS_Printf(M_GetText("Finished HTTP download of %s\n"), filename);
|
||||||
downloadcompletednum++;
|
filedownload.completednum++;
|
||||||
downloadcompletedsize += curl_curfile->totalsize;
|
filedownload.completedsize += curl_curfile->totalsize;
|
||||||
curl_curfile->status = FS_FOUND;
|
curl_curfile->status = FS_FOUND;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Z_Free(filename);
|
Z_Free(filename);
|
||||||
curl_curfile->file = NULL;
|
curl_curfile->file = NULL;
|
||||||
curl_transfers--;
|
filedownload.remaining--;
|
||||||
curl_multi_remove_handle(multi_handle, e);
|
curl_multi_remove_handle(multi_handle, e);
|
||||||
curl_easy_cleanup(e);
|
curl_easy_cleanup(e);
|
||||||
|
|
||||||
if (!curl_transfers)
|
if (!filedownload.remaining)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!curl_transfers || !curl_running)
|
if (!filedownload.remaining || !filedownload.http_running)
|
||||||
{
|
{
|
||||||
curl_multi_cleanup(multi_handle);
|
curl_multi_cleanup(multi_handle);
|
||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
multi_handle = NULL;
|
multi_handle = NULL;
|
||||||
}
|
}
|
||||||
curl_running = false;
|
|
||||||
|
filedownload.http_running = false;
|
||||||
I_unlock_mutex(downloadmutex);
|
I_unlock_mutex(downloadmutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+20
-8
@@ -13,6 +13,7 @@
|
|||||||
#ifndef __D_NETFIL__
|
#ifndef __D_NETFIL__
|
||||||
#define __D_NETFIL__
|
#define __D_NETFIL__
|
||||||
|
|
||||||
|
#include "d_clisrv.h"
|
||||||
#include "w_wad.h"
|
#include "w_wad.h"
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
@@ -45,24 +46,35 @@ typedef struct
|
|||||||
UINT32 currentsize;
|
UINT32 currentsize;
|
||||||
UINT32 totalsize;
|
UINT32 totalsize;
|
||||||
filestatus_t status; // The value returned by recsearch
|
filestatus_t status; // The value returned by recsearch
|
||||||
|
boolean justdownloaded; // To prevent late fragments from causing an I_Error
|
||||||
} fileneeded_t;
|
} fileneeded_t;
|
||||||
|
|
||||||
extern INT32 fileneedednum;
|
extern INT32 fileneedednum;
|
||||||
extern fileneeded_t fileneeded[MAX_WADFILES];
|
extern fileneeded_t fileneeded[MAX_WADFILES];
|
||||||
extern char downloaddir[512];
|
extern char downloaddir[512];
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
#ifdef CLIENT_LOADINGSCREEN
|
#ifdef CLIENT_LOADINGSCREEN
|
||||||
extern INT32 lastfilenum;
|
INT32 current;
|
||||||
extern INT32 downloadcompletednum;
|
INT32 completednum;
|
||||||
extern UINT32 downloadcompletedsize;
|
UINT32 completedsize;
|
||||||
extern INT32 totalfilesrequestednum;
|
INT32 totalnum;
|
||||||
extern UINT32 totalfilesrequestedsize;
|
UINT32 totalsize;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CURL
|
#ifdef HAVE_CURL
|
||||||
extern boolean curl_failedwebdownload;
|
INT32 remaining;
|
||||||
extern boolean curl_running;
|
boolean http_failed;
|
||||||
extern INT32 curl_transfers;
|
boolean http_running;
|
||||||
|
|
||||||
|
char http_source[MAX_MIRROR_LENGTH+1];
|
||||||
|
#endif
|
||||||
|
} file_download_t;
|
||||||
|
|
||||||
|
extern file_download_t filedownload;
|
||||||
|
|
||||||
|
#ifdef HAVE_CURL
|
||||||
|
|
||||||
typedef struct HTTP_login HTTP_login;
|
typedef struct HTTP_login HTTP_login;
|
||||||
|
|
||||||
|
|||||||
+13
-1
@@ -356,6 +356,16 @@ typedef enum
|
|||||||
LAP__MAX
|
LAP__MAX
|
||||||
} laptime_e;
|
} laptime_e;
|
||||||
|
|
||||||
|
// yes i made a whole struct for this :chonkbuncle:
|
||||||
|
typedef struct squishdance_s
|
||||||
|
{
|
||||||
|
tic_t countdown; // hold "custom 3" for 2 seconds to engange le dance
|
||||||
|
tic_t time;
|
||||||
|
fixed_t work;
|
||||||
|
fixed_t ang;
|
||||||
|
fixed_t bounce; // hehe squishy
|
||||||
|
} squishdance_t;
|
||||||
|
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
// PLAYER STRUCTURE
|
// PLAYER STRUCTURE
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
@@ -402,7 +412,7 @@ typedef struct player_s
|
|||||||
INT32 kartstuff[NUMKARTSTUFF];
|
INT32 kartstuff[NUMKARTSTUFF];
|
||||||
angle_t frameangle; // for the player add the ability to have the sprite only face other angles
|
angle_t frameangle; // for the player add the ability to have the sprite only face other angles
|
||||||
angle_t old_frameangle, old_frameangle2;
|
angle_t old_frameangle, old_frameangle2;
|
||||||
|
|
||||||
// SRB2Kart CEP: Sliptide rolling
|
// SRB2Kart CEP: Sliptide rolling
|
||||||
angle_t sliproll;
|
angle_t sliproll;
|
||||||
|
|
||||||
@@ -555,6 +565,8 @@ typedef struct player_s
|
|||||||
|
|
||||||
fixed_t spinoutrot; // When a player spins out, this value increments modulus 360.
|
fixed_t spinoutrot; // When a player spins out, this value increments modulus 360.
|
||||||
|
|
||||||
|
squishdance_t squishdance;
|
||||||
|
|
||||||
fixed_t fovadd; // adjust FOV for hw rendering
|
fixed_t fovadd; // adjust FOV for hw rendering
|
||||||
} player_t;
|
} player_t;
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
#ifndef __D_THINK__
|
#ifndef __D_THINK__
|
||||||
#define __D_THINK__
|
#define __D_THINK__
|
||||||
|
|
||||||
|
#include "doomdef.h"
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma interface
|
#pragma interface
|
||||||
#endif
|
#endif
|
||||||
@@ -50,6 +52,10 @@ typedef struct thinker_s
|
|||||||
// this one using pointers. Used for garbage collection.
|
// this one using pointers. Used for garbage collection.
|
||||||
INT32 references;
|
INT32 references;
|
||||||
boolean cachable;
|
boolean cachable;
|
||||||
|
#ifdef PARANOIA
|
||||||
|
INT32 debug_mobjtype;
|
||||||
|
tic_t debug_time;
|
||||||
|
#endif
|
||||||
} thinker_t;
|
} thinker_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
# Declare dedicated interface sources
|
||||||
|
|
||||||
|
target_sourcefile(c)
|
||||||
|
|
||||||
|
target_sources(SRB2SDL2 PRIVATE)
|
||||||
|
|
||||||
|
if(${CMAKE_SYSTEM} MATCHES Windows)
|
||||||
|
target_sources(SRB2SDL2 PRIVATE
|
||||||
|
../win32/win_dbg.c
|
||||||
|
../win32/Srb2win.rc)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${CMAKE_SYSTEM} MATCHES Windows)
|
||||||
|
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME srb2legacy)
|
||||||
|
elseif(${CMAKE_SYSTEM} MATCHES Linux)
|
||||||
|
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME lsrb2dlegacy)
|
||||||
|
else()
|
||||||
|
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME srb2legacy)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
||||||
|
find_library(CORE_LIB CoreFoundation)
|
||||||
|
target_link_libraries(SRB2SDL2 PRIVATE
|
||||||
|
${CORE_LIB}
|
||||||
|
${PNG_LIBRARIES}
|
||||||
|
${ZLIB_LIBRARIES}
|
||||||
|
)
|
||||||
|
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
|
||||||
|
else()
|
||||||
|
target_link_libraries(SRB2SDL2 PRIVATE
|
||||||
|
${PNG_LIBRARIES}
|
||||||
|
${ZLIB_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(${CMAKE_SYSTEM} MATCHES Linux)
|
||||||
|
target_link_libraries(SRB2SDL2 PRIVATE
|
||||||
|
m
|
||||||
|
rt
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#target_link_libraries(SRB2SDL2 PRIVATE SRB2Core)
|
||||||
|
|
||||||
|
set_target_properties(SRB2SDL2 PROPERTIES VERSION ${SRB2_VERSION})
|
||||||
|
|
||||||
|
if(${CMAKE_SYSTEM} MATCHES Windows)
|
||||||
|
target_link_libraries(SRB2SDL2 PRIVATE
|
||||||
|
ws2_32
|
||||||
|
)
|
||||||
|
target_compile_options(SRB2SDL2 PRIVATE
|
||||||
|
-U_WINDOWS
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(SRB2SDL2 PRIVATE
|
||||||
|
${PNG_INCLUDE_DIRS}
|
||||||
|
${ZLIB_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(SRB2SDL2 PRIVATE
|
||||||
|
-DDEDICATED
|
||||||
|
)
|
||||||
|
|
||||||
|
## strip debug symbols into separate file when using gcc
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||||
|
message(STATUS "Will make separate debug symbols in *.debug")
|
||||||
|
add_custom_command(TARGET SRB2SDL2 POST_BUILD
|
||||||
|
COMMAND ${OBJCOPY} --only-keep-debug $<TARGET_FILE:SRB2SDL2> $<TARGET_FILE:SRB2SDL2>.debug
|
||||||
|
COMMAND ${OBJCOPY} --strip-debug $<TARGET_FILE:SRB2SDL2>
|
||||||
|
COMMAND ${OBJCOPY} --add-gnu-debuglink=$<TARGET_FILE_NAME:SRB2SDL2>.debug $<TARGET_FILE:SRB2SDL2>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#### Installation ####
|
||||||
|
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
||||||
|
install(TARGETS SRB2SDL2
|
||||||
|
BUNDLE DESTINATION .
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
install(TARGETS SRB2SDL2 SRB2SDL2
|
||||||
|
RUNTIME DESTINATION .
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Mac bundle fixup
|
||||||
|
# HACK: THIS IS IMPORTANT! See the escaped \${CMAKE_INSTALL_PREFIX}? This
|
||||||
|
# makes it so that var is evaluated LATER during cpack, not right now!
|
||||||
|
# This fixes the quirk where the bundled libraries don't land in the final package
|
||||||
|
# https://cmake.org/pipermail/cmake/2011-March/043532.html
|
||||||
|
#
|
||||||
|
# HOWEVER: ${CPACK_PACKAGE_DESCRIPTION_SUMMARY} is NOT escaped, because that var
|
||||||
|
# is only available to us at this step. Read the link: ${CMAKE_INSTALL_PREFIX} at
|
||||||
|
# this current step points to the CMAKE build folder, NOT the folder that CPACK uses.
|
||||||
|
# Therefore, it makes sense to escape that var, but not the other.
|
||||||
|
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
||||||
|
install(CODE "
|
||||||
|
include(BundleUtilities)
|
||||||
|
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/${CPACK_PACKAGE_DESCRIPTION_SUMMARY}.app\"
|
||||||
|
\"\"
|
||||||
|
/Library/Frameworks
|
||||||
|
)"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(SRB2_SDL2_AVAILABLE YES PARENT_SCOPE)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
i_system.c
|
||||||
|
i_main.c
|
||||||
|
i_video.c
|
||||||
|
i_sound.c
|
||||||
|
i_threads.c
|
||||||
|
dosstr.c
|
||||||
|
endtxt.c
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
// Emacs style mode select -*- C++ -*-
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// This file is in the public domain.
|
||||||
|
// (Re)written by Graue in 2006.
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
/// \file
|
||||||
|
/// \brief String uppercasing/lowercasing functions for non-DOS non-Win32
|
||||||
|
/// systems
|
||||||
|
|
||||||
|
#include "../doomtype.h"
|
||||||
|
|
||||||
|
#ifndef HAVE_DOSSTR_FUNCS
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
int strupr(char *n)
|
||||||
|
{
|
||||||
|
while (*n != '\0')
|
||||||
|
{
|
||||||
|
*n = toupper(*n);
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int strlwr(char *n)
|
||||||
|
{
|
||||||
|
while (*n != '\0')
|
||||||
|
{
|
||||||
|
*n = tolower(*n);
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,234 @@
|
|||||||
|
/*
|
||||||
|
* Function to write the SRB2 end message text
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 by Udo Munk <udo@umserver.umnet.de>
|
||||||
|
*
|
||||||
|
* This code is provided AS IS and there are no guarantees, none.
|
||||||
|
* Feel free to share and modify.
|
||||||
|
*/
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
/// \file
|
||||||
|
/// \brief Support to show ENDOOM text
|
||||||
|
///
|
||||||
|
/// Loads the lump ENDOOM, set up the console to print
|
||||||
|
/// out the colors and text
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
// need this 19990118 by Kin
|
||||||
|
#include "../doomdef.h"
|
||||||
|
#include "../w_wad.h"
|
||||||
|
#include "../z_zone.h"
|
||||||
|
#include "endtxt.h"
|
||||||
|
/** \brief The ShowEndTxt function
|
||||||
|
|
||||||
|
|
||||||
|
Prints out the ENDOOM the way DOOM.EXE/DOOM2.EXE did for Win32 or Linux/GNU
|
||||||
|
|
||||||
|
\return void
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
void ShowEndTxt(void)
|
||||||
|
{
|
||||||
|
INT32 i;
|
||||||
|
UINT16 j, att = 0;
|
||||||
|
INT32 nlflag = 1;
|
||||||
|
#ifdef _WIN32
|
||||||
|
HANDLE co = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
|
DWORD mode, bytesWritten;
|
||||||
|
CONSOLE_SCREEN_BUFFER_INFO backupcon;
|
||||||
|
COORD resizewin = {80,-1};
|
||||||
|
CHAR let = 0;
|
||||||
|
#endif
|
||||||
|
UINT16 *ptext;
|
||||||
|
void *data;
|
||||||
|
lumpnum_t endoomnum = W_GetNumForName("ENDOOM");
|
||||||
|
//char *col;
|
||||||
|
|
||||||
|
/* if the xterm has more then 80 columns we need to add nl's */
|
||||||
|
/* doesn't work, COLUMNS is not in the environment at this time ???
|
||||||
|
col = I_getenv("COLUMNS");
|
||||||
|
if (col) {
|
||||||
|
if (atoi(col) > 80)
|
||||||
|
nlflag++;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* get the lump with the text */
|
||||||
|
data = ptext = W_CacheLumpNum(endoomnum, PU_CACHE);
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (co == INVALID_HANDLE_VALUE || GetFileType(co) != FILE_TYPE_CHAR || !GetConsoleMode(co, &mode)) // test if it a good handle
|
||||||
|
{
|
||||||
|
Z_Free(data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
backupcon.wAttributes = FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE; // Just in case
|
||||||
|
GetConsoleScreenBufferInfo(co, &backupcon); //Store old state
|
||||||
|
resizewin.Y = backupcon.dwSize.Y;
|
||||||
|
if (backupcon.dwSize.X < resizewin.X)
|
||||||
|
SetConsoleScreenBufferSize(co, resizewin);
|
||||||
|
|
||||||
|
for (i=1; i<=80*25; i++) // print 80x25 text and deal with the attributes too
|
||||||
|
{
|
||||||
|
j = (UINT16)(*ptext >> 8); // attribute first
|
||||||
|
let = (char)(*ptext & 0xff); // text second
|
||||||
|
if (j != att) // attribute changed?
|
||||||
|
{
|
||||||
|
att = j; // save current attribute
|
||||||
|
SetConsoleTextAttribute(co, j); //set fg and bg color for buffer
|
||||||
|
}
|
||||||
|
|
||||||
|
WriteConsoleA(co, &let, 1, &bytesWritten, NULL); // now the text
|
||||||
|
|
||||||
|
if (nlflag && !(i % 80) && backupcon.dwSize.X > resizewin.X) // do we need a nl?
|
||||||
|
{
|
||||||
|
att = backupcon.wAttributes;
|
||||||
|
SetConsoleTextAttribute(co, att); // all attributes off
|
||||||
|
WriteConsoleA(co, "\n", 1, &bytesWritten, NULL); // newline to console
|
||||||
|
}
|
||||||
|
ptext++;
|
||||||
|
}
|
||||||
|
SetConsoleTextAttribute(co, backupcon.wAttributes); // all attributes off
|
||||||
|
#else
|
||||||
|
/* print 80x25 text and deal with the attributes too */
|
||||||
|
for (i=1; i<=80*25; i++) {
|
||||||
|
/* attribute first */
|
||||||
|
/* attribute changed? */
|
||||||
|
if ((j = *ptext >> 8) != att) {
|
||||||
|
/* save current attribute */
|
||||||
|
att = j;
|
||||||
|
/* set new attribute, forground color first */
|
||||||
|
printf("\033[");
|
||||||
|
switch (j & 0x0f) {
|
||||||
|
case 0: /* black */
|
||||||
|
printf("30");
|
||||||
|
break;
|
||||||
|
case 1: /* blue */
|
||||||
|
printf("34");
|
||||||
|
break;
|
||||||
|
case 2: /* green */
|
||||||
|
printf("32");
|
||||||
|
break;
|
||||||
|
case 3: /* cyan */
|
||||||
|
printf("36");
|
||||||
|
break;
|
||||||
|
case 4: /* red */
|
||||||
|
printf("31");
|
||||||
|
break;
|
||||||
|
case 5: /* magenta */
|
||||||
|
printf("35");
|
||||||
|
break;
|
||||||
|
case 6: /* brown */
|
||||||
|
printf("33");
|
||||||
|
break;
|
||||||
|
case 7: /* bright grey */
|
||||||
|
printf("37");
|
||||||
|
break;
|
||||||
|
case 8: /* dark grey */
|
||||||
|
printf("1;30");
|
||||||
|
break;
|
||||||
|
case 9: /* bright blue */
|
||||||
|
printf("1;34");
|
||||||
|
break;
|
||||||
|
case 10: /* bright green */
|
||||||
|
printf("1;32");
|
||||||
|
break;
|
||||||
|
case 11: /* bright cyan */
|
||||||
|
printf("1;36");
|
||||||
|
break;
|
||||||
|
case 12: /* bright red */
|
||||||
|
printf("1;31");
|
||||||
|
break;
|
||||||
|
case 13: /* bright magenta */
|
||||||
|
printf("1;35");
|
||||||
|
break;
|
||||||
|
case 14: /* yellow */
|
||||||
|
printf("1;33");
|
||||||
|
break;
|
||||||
|
case 15: /* white */
|
||||||
|
printf("1;37");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
printf("m");
|
||||||
|
/* now background color */
|
||||||
|
printf("\033[");
|
||||||
|
switch ((j >> 4) & 0x0f) {
|
||||||
|
case 0: /* black */
|
||||||
|
printf("40");
|
||||||
|
break;
|
||||||
|
case 1: /* blue */
|
||||||
|
printf("44");
|
||||||
|
break;
|
||||||
|
case 2: /* green */
|
||||||
|
printf("42");
|
||||||
|
break;
|
||||||
|
case 3: /* cyan */
|
||||||
|
printf("46");
|
||||||
|
break;
|
||||||
|
case 4: /* red */
|
||||||
|
printf("41");
|
||||||
|
break;
|
||||||
|
case 5: /* magenta */
|
||||||
|
printf("45");
|
||||||
|
break;
|
||||||
|
case 6: /* brown */
|
||||||
|
printf("43");
|
||||||
|
break;
|
||||||
|
case 7: /* bright grey */
|
||||||
|
printf("47");
|
||||||
|
break;
|
||||||
|
case 8: /* dark grey */
|
||||||
|
printf("1;40");
|
||||||
|
break;
|
||||||
|
case 9: /* bright blue */
|
||||||
|
printf("1;44");
|
||||||
|
break;
|
||||||
|
case 10: /* bright green */
|
||||||
|
printf("1;42");
|
||||||
|
break;
|
||||||
|
case 11: /* bright cyan */
|
||||||
|
printf("1;46");
|
||||||
|
break;
|
||||||
|
case 12: /* bright red */
|
||||||
|
printf("1;41");
|
||||||
|
break;
|
||||||
|
case 13: /* bright magenta */
|
||||||
|
printf("1;45");
|
||||||
|
break;
|
||||||
|
case 14: /* yellow */
|
||||||
|
printf("1;43");
|
||||||
|
break;
|
||||||
|
case 15: /* white */
|
||||||
|
printf("1;47");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
printf("m");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* now the text */
|
||||||
|
printf("%c",*ptext++ & 0xff);
|
||||||
|
|
||||||
|
/* do we need a nl? */
|
||||||
|
if (nlflag)
|
||||||
|
{
|
||||||
|
if (!(i % 80))
|
||||||
|
{
|
||||||
|
printf("\033[0m");
|
||||||
|
att = 0;
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* all attributes off */
|
||||||
|
printf("\033[0m");
|
||||||
|
#endif
|
||||||
|
if (nlflag)
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
Z_Free(data);
|
||||||
|
}
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
// Emacs style mode select -*- C++ -*-
|
// Emacs style mode select -*- C++ -*-
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// libwad: Doom WAD format interface library.
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||||
// Copyright (C) 2011 by Callum Dickinson.
|
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU General Public License
|
// modify it under the terms of the GNU General Public License
|
||||||
@@ -14,21 +13,12 @@
|
|||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/// \file wad_static.h
|
/// \file
|
||||||
/// \brief Static header for internal libwad operations.
|
/// \brief Support to show ENDOOM text
|
||||||
|
|
||||||
#ifndef __WAD_STATIC_H__
|
#ifndef __ENDTXT__
|
||||||
#define __WAD_STATIC_H__
|
#define __ENDTXT__
|
||||||
|
|
||||||
#include <stdio.h>
|
void ShowEndTxt (void);
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include "../include/wad.h"
|
|
||||||
|
|
||||||
void WAD_ErrorSet(const char *text);
|
#endif
|
||||||
|
|
||||||
inline void WAD_FreeMemory(FILE *file, wadheader_t *header, void *lumpdir, lump_t *lumps, wad_t *wad);
|
|
||||||
|
|
||||||
#endif // __WAD_STATIC_H__
|
|
||||||
@@ -0,0 +1,238 @@
|
|||||||
|
// Emacs style mode select -*- C++ -*-
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||||
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 2
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
/// \file
|
||||||
|
/// \brief Main program, simply calls D_SRB2Main and D_SRB2Loop, the high level loop.
|
||||||
|
|
||||||
|
#include "../doomdef.h"
|
||||||
|
#include "../m_argv.h"
|
||||||
|
#include "../d_main.h"
|
||||||
|
#include "../m_misc.h" /* path shit */
|
||||||
|
#include "../i_system.h"
|
||||||
|
#include "../d_clisrv.h"
|
||||||
|
|
||||||
|
#if defined (__GNUC__) || defined (__unix__)
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __unix__
|
||||||
|
#include <errno.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "time.h" // For log timestamps
|
||||||
|
|
||||||
|
#ifdef HAVE_TTF
|
||||||
|
#include "i_ttf.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBBACKTRACE
|
||||||
|
#include <backtrace.h>
|
||||||
|
|
||||||
|
struct backtrace_state *bt_state = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LOGMESSAGES
|
||||||
|
FILE *logstream = NULL;
|
||||||
|
char logfilename[1024];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DOXYGEN
|
||||||
|
#ifndef O_TEXT
|
||||||
|
#define O_TEXT 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef O_SEQUENTIAL
|
||||||
|
#define O_SEQUENTIAL 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#ifndef _AMD64_
|
||||||
|
#include "exchndl.h"
|
||||||
|
#define DRMINGW
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (_WIN32)
|
||||||
|
#include "../win32/win_dbg.h"
|
||||||
|
typedef BOOL (WINAPI *p_IsDebuggerPresent)(VOID);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
static void
|
||||||
|
ChDirToExe (void)
|
||||||
|
{
|
||||||
|
CHAR path[MAX_PATH];
|
||||||
|
if (GetModuleFileNameA(NULL, path, MAX_PATH) > 0)
|
||||||
|
{
|
||||||
|
strrchr(path, '\\')[0] = '\0';
|
||||||
|
SetCurrentDirectoryA(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** \brief The main function
|
||||||
|
|
||||||
|
\param argc number of arg
|
||||||
|
\param *argv string table
|
||||||
|
|
||||||
|
\return int
|
||||||
|
*/
|
||||||
|
#if defined (__GNUC__) && (__GNUC__ >= 4)
|
||||||
|
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LOGMESSAGES
|
||||||
|
static void InitLogging(void)
|
||||||
|
{
|
||||||
|
const char *logdir = NULL;
|
||||||
|
time_t my_time;
|
||||||
|
struct tm * timeinfo;
|
||||||
|
const char *format;
|
||||||
|
const char *reldir;
|
||||||
|
int left;
|
||||||
|
boolean fileabs;
|
||||||
|
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
|
||||||
|
const char *link;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
logdir = D_Home();
|
||||||
|
|
||||||
|
my_time = time(NULL);
|
||||||
|
timeinfo = localtime(&my_time);
|
||||||
|
|
||||||
|
if (M_CheckParm("-logfile") && M_IsNextParm())
|
||||||
|
{
|
||||||
|
format = M_GetNextParm();
|
||||||
|
fileabs = M_IsPathAbsolute(format);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
format = "log-%Y-%m-%d_%H-%M-%S.txt";
|
||||||
|
fileabs = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fileabs)
|
||||||
|
{
|
||||||
|
strftime(logfilename, sizeof logfilename, format, timeinfo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (M_CheckParm("-logdir") && M_IsNextParm())
|
||||||
|
reldir = M_GetNextParm();
|
||||||
|
else
|
||||||
|
reldir = "logs";
|
||||||
|
|
||||||
|
if (M_IsPathAbsolute(reldir))
|
||||||
|
{
|
||||||
|
left = snprintf(logfilename, sizeof logfilename,
|
||||||
|
"%s"PATHSEP, reldir);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#ifdef DEFAULTDIR
|
||||||
|
if (logdir)
|
||||||
|
{
|
||||||
|
left = snprintf(logfilename, sizeof logfilename,
|
||||||
|
"%s"PATHSEP DEFAULTDIR PATHSEP"%s"PATHSEP, logdir, reldir);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif/*DEFAULTDIR*/
|
||||||
|
{
|
||||||
|
left = snprintf(logfilename, sizeof logfilename,
|
||||||
|
"."PATHSEP"%s"PATHSEP, reldir);
|
||||||
|
}
|
||||||
|
|
||||||
|
strftime(&logfilename[left], sizeof logfilename - left,
|
||||||
|
format, timeinfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
M_MkdirEachUntil(logfilename,
|
||||||
|
M_PathParts(logdir) - 1,
|
||||||
|
M_PathParts(logfilename) - 1, 0755);
|
||||||
|
|
||||||
|
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
|
||||||
|
logstream = fopen(logfilename, "w");
|
||||||
|
#ifdef DEFAULTDIR
|
||||||
|
if (logdir)
|
||||||
|
link = va("%s/"DEFAULTDIR"/latest-log.txt", logdir);
|
||||||
|
else
|
||||||
|
#endif/*DEFAULTDIR*/
|
||||||
|
link = "latest-log.txt";
|
||||||
|
unlink(link);
|
||||||
|
if (symlink(logfilename, link) == -1)
|
||||||
|
{
|
||||||
|
I_OutputMsg("Error symlinking latest-log.txt: %s\n", strerror(errno));
|
||||||
|
}
|
||||||
|
#else/*defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)*/
|
||||||
|
logstream = fopen("latest-log.txt", "wt+");
|
||||||
|
#endif/*defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)*/
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
myargc = argc;
|
||||||
|
myargv = argv; /// \todo pull out path to exe from this string
|
||||||
|
|
||||||
|
dedicated = true;
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBBACKTRACE
|
||||||
|
bt_state = backtrace_create_state(
|
||||||
|
argv[0],
|
||||||
|
#ifdef HAVE_THREADS
|
||||||
|
1,
|
||||||
|
#else
|
||||||
|
0,
|
||||||
|
#endif
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
ChDirToExe();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LOGMESSAGES
|
||||||
|
if (!M_CheckParm("-nolog"))
|
||||||
|
InitLogging();
|
||||||
|
#endif/*LOGMESSAGES*/
|
||||||
|
|
||||||
|
//I_OutputMsg("I_StartupSystem() ...\n");
|
||||||
|
I_StartupSystem();
|
||||||
|
#if defined (_WIN32)
|
||||||
|
{
|
||||||
|
#ifdef DRMINGW
|
||||||
|
ExcHndlInit();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// startup SRB2
|
||||||
|
CONS_Printf("Setting up SRB2Kart...\n");
|
||||||
|
D_SRB2Main();
|
||||||
|
CONS_Printf("Entering main game loop...\n");
|
||||||
|
// never return
|
||||||
|
D_SRB2Loop();
|
||||||
|
|
||||||
|
#ifdef BUGTRAP
|
||||||
|
// This is safe even if BT didn't start.
|
||||||
|
ShutdownBugTrap();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// return to OS
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,339 @@
|
|||||||
|
// Emacs style mode select -*- C++ -*-
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 2
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// The source is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
/// \file
|
||||||
|
/// \brief SDL interface for sound
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
#include "../doomdef.h"
|
||||||
|
#include "../i_sound.h"
|
||||||
|
#include "../s_sound.h"
|
||||||
|
|
||||||
|
/** \brief Sound subsystem runing and waiting
|
||||||
|
*/
|
||||||
|
UINT8 sound_started = false;
|
||||||
|
|
||||||
|
/** \brief The I_GetSfx function
|
||||||
|
|
||||||
|
\param sfx sfx to setup
|
||||||
|
|
||||||
|
\return data for sfx
|
||||||
|
*/
|
||||||
|
void *I_GetSfx(sfxinfo_t *sfx)
|
||||||
|
{
|
||||||
|
(void)sfx;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** \brief The I_FreeSfx function
|
||||||
|
|
||||||
|
\param sfx sfx to be freed up
|
||||||
|
|
||||||
|
\return void
|
||||||
|
*/
|
||||||
|
void I_FreeSfx(sfxinfo_t *sfx)
|
||||||
|
{
|
||||||
|
(void)sfx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** \brief Init at program start...
|
||||||
|
*/
|
||||||
|
void I_StartupSound(void){}
|
||||||
|
|
||||||
|
/** \brief ... shut down and relase at program termination.
|
||||||
|
*/
|
||||||
|
void I_ShutdownSound(void){}
|
||||||
|
|
||||||
|
/// ------------------------
|
||||||
|
/// SFX I/O
|
||||||
|
/// ------------------------
|
||||||
|
|
||||||
|
/** \brief Starts a sound in a particular sound channel.
|
||||||
|
\param id sfxid
|
||||||
|
\param vol volume for sound
|
||||||
|
\param sep left-right balancle
|
||||||
|
\param pitch not used
|
||||||
|
\param priority not used
|
||||||
|
|
||||||
|
\return sfx handle
|
||||||
|
*/
|
||||||
|
INT32 I_StartSound(sfxenum_t id, UINT8 vol, UINT8 sep, UINT8 pitch, UINT8 priority, INT32 channel)
|
||||||
|
{
|
||||||
|
(void)id;
|
||||||
|
(void)vol;
|
||||||
|
(void)sep;
|
||||||
|
(void)pitch;
|
||||||
|
(void)priority;
|
||||||
|
(void)channel;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** \brief Stops a sound channel.
|
||||||
|
|
||||||
|
\param handle stop sfx handle
|
||||||
|
|
||||||
|
\return void
|
||||||
|
*/
|
||||||
|
void I_StopSound(INT32 handle)
|
||||||
|
{
|
||||||
|
(void)handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** \brief Some digital sound drivers need this.
|
||||||
|
*/
|
||||||
|
void I_UpdateSound(void){}
|
||||||
|
|
||||||
|
/** \brief Called by S_*() functions to see if a channel is still playing.
|
||||||
|
|
||||||
|
\param handle sfx handle
|
||||||
|
|
||||||
|
\return 0 if no longer playing, 1 if playing.
|
||||||
|
*/
|
||||||
|
boolean I_SoundIsPlaying(INT32 handle)
|
||||||
|
{
|
||||||
|
(void)handle;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** \brief Updates the sfx handle
|
||||||
|
|
||||||
|
\param handle sfx handle
|
||||||
|
\param vol volume
|
||||||
|
\param sep separation
|
||||||
|
\param pitch ptich
|
||||||
|
|
||||||
|
\return void
|
||||||
|
*/
|
||||||
|
void I_UpdateSoundParams(INT32 handle, UINT8 vol, UINT8 sep, UINT8 pitch)
|
||||||
|
{
|
||||||
|
(void)handle;
|
||||||
|
(void)vol;
|
||||||
|
(void)sep;
|
||||||
|
(void)pitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** \brief The I_SetSfxVolume function
|
||||||
|
|
||||||
|
\param volume volume to set at
|
||||||
|
|
||||||
|
\return void
|
||||||
|
*/
|
||||||
|
void I_SetSfxVolume(UINT8 volume)
|
||||||
|
{
|
||||||
|
(void)volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// ------------------------
|
||||||
|
// MUSIC SYSTEM
|
||||||
|
/// ------------------------
|
||||||
|
|
||||||
|
/** \brief Init the music systems
|
||||||
|
*/
|
||||||
|
void I_InitMusic(void){}
|
||||||
|
|
||||||
|
/** \brief Shutdown the music systems
|
||||||
|
*/
|
||||||
|
void I_ShutdownMusic(void){}
|
||||||
|
|
||||||
|
/// ------------------------
|
||||||
|
// MUSIC PROPERTIES
|
||||||
|
/// ------------------------
|
||||||
|
|
||||||
|
musictype_t I_SongType(void)
|
||||||
|
{
|
||||||
|
return MU_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean I_SongPlaying(void)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean I_SongPaused(void)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// ------------------------
|
||||||
|
// MUSIC EFFECTS
|
||||||
|
/// ------------------------
|
||||||
|
|
||||||
|
boolean I_SetSongSpeed(float speed)
|
||||||
|
{
|
||||||
|
(void)speed;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// ------------------------
|
||||||
|
// MUSIC SEEKING
|
||||||
|
/// ------------------------
|
||||||
|
|
||||||
|
UINT32 I_GetSongLength(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean I_SetSongLoopPoint(UINT32 looppoint)
|
||||||
|
{
|
||||||
|
(void)looppoint;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT32 I_GetSongLoopPoint(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean I_SetSongPosition(UINT32 position)
|
||||||
|
{
|
||||||
|
(void)position;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT32 I_GetSongPosition(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// ------------------------
|
||||||
|
// MUSIC PLAYBACK
|
||||||
|
/// ------------------------
|
||||||
|
|
||||||
|
/** \brief Registers a song handle to song data.
|
||||||
|
|
||||||
|
\param data pointer to song data
|
||||||
|
\param len len of data
|
||||||
|
|
||||||
|
\return song handle
|
||||||
|
|
||||||
|
\todo Remove this
|
||||||
|
*/
|
||||||
|
boolean I_LoadSong(char *data, size_t len)
|
||||||
|
{
|
||||||
|
(void)data;
|
||||||
|
(void)len;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** \brief See ::I_LoadSong, then think backwards
|
||||||
|
|
||||||
|
\param handle song handle
|
||||||
|
|
||||||
|
\sa I_LoadSong
|
||||||
|
\todo remove midi handle
|
||||||
|
*/
|
||||||
|
void I_UnloadSong(void){}
|
||||||
|
|
||||||
|
/** \brief Called by anything that wishes to start music
|
||||||
|
|
||||||
|
\param handle Song handle
|
||||||
|
\param looping looping it if true
|
||||||
|
|
||||||
|
\return if true, it's playing the song
|
||||||
|
|
||||||
|
\todo pass music name, not handle
|
||||||
|
*/
|
||||||
|
boolean I_PlaySong(boolean looping)
|
||||||
|
{
|
||||||
|
(void)looping;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** \brief Stops a song over 3 seconds
|
||||||
|
|
||||||
|
\param handle Song handle
|
||||||
|
\return void
|
||||||
|
|
||||||
|
/todo drop handle
|
||||||
|
*/
|
||||||
|
void I_StopSong(void){}
|
||||||
|
|
||||||
|
/** \brief PAUSE game handling.
|
||||||
|
|
||||||
|
\param handle song handle
|
||||||
|
|
||||||
|
\return void
|
||||||
|
*/
|
||||||
|
void I_PauseSong(void){}
|
||||||
|
|
||||||
|
/** \brief RESUME game handling
|
||||||
|
|
||||||
|
\param handle song handle
|
||||||
|
|
||||||
|
\return void
|
||||||
|
*/
|
||||||
|
void I_ResumeSong(void){}
|
||||||
|
|
||||||
|
/** \brief The I_SetMusicVolume function
|
||||||
|
|
||||||
|
\param volume volume to set at
|
||||||
|
|
||||||
|
\return void
|
||||||
|
*/
|
||||||
|
void I_SetMusicVolume(UINT8 volume)
|
||||||
|
{
|
||||||
|
(void)volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean I_SetSongTrack(INT32 track)
|
||||||
|
{
|
||||||
|
(void)track;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// ------------------------
|
||||||
|
/// MUSIC FADING
|
||||||
|
/// ------------------------
|
||||||
|
|
||||||
|
void I_SetInternalMusicVolume(UINT8 volume)
|
||||||
|
{
|
||||||
|
(void)volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_StopFadingSong(void){}
|
||||||
|
|
||||||
|
boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void))
|
||||||
|
{
|
||||||
|
(void)target_volume;
|
||||||
|
(void)source_volume;
|
||||||
|
(void)ms;
|
||||||
|
(void)callback;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void))
|
||||||
|
{
|
||||||
|
(void)target_volume;
|
||||||
|
(void)ms;
|
||||||
|
(void)callback;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean I_FadeOutStopSong(UINT32 ms)
|
||||||
|
{
|
||||||
|
(void)ms;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean I_FadeInPlaySong(UINT32 ms, boolean looping)
|
||||||
|
{
|
||||||
|
(void)ms;
|
||||||
|
(void)looping;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_UpdateSongLagThreshold(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,364 @@
|
|||||||
|
// SONIC ROBO BLAST 2
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2020-2023 by James R.
|
||||||
|
//
|
||||||
|
// This program is free software distributed under the
|
||||||
|
// terms of the GNU General Public License, version 2.
|
||||||
|
// See the 'LICENSE' file for more details.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
/// \file i_threads.c
|
||||||
|
/// \brief Multithreading abstraction
|
||||||
|
|
||||||
|
#if defined (__unix__) || (!defined(__APPLE__) && defined (UNIXCOMMON))
|
||||||
|
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#include "../i_threads.h"
|
||||||
|
#include "../doomdef.h"
|
||||||
|
|
||||||
|
typedef struct thread_s thread_t;
|
||||||
|
|
||||||
|
struct thread_s
|
||||||
|
{
|
||||||
|
thread_t *next;
|
||||||
|
void *userdata;
|
||||||
|
I_thread_fn func;
|
||||||
|
pthread_t thread;
|
||||||
|
};
|
||||||
|
|
||||||
|
// we use a linked list to avoid moving memory blocks when allocating new threads.
|
||||||
|
static thread_t *thread_list;
|
||||||
|
static pthread_mutex_t thread_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
|
static void *HandleThread(void *data)
|
||||||
|
{
|
||||||
|
thread_t *thread = data;
|
||||||
|
thread->func(thread->userdata);
|
||||||
|
|
||||||
|
pthread_mutex_lock(&thread_lock);
|
||||||
|
thread->func = NULL;
|
||||||
|
pthread_mutex_unlock(&thread_lock);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
I_spawn_thread (
|
||||||
|
const char * name,
|
||||||
|
I_thread_fn entry,
|
||||||
|
void * userdata
|
||||||
|
)
|
||||||
|
{
|
||||||
|
thread_t *thread;
|
||||||
|
(void)name;
|
||||||
|
|
||||||
|
pthread_mutex_lock(&thread_lock);
|
||||||
|
thread = thread_list;
|
||||||
|
while (thread != NULL)
|
||||||
|
{
|
||||||
|
if (thread->func == NULL)
|
||||||
|
{
|
||||||
|
// join with the exited thread to release it's resources.
|
||||||
|
pthread_join(thread->thread, NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
thread = thread->next;
|
||||||
|
}
|
||||||
|
if (thread == NULL)
|
||||||
|
{
|
||||||
|
thread = malloc(sizeof(thread_t));
|
||||||
|
thread->next = thread_list;
|
||||||
|
thread_list = thread;
|
||||||
|
}
|
||||||
|
|
||||||
|
thread->func = entry;
|
||||||
|
thread->userdata = userdata;
|
||||||
|
pthread_create(&thread->thread, NULL, HandleThread, thread);
|
||||||
|
pthread_mutex_unlock(&thread_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
int I_thread_is_stopped(void)
|
||||||
|
{
|
||||||
|
thread_t *thread;
|
||||||
|
pthread_mutex_lock(&thread_lock);
|
||||||
|
thread = thread_list;
|
||||||
|
while (thread != NULL)
|
||||||
|
{
|
||||||
|
if (thread->func != NULL)
|
||||||
|
{
|
||||||
|
pthread_mutex_unlock(&thread_lock);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
thread = thread->next;
|
||||||
|
}
|
||||||
|
pthread_mutex_unlock(&thread_lock);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_start_threads(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_stop_threads(void)
|
||||||
|
{
|
||||||
|
thread_t *thread = thread_list;
|
||||||
|
while (thread != NULL)
|
||||||
|
{
|
||||||
|
// join with all threads here, since finished threads haven't been awaited yet.
|
||||||
|
pthread_join(thread->thread, NULL);
|
||||||
|
thread = thread->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_lock_mutex(I_mutex *anchor)
|
||||||
|
{
|
||||||
|
pthread_mutex_lock(&thread_lock);
|
||||||
|
if (*anchor == NULL)
|
||||||
|
{
|
||||||
|
pthread_mutexattr_t attr;
|
||||||
|
pthread_mutexattr_init(&attr);
|
||||||
|
|
||||||
|
// SRB2 relies on lock recursion, so we need a mutex configured for that.
|
||||||
|
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||||
|
*anchor = malloc(sizeof(pthread_mutex_t));
|
||||||
|
pthread_mutex_init(*anchor, &attr);
|
||||||
|
pthread_mutexattr_destroy(&attr);
|
||||||
|
}
|
||||||
|
pthread_mutex_unlock(&thread_lock);
|
||||||
|
pthread_mutex_lock(*anchor);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_unlock_mutex(I_mutex id)
|
||||||
|
{
|
||||||
|
pthread_mutex_unlock(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_hold_cond(I_cond *cond_anchor, I_mutex mutex_id)
|
||||||
|
{
|
||||||
|
I_Assert(mutex_id != NULL);
|
||||||
|
pthread_mutex_lock(&thread_lock);
|
||||||
|
if (*cond_anchor == NULL)
|
||||||
|
{
|
||||||
|
*cond_anchor = malloc(sizeof(pthread_cond_t));
|
||||||
|
pthread_cond_init(*cond_anchor, NULL);
|
||||||
|
}
|
||||||
|
pthread_mutex_unlock(&thread_lock);
|
||||||
|
pthread_cond_wait(*cond_anchor, mutex_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_wake_one_cond(I_cond *anchor)
|
||||||
|
{
|
||||||
|
pthread_mutex_lock(&thread_lock);
|
||||||
|
if (*anchor == NULL)
|
||||||
|
{
|
||||||
|
*anchor = malloc(sizeof(pthread_cond_t));
|
||||||
|
pthread_cond_init(*anchor, NULL);
|
||||||
|
}
|
||||||
|
pthread_mutex_unlock(&thread_lock);
|
||||||
|
pthread_cond_signal(*anchor);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_wake_all_cond(I_cond *anchor)
|
||||||
|
{
|
||||||
|
pthread_mutex_lock(&thread_lock);
|
||||||
|
if (*anchor == NULL)
|
||||||
|
{
|
||||||
|
*anchor = malloc(sizeof(pthread_cond_t));
|
||||||
|
pthread_cond_init(*anchor, NULL);
|
||||||
|
}
|
||||||
|
pthread_mutex_unlock(&thread_lock);
|
||||||
|
pthread_cond_broadcast(*anchor);
|
||||||
|
}
|
||||||
|
#elif defined (_WIN32)
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
#include "../i_threads.h"
|
||||||
|
#include "../doomdef.h"
|
||||||
|
#include "../doomtype.h"
|
||||||
|
|
||||||
|
typedef struct thread_s thread_t;
|
||||||
|
|
||||||
|
struct thread_s
|
||||||
|
{
|
||||||
|
thread_t *next;
|
||||||
|
void *userdata;
|
||||||
|
I_thread_fn func;
|
||||||
|
HANDLE thread;
|
||||||
|
DWORD thread_id;
|
||||||
|
};
|
||||||
|
|
||||||
|
// we use a linked list to avoid moving memory blocks when allocating new threads.
|
||||||
|
static thread_t *thread_list;
|
||||||
|
static CRITICAL_SECTION thread_lock;
|
||||||
|
|
||||||
|
static DWORD __stdcall HandleThread(void *data)
|
||||||
|
{
|
||||||
|
thread_t *thread = data;
|
||||||
|
thread->func(thread->userdata);
|
||||||
|
|
||||||
|
EnterCriticalSection(&thread_lock);
|
||||||
|
thread->func = NULL;
|
||||||
|
LeaveCriticalSection(&thread_lock);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_spawn_thread(const char *name, I_thread_fn entry, void *userdata)
|
||||||
|
{
|
||||||
|
thread_t *thread;
|
||||||
|
(void)name;
|
||||||
|
EnterCriticalSection(&thread_lock);
|
||||||
|
thread = thread_list;
|
||||||
|
while (thread != NULL)
|
||||||
|
{
|
||||||
|
if (thread->func == NULL)
|
||||||
|
{
|
||||||
|
CloseHandle(thread->thread);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
thread = thread->next;
|
||||||
|
}
|
||||||
|
if (thread == NULL)
|
||||||
|
{
|
||||||
|
thread = malloc(sizeof(thread_t));
|
||||||
|
thread->next = thread_list;
|
||||||
|
thread_list = thread;
|
||||||
|
}
|
||||||
|
|
||||||
|
thread->func = entry;
|
||||||
|
thread->userdata = userdata;
|
||||||
|
thread->thread = CreateThread(NULL, 0, HandleThread, thread, 0, &thread->thread_id);
|
||||||
|
LeaveCriticalSection(&thread_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
int I_thread_is_stopped(void)
|
||||||
|
{
|
||||||
|
thread_t *thread;
|
||||||
|
EnterCriticalSection(&thread_lock);
|
||||||
|
thread = thread_list;
|
||||||
|
while (thread != NULL)
|
||||||
|
{
|
||||||
|
if (thread->func != NULL)
|
||||||
|
{
|
||||||
|
LeaveCriticalSection(&thread_lock);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
thread = thread->next;
|
||||||
|
}
|
||||||
|
LeaveCriticalSection(&thread_lock);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_start_threads(void)
|
||||||
|
{
|
||||||
|
InitializeCriticalSection(&thread_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_stop_threads(void)
|
||||||
|
{
|
||||||
|
thread_t *thread = thread_list;
|
||||||
|
while (thread != NULL)
|
||||||
|
{
|
||||||
|
WaitForSingleObject(thread->thread, INFINITE);
|
||||||
|
CloseHandle(thread->thread);
|
||||||
|
thread = thread->next;
|
||||||
|
}
|
||||||
|
DeleteCriticalSection(&thread_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_lock_mutex(I_mutex *anchor)
|
||||||
|
{
|
||||||
|
EnterCriticalSection(&thread_lock);
|
||||||
|
if (*anchor == NULL)
|
||||||
|
{
|
||||||
|
*anchor = malloc(sizeof(CRITICAL_SECTION));
|
||||||
|
InitializeCriticalSection(*anchor);
|
||||||
|
}
|
||||||
|
LeaveCriticalSection(&thread_lock);
|
||||||
|
EnterCriticalSection(*anchor);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_unlock_mutex(I_mutex id)
|
||||||
|
{
|
||||||
|
LeaveCriticalSection(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_hold_cond(I_cond *cond_anchor, I_mutex mutex_id)
|
||||||
|
{
|
||||||
|
I_Assert(mutex_id != NULL);
|
||||||
|
EnterCriticalSection(&thread_lock);
|
||||||
|
if (*cond_anchor == NULL)
|
||||||
|
{
|
||||||
|
*cond_anchor = malloc(sizeof(CONDITION_VARIABLE));
|
||||||
|
InitializeConditionVariable(*cond_anchor);
|
||||||
|
}
|
||||||
|
LeaveCriticalSection(&thread_lock);
|
||||||
|
SleepConditionVariableCS(*cond_anchor, mutex_id, INFINITE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_wake_one_cond(I_cond *anchor)
|
||||||
|
{
|
||||||
|
EnterCriticalSection(&thread_lock);
|
||||||
|
if (*anchor == NULL)
|
||||||
|
{
|
||||||
|
*anchor = malloc(sizeof(CONDITION_VARIABLE));
|
||||||
|
InitializeConditionVariable(*anchor);
|
||||||
|
}
|
||||||
|
LeaveCriticalSection(&thread_lock);
|
||||||
|
WakeConditionVariable(*anchor);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_wake_all_cond(I_cond *anchor)
|
||||||
|
{
|
||||||
|
EnterCriticalSection(&thread_lock);
|
||||||
|
if (*anchor == NULL)
|
||||||
|
{
|
||||||
|
*anchor = malloc(sizeof(CONDITION_VARIABLE));
|
||||||
|
InitializeConditionVariable(*anchor);
|
||||||
|
}
|
||||||
|
LeaveCriticalSection(&thread_lock);
|
||||||
|
WakeAllConditionVariable(*anchor);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
void I_spawn_thread(const char *name, I_thread_fn entry, void *userdata)
|
||||||
|
{
|
||||||
|
(void)name;
|
||||||
|
entry(userdata);
|
||||||
|
}
|
||||||
|
|
||||||
|
int I_thread_is_stopped(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_start_threads(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_stop_threads(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_lock_mutex(I_mutex *anchor)
|
||||||
|
{
|
||||||
|
(void)anchor;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_unlock_mutex(I_mutex id)
|
||||||
|
{
|
||||||
|
(void)id;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_hold_cond(I_cond *cond_anchor, I_mutex mutex_id)
|
||||||
|
{
|
||||||
|
(void)cond_anchor;
|
||||||
|
(void)mutex_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_wake_one_cond(I_cond *anchor)
|
||||||
|
{
|
||||||
|
(void)anchor;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_wake_all_cond(I_cond *anchor)
|
||||||
|
{
|
||||||
|
(void)anchor;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
// Emacs style mode select -*- C++ -*-
|
||||||
|
// SONIC ROBO BLAST 2
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||||
|
// Portions Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||||
|
// Copyright (C) 2014-2018 by Sonic Team Junior.
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 2
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
/// \file
|
||||||
|
/// \brief SRB2 graphics stuff for dedicated
|
||||||
|
|
||||||
|
#include "../doomdef.h"
|
||||||
|
#include "../i_system.h"
|
||||||
|
#include "../i_video.h"
|
||||||
|
#include "../console.h"
|
||||||
|
#include "../command.h"
|
||||||
|
#include "../i_system.h"
|
||||||
|
#include "../screen.h"
|
||||||
|
|
||||||
|
rendermode_t rendermode = render_none;
|
||||||
|
|
||||||
|
boolean highcolor = false;
|
||||||
|
|
||||||
|
// synchronize page flipping with screen refresh
|
||||||
|
consvar_t cv_vidwait = {"vid_wait", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
static CV_PossibleValue_t keyboardlayout_cons_t[] = {{1,"Default US"}, {2, "Native"}, {3, "AZERTY"}, {0, NULL}};
|
||||||
|
consvar_t cv_keyboardlayout = {"keyboardlayout", "Default US", CV_SAVE, keyboardlayout_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
consvar_t cv_alwaysgrabmouse = {"alwaysgrabmouse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
INT32 numcontrollers = 0;
|
||||||
|
|
||||||
|
UINT8 graphics_started = 0; // Is used in console.c and screen.c
|
||||||
|
|
||||||
|
// To disable fullscreen at startup; is set in VID_PrepareModeList
|
||||||
|
boolean allow_fullscreen = false;
|
||||||
|
UINT16 realwidth = BASEVIDWIDTH;
|
||||||
|
UINT16 realheight = BASEVIDHEIGHT;
|
||||||
|
|
||||||
|
extern boolean consolevent;
|
||||||
|
|
||||||
|
void I_GetConsoleEvents(void);
|
||||||
|
|
||||||
|
void I_GetEvent(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_StartupMouse(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// I_OsPolling
|
||||||
|
//
|
||||||
|
void I_OsPolling(void)
|
||||||
|
{
|
||||||
|
if (consolevent)
|
||||||
|
I_GetConsoleEvents();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// I_UpdateNoBlit
|
||||||
|
//
|
||||||
|
void I_UpdateNoBlit(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// I_FinishUpdate
|
||||||
|
//
|
||||||
|
void I_FinishUpdate(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// I_UpdateNoVsync
|
||||||
|
//
|
||||||
|
void I_UpdateNoVsync(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// I_ReadScreen
|
||||||
|
//
|
||||||
|
void I_ReadScreen(UINT8 *scr)
|
||||||
|
{
|
||||||
|
(void)scr;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// I_SetPalette
|
||||||
|
//
|
||||||
|
void I_SetPalette(RGBA_t *palette)
|
||||||
|
{
|
||||||
|
(void)palette;
|
||||||
|
}
|
||||||
|
|
||||||
|
// return number of fullscreen + X11 modes
|
||||||
|
INT32 VID_NumModes(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *VID_GetModeName(INT32 modenum)
|
||||||
|
{
|
||||||
|
(void)modenum;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
INT32 VID_GetModeForSize(INT32 w, INT32 h)
|
||||||
|
{
|
||||||
|
(void)w;
|
||||||
|
(void)h;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void VID_PrepareModeList(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
INT32 VID_SetMode(INT32 modeNum)
|
||||||
|
{
|
||||||
|
(void)modeNum;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_StartupGraphics(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_ShutdownGraphics(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT32 I_GetRefreshRate(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean I_UseNativeKeyboard(void)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
+6
-6
@@ -28,7 +28,7 @@
|
|||||||
#include "p_local.h" // for var1 and var2, and some constants
|
#include "p_local.h" // for var1 and var2, and some constants
|
||||||
#include "p_setup.h"
|
#include "p_setup.h"
|
||||||
#include "r_data.h"
|
#include "r_data.h"
|
||||||
#include "r_patch.h"
|
#include "r_fps.h"
|
||||||
#include "r_sky.h"
|
#include "r_sky.h"
|
||||||
#include "r_draw.h" // translation colormap consts (for lua)
|
#include "r_draw.h" // translation colormap consts (for lua)
|
||||||
#include "fastcmp.h"
|
#include "fastcmp.h"
|
||||||
@@ -1799,7 +1799,7 @@ static void readsound(MYFILE *f, INT32 num, const char *savesfxnames[])
|
|||||||
* \sa readmaincfg()
|
* \sa readmaincfg()
|
||||||
* \author Graue <graue@oceanbase.org>
|
* \author Graue <graue@oceanbase.org>
|
||||||
*/
|
*/
|
||||||
static boolean GoodDataFileName(const char *s)
|
/*static boolean GoodDataFileName(const char *s)
|
||||||
{
|
{
|
||||||
const char *p;
|
const char *p;
|
||||||
const char *tail = ".dat";
|
const char *tail = ".dat";
|
||||||
@@ -1819,7 +1819,7 @@ static boolean GoodDataFileName(const char *s)
|
|||||||
if (fasticmp(s, "online.dat")) return false; // SRB2Kart online replay folder
|
if (fasticmp(s, "online.dat")) return false; // SRB2Kart online replay folder
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
static void reademblemdata(MYFILE *f, INT32 num)
|
static void reademblemdata(MYFILE *f, INT32 num)
|
||||||
{
|
{
|
||||||
@@ -2597,10 +2597,10 @@ static void readmaincfg(MYFILE *f)
|
|||||||
{
|
{
|
||||||
maxXtraLife = (UINT8)get_number(word2);
|
maxXtraLife = (UINT8)get_number(word2);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (fastcmp(word, "GAMEDATA"))
|
else if (fastcmp(word, "GAMEDATA"))
|
||||||
{
|
{
|
||||||
size_t filenamelen;
|
// just ignore it but dont throw a warning
|
||||||
|
/*size_t filenamelen;
|
||||||
|
|
||||||
// Check the data filename so that mods
|
// Check the data filename so that mods
|
||||||
// can't write arbitrary files.
|
// can't write arbitrary files.
|
||||||
@@ -2624,7 +2624,7 @@ static void readmaincfg(MYFILE *f)
|
|||||||
// can't use sprintf since there is %u in savegamename
|
// can't use sprintf since there is %u in savegamename
|
||||||
strcatbf(savegamename, srb2home, PATHSEP);
|
strcatbf(savegamename, srb2home, PATHSEP);
|
||||||
|
|
||||||
refreshdirmenu |= REFRESHDIR_GAMEDATA;
|
refreshdirmenu |= REFRESHDIR_GAMEDATA;*/
|
||||||
}
|
}
|
||||||
else if (fastcmp(word, "RESETDATA"))
|
else if (fastcmp(word, "RESETDATA"))
|
||||||
{
|
{
|
||||||
|
|||||||
+17
-10
@@ -113,8 +113,8 @@ extern char logfilename[1024];
|
|||||||
#else
|
#else
|
||||||
#define VERSION 1 // Game version
|
#define VERSION 1 // Game version
|
||||||
#define SUBVERSION 6 // more precise version number
|
#define SUBVERSION 6 // more precise version number
|
||||||
#define VERSIONSTRING "Saturn v7.2"
|
#define VERSIONSTRING "Saturn v8.2"
|
||||||
#define VERSIONSTRINGW L"Saturn v7.2"
|
#define VERSIONSTRINGW L"Saturn v8.2"
|
||||||
// Hey! If you change this, add 1 to the MODVERSION below! Otherwise we can't force updates!
|
// Hey! If you change this, add 1 to the MODVERSION below! Otherwise we can't force updates!
|
||||||
// And change CMakeLists.txt (not src/, but in root), for CMake users!
|
// And change CMakeLists.txt (not src/, but in root), for CMake users!
|
||||||
// AND appveyor.yml, for the build bots!
|
// AND appveyor.yml, for the build bots!
|
||||||
@@ -547,6 +547,19 @@ UINT32 quickncasehash (const char *p, size_t n)
|
|||||||
#define DBL_EPSILON 2.2204460492503131e-16l
|
#define DBL_EPSILON 2.2204460492503131e-16l
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
|
#ifndef LIKELY
|
||||||
|
#define LIKELY(x) __builtin_expect(!!(x), 1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef UNLIKELY
|
||||||
|
#define UNLIKELY(x) __builtin_expect(!!(x), 0)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define LIKELY(x) (x)
|
||||||
|
#define UNLIKELY(x) (x)
|
||||||
|
#endif
|
||||||
|
|
||||||
// An assert-type mechanism.
|
// An assert-type mechanism.
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
#define I_Assert(e) ((e) ? (void)0 : I_Error("assert failed: %s, file %s, line %d", #e, __FILE__, __LINE__))
|
#define I_Assert(e) ((e) ? (void)0 : I_Error("assert failed: %s, file %s, line %d", #e, __FILE__, __LINE__))
|
||||||
@@ -571,21 +584,15 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
|||||||
|
|
||||||
#ifndef NONET
|
#ifndef NONET
|
||||||
//-- SATURN __
|
//-- SATURN __
|
||||||
/// Enable gamestate resynching between Saturn servers and clients
|
|
||||||
/// Like SRB2 and RR does
|
|
||||||
/// Still highly experimental
|
|
||||||
#ifdef DOSATURNSYNCH
|
|
||||||
#define SATURNSYNCH
|
|
||||||
|
|
||||||
/// Detect if a client is on Saturn in the clientconfig.
|
/// Detect if a client is on Saturn in the clientconfig.
|
||||||
/// To seperately allow them to join or block joining from vanilla clients.
|
/// To seperately allow them to join or block joining from vanilla clients.
|
||||||
#ifdef DOSATURNJOIN
|
#ifdef DOSATURNJOIN
|
||||||
#define SATURNJOIN
|
#define SATURNJOIN
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
/// Server detection for if a connecting client is on Saturn.
|
/// Server detection for if a connecting client is on Saturn.
|
||||||
/// For stuff like extra synching, etc.
|
/// This also enables gamestate resynching between Saturn servers and clients
|
||||||
|
/// Like SRB2 and RR does
|
||||||
#ifdef DOSATURNPAK
|
#ifdef DOSATURNPAK
|
||||||
#define SATURNPAK
|
#define SATURNPAK
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+2
-20
@@ -244,7 +244,7 @@ typedef struct
|
|||||||
INT16 nextlevel; ///< Map number of next level, or 1100-1102 to end.
|
INT16 nextlevel; ///< Map number of next level, or 1100-1102 to end.
|
||||||
char musname[7]; ///< Music track to play. "" for no music.
|
char musname[7]; ///< Music track to play. "" for no music.
|
||||||
UINT16 mustrack; ///< Subsong to play. Only really relevant for music modules and specific formats supported by GME. 0 to ignore.
|
UINT16 mustrack; ///< Subsong to play. Only really relevant for music modules and specific formats supported by GME. 0 to ignore.
|
||||||
UINT32 muspos; ///< Music position to jump to.
|
UINT32 muspos; ///< Music position to jump to.
|
||||||
char forcecharacter[17]; ///< (SKINNAMESIZE+1) Skin to switch to or "" to disable.
|
char forcecharacter[17]; ///< (SKINNAMESIZE+1) Skin to switch to or "" to disable.
|
||||||
UINT8 weather; ///< 0 = sunny day, 1 = storm, 2 = snow, 3 = rain, 4 = blank, 5 = thunder w/o rain, 6 = rain w/o lightning, 7 = heat wave.
|
UINT8 weather; ///< 0 = sunny day, 1 = storm, 2 = snow, 3 = rain, 4 = blank, 5 = thunder w/o rain, 6 = rain w/o lightning, 7 = heat wave.
|
||||||
INT16 skynum; ///< Sky number to use.
|
INT16 skynum; ///< Sky number to use.
|
||||||
@@ -276,7 +276,7 @@ typedef struct
|
|||||||
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
//boolean automap; ///< Displays a level's white map outline in modified games
|
//boolean automap; ///< Displays a level's white map outline in modified games
|
||||||
fixed_t mobj_scale; ///< Replacement for TOL_ERZ3
|
fixed_t mobj_scale; ///< Replacement for TOL_ERZ3
|
||||||
|
|
||||||
mapheader_lighting_t lighting; ///< Wall and sprite lighting
|
mapheader_lighting_t lighting; ///< Wall and sprite lighting
|
||||||
mapheader_lighting_t lighting_encore; ///< Alternative lighting for Encore mode
|
mapheader_lighting_t lighting_encore; ///< Alternative lighting for Encore mode
|
||||||
@@ -361,9 +361,6 @@ enum GameType // SRB2Kart
|
|||||||
// String names for gametypes
|
// String names for gametypes
|
||||||
extern const char *Gametype_Names[NUMGAMETYPES];
|
extern const char *Gametype_Names[NUMGAMETYPES];
|
||||||
|
|
||||||
extern tic_t totalplaytime;
|
|
||||||
extern UINT32 matchesplayed;
|
|
||||||
|
|
||||||
extern UINT8 stagefailed;
|
extern UINT8 stagefailed;
|
||||||
|
|
||||||
// Emeralds stored as bits to throw savegame hackers off.
|
// Emeralds stored as bits to throw savegame hackers off.
|
||||||
@@ -539,18 +536,6 @@ extern mapthing_t *playerstarts[MAXPLAYERS]; // Cooperative
|
|||||||
extern mapthing_t *bluectfstarts[MAXPLAYERS]; // CTF
|
extern mapthing_t *bluectfstarts[MAXPLAYERS]; // CTF
|
||||||
extern mapthing_t *redctfstarts[MAXPLAYERS]; // CTF
|
extern mapthing_t *redctfstarts[MAXPLAYERS]; // CTF
|
||||||
|
|
||||||
#define WAYPOINTSEQUENCESIZE 256
|
|
||||||
#define NUMWAYPOINTSEQUENCES 256
|
|
||||||
extern mobj_t *waypoints[NUMWAYPOINTSEQUENCES][WAYPOINTSEQUENCESIZE];
|
|
||||||
extern UINT16 numwaypoints[NUMWAYPOINTSEQUENCES];
|
|
||||||
|
|
||||||
void P_AddWaypoint(UINT8 sequence, UINT8 id, mobj_t *waypoint);
|
|
||||||
mobj_t *P_GetFirstWaypoint(UINT8 sequence);
|
|
||||||
mobj_t *P_GetLastWaypoint(UINT8 sequence);
|
|
||||||
mobj_t *P_GetPreviousWaypoint(mobj_t *current, boolean wrap);
|
|
||||||
mobj_t *P_GetNextWaypoint(mobj_t *current, boolean wrap);
|
|
||||||
mobj_t *P_GetClosestWaypoint(UINT8 sequence, mobj_t *mo);
|
|
||||||
|
|
||||||
// =====================================
|
// =====================================
|
||||||
// Internal parameters, used for engine.
|
// Internal parameters, used for engine.
|
||||||
// =====================================
|
// =====================================
|
||||||
@@ -571,9 +556,6 @@ extern FILE *debugfile;
|
|||||||
extern INT32 debugload;
|
extern INT32 debugload;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// if true, load all graphics at level load
|
|
||||||
extern boolean precache;
|
|
||||||
|
|
||||||
// wipegamestate can be set to -1
|
// wipegamestate can be set to -1
|
||||||
// to force a wipe on the next draw
|
// to force a wipe on the next draw
|
||||||
extern gamestate_t wipegamestate;
|
extern gamestate_t wipegamestate;
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
#include "../doomdef.h"
|
|
||||||
#include "../d_main.h"
|
|
||||||
#include "../m_argv.h"
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
myargc = argc;
|
|
||||||
myargv = argv; /// \todo pull out path to exe from this string
|
|
||||||
|
|
||||||
// startup SRB2
|
|
||||||
CONS_Printf("Setting up SRB2...\n");
|
|
||||||
D_SRB2Main();
|
|
||||||
CONS_Printf("Entering main game loop...\n");
|
|
||||||
// never return
|
|
||||||
D_SRB2Loop();
|
|
||||||
|
|
||||||
// return to OS
|
|
||||||
#ifndef __GNUC__
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#include "../i_net.h"
|
|
||||||
|
|
||||||
boolean I_InitNetwork(void)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
#include "../i_sound.h"
|
|
||||||
|
|
||||||
UINT8 sound_started = 0;
|
|
||||||
|
|
||||||
void *I_GetSfx(sfxinfo_t *sfx)
|
|
||||||
{
|
|
||||||
(void)sfx;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_FreeSfx(sfxinfo_t *sfx)
|
|
||||||
{
|
|
||||||
(void)sfx;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_StartupSound(void){}
|
|
||||||
|
|
||||||
void I_ShutdownSound(void){}
|
|
||||||
|
|
||||||
void I_UpdateSound(void){};
|
|
||||||
|
|
||||||
//
|
|
||||||
// SFX I/O
|
|
||||||
//
|
|
||||||
|
|
||||||
INT32 I_StartSound(sfxenum_t id, UINT8 vol, UINT8 sep, UINT8 pitch, UINT8 priority, INT32 channel)
|
|
||||||
{
|
|
||||||
(void)id;
|
|
||||||
(void)vol;
|
|
||||||
(void)sep;
|
|
||||||
(void)pitch;
|
|
||||||
(void)priority;
|
|
||||||
(void)channel;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_StopSound(INT32 handle)
|
|
||||||
{
|
|
||||||
(void)handle;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean I_SoundIsPlaying(INT32 handle)
|
|
||||||
{
|
|
||||||
(void)handle;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_UpdateSoundParams(INT32 handle, UINT8 vol, UINT8 sep, UINT8 pitch)
|
|
||||||
{
|
|
||||||
(void)handle;
|
|
||||||
(void)vol;
|
|
||||||
(void)sep;
|
|
||||||
(void)pitch;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_SetSfxVolume(UINT8 volume)
|
|
||||||
{
|
|
||||||
(void)volume;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// ------------------------
|
|
||||||
// MUSIC SYSTEM
|
|
||||||
/// ------------------------
|
|
||||||
|
|
||||||
void I_InitMusic(void){}
|
|
||||||
|
|
||||||
void I_ShutdownMusic(void){}
|
|
||||||
|
|
||||||
/// ------------------------
|
|
||||||
// MUSIC PROPERTIES
|
|
||||||
/// ------------------------
|
|
||||||
|
|
||||||
musictype_t I_SongType(void)
|
|
||||||
{
|
|
||||||
return MU_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean I_SongPlaying(void)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean I_SongPaused(void)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// ------------------------
|
|
||||||
// MUSIC EFFECTS
|
|
||||||
/// ------------------------
|
|
||||||
|
|
||||||
boolean I_SetSongSpeed(float speed)
|
|
||||||
{
|
|
||||||
(void)speed;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// ------------------------
|
|
||||||
// MUSIC SEEKING
|
|
||||||
/// ------------------------
|
|
||||||
|
|
||||||
UINT32 I_GetSongLength(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean I_SetSongLoopPoint(UINT32 looppoint)
|
|
||||||
{
|
|
||||||
(void)looppoint;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT32 I_GetSongLoopPoint(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean I_SetSongPosition(UINT32 position)
|
|
||||||
{
|
|
||||||
(void)position;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT32 I_GetSongPosition(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// ------------------------
|
|
||||||
// MUSIC PLAYBACK
|
|
||||||
/// ------------------------
|
|
||||||
|
|
||||||
boolean I_LoadSong(char *data, size_t len)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
(void)len;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_UnloadSong(void)
|
|
||||||
{
|
|
||||||
(void)handle;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean I_PlaySong(boolean looping)
|
|
||||||
{
|
|
||||||
(void)handle;
|
|
||||||
(void)looping;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_StopSong(void)
|
|
||||||
{
|
|
||||||
(void)handle;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_PauseSong(void)
|
|
||||||
{
|
|
||||||
(void)handle;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_ResumeSong(void)
|
|
||||||
{
|
|
||||||
(void)handle;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_SetMusicVolume(UINT8 volume)
|
|
||||||
{
|
|
||||||
(void)volume;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean I_SetSongTrack(INT32 track)
|
|
||||||
{
|
|
||||||
(void)track;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// ------------------------
|
|
||||||
// MUSIC FADING
|
|
||||||
/// ------------------------
|
|
||||||
|
|
||||||
void I_SetInternalMusicVolume(UINT8 volume)
|
|
||||||
{
|
|
||||||
(void)volume;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_StopFadingSong(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void));
|
|
||||||
{
|
|
||||||
(void)target_volume;
|
|
||||||
(void)source_volume;
|
|
||||||
(void)ms;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void));
|
|
||||||
{
|
|
||||||
(void)target_volume;
|
|
||||||
(void)ms;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean I_FadeOutStopSong(UINT32 ms)
|
|
||||||
{
|
|
||||||
(void)ms;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean I_FadeInPlaySong(UINT32 ms, boolean looping)
|
|
||||||
{
|
|
||||||
(void)ms;
|
|
||||||
(void)looping;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
@@ -1,174 +0,0 @@
|
|||||||
#include "../doomdef.h"
|
|
||||||
#include "../i_system.h"
|
|
||||||
|
|
||||||
UINT8 graphics_started = 0;
|
|
||||||
|
|
||||||
UINT8 keyboard_started = 0;
|
|
||||||
|
|
||||||
size_t I_GetFreeMem(size_t *total)
|
|
||||||
{
|
|
||||||
*total = 0;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_Sleep(UINT32 ms){}
|
|
||||||
|
|
||||||
precise_t I_GetPreciseTime(void) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT64 I_GetPrecisePrecision(void) {
|
|
||||||
return 1000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_GetEvent(void){}
|
|
||||||
|
|
||||||
void I_OsPolling(void){}
|
|
||||||
|
|
||||||
ticcmd_t *I_BaseTiccmd(void)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ticcmd_t *I_BaseTiccmd2(void)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_Quit(void)
|
|
||||||
{
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_Error(const char *error, ...)
|
|
||||||
{
|
|
||||||
(void)error;
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_Tactile(FFType Type, const JoyFF_t *Effect)
|
|
||||||
{
|
|
||||||
(void)Type;
|
|
||||||
(void)Effect;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_Tactile2(FFType Type, const JoyFF_t *Effect)
|
|
||||||
{
|
|
||||||
(void)Type;
|
|
||||||
(void)Effect;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_JoyScale(void){}
|
|
||||||
|
|
||||||
void I_JoyScale2(void){}
|
|
||||||
|
|
||||||
void I_InitJoystick(void){}
|
|
||||||
|
|
||||||
void I_InitJoystick2(void){}
|
|
||||||
|
|
||||||
INT32 I_NumJoys(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *I_GetJoyName(INT32 joyindex)
|
|
||||||
{
|
|
||||||
(void)joyindex;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef NOMUMBLE
|
|
||||||
void I_UpdateMumble(const mobj_t *mobj, const listener_t listener)
|
|
||||||
{
|
|
||||||
(void)mobj;
|
|
||||||
(void)listener;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void I_OutputMsg(const char *error, ...)
|
|
||||||
{
|
|
||||||
(void)error;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_StartupMouse(void){}
|
|
||||||
|
|
||||||
void I_StartupKeyboard(void){}
|
|
||||||
|
|
||||||
INT32 I_GetKey(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_StartupTimer(void){}
|
|
||||||
|
|
||||||
void I_AddExitFunc(void (*func)())
|
|
||||||
{
|
|
||||||
(void)func;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_RemoveExitFunc(void (*func)())
|
|
||||||
{
|
|
||||||
(void)func;
|
|
||||||
}
|
|
||||||
|
|
||||||
INT32 I_StartupSystem(void)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_ShutdownSystem(void){}
|
|
||||||
|
|
||||||
void I_GetDiskFreeSpace(INT64* freespace)
|
|
||||||
{
|
|
||||||
*freespace = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *I_GetUserName(void)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
INT32 I_mkdir(const char *dirname, INT32 unixright)
|
|
||||||
{
|
|
||||||
(void)dirname;
|
|
||||||
(void)unixright;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *I_LocateWad(void)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_GetJoystickEvents(void){}
|
|
||||||
|
|
||||||
void I_GetJoystick2Events(void){}
|
|
||||||
|
|
||||||
char *I_GetEnv(const char *name)
|
|
||||||
{
|
|
||||||
(void)name;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
INT32 I_PutEnv(char *variable)
|
|
||||||
{
|
|
||||||
(void)variable;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
INT32 I_ClipboardCopy(const char *data, size_t size)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
(void)size;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *I_ClipboardPaste(void)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_RegisterSysCommands(void) {}
|
|
||||||
|
|
||||||
#include "../sdl/dosstr.c"
|
|
||||||
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
#include "../doomdef.h"
|
|
||||||
#include "../command.h"
|
|
||||||
#include "../i_video.h"
|
|
||||||
|
|
||||||
rendermode_t rendermode = render_none;
|
|
||||||
|
|
||||||
boolean highcolor = false;
|
|
||||||
|
|
||||||
boolean allow_fullscreen = false;
|
|
||||||
|
|
||||||
consvar_t cv_vidwait = {"vid_wait", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
|
|
||||||
void I_StartupGraphics(void){}
|
|
||||||
|
|
||||||
void I_ShutdownGraphics(void){}
|
|
||||||
|
|
||||||
void I_SetPalette(RGBA_t *palette)
|
|
||||||
{
|
|
||||||
(void)palette;
|
|
||||||
}
|
|
||||||
|
|
||||||
INT32 VID_NumModes(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
INT32 VID_GetModeForSize(INT32 w, INT32 h)
|
|
||||||
{
|
|
||||||
(void)w;
|
|
||||||
(void)h;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void VID_PrepareModeList(void){}
|
|
||||||
|
|
||||||
INT32 VID_SetMode(INT32 modenum)
|
|
||||||
{
|
|
||||||
(void)modenum;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *VID_GetModeName(INT32 modenum)
|
|
||||||
{
|
|
||||||
(void)modenum;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_UpdateNoBlit(void){}
|
|
||||||
|
|
||||||
void I_FinishUpdate(void){}
|
|
||||||
|
|
||||||
void I_UpdateNoVsync(void) {}
|
|
||||||
|
|
||||||
void I_WaitVBL(INT32 count)
|
|
||||||
{
|
|
||||||
(void)count;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_ReadScreen(UINT8 *scr)
|
|
||||||
{
|
|
||||||
(void)scr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I_BeginRead(void){}
|
|
||||||
|
|
||||||
void I_EndRead(void){}
|
|
||||||
|
|
||||||
+38
-34
@@ -149,7 +149,7 @@ static UINT8 F_WriteText(void)
|
|||||||
static void F_NewCutscene(const char *basetext)
|
static void F_NewCutscene(const char *basetext)
|
||||||
{
|
{
|
||||||
cutscene_basetext = basetext;
|
cutscene_basetext = basetext;
|
||||||
memset(cutscene_disptext,0,sizeof(cutscene_disptext));
|
memset(cutscene_disptext, 0, sizeof(cutscene_disptext));
|
||||||
cutscene_writeptr = cutscene_baseptr = 0;
|
cutscene_writeptr = cutscene_baseptr = 0;
|
||||||
cutscene_textspeed = 9;
|
cutscene_textspeed = 9;
|
||||||
cutscene_textcount = TICRATE/2;
|
cutscene_textcount = TICRATE/2;
|
||||||
@@ -164,14 +164,14 @@ static void F_SkyScroll(INT32 scrollspeed)
|
|||||||
patch_t *pat, *pat2;
|
patch_t *pat, *pat2;
|
||||||
INT32 anim2 = 0;
|
INT32 anim2 = 0;
|
||||||
|
|
||||||
pat = W_CachePatchName("TITLEBG1", PU_CACHE);
|
pat = W_CachePatchName("TITLEBG1", PU_PATCH_LOWPRIORITY);
|
||||||
pat2 = W_CachePatchName("TITLEBG2", PU_CACHE);
|
pat2 = W_CachePatchName("TITLEBG2", PU_PATCH_LOWPRIORITY);
|
||||||
|
|
||||||
w = (vid.width / vid.dupx)<<FRACBITS;
|
w = (vid.width / vid.dupx)<<FRACBITS;
|
||||||
|
|
||||||
// The scroll offset MUST be clamped before shifting by FRACBITS, or else it'll overflow in about 3 minutes
|
// The scroll offset MUST be clamped before shifting by FRACBITS, or else it'll overflow in about 3 minutes
|
||||||
animtimer = ((((finalecount * scrollspeed) % (SHORT(pat->width)*16))<<FRACBITS) + (R_GetMenuUncap() * scrollspeed))/16;
|
animtimer = ((((finalecount * scrollspeed) % (pat->width*16))<<FRACBITS) + (R_GetMenuUncap() * scrollspeed))/16;
|
||||||
anim2 = (SHORT(pat2->width)<<FRACBITS) - ((((finalecount * scrollspeed) % (SHORT(pat2->width)*16))<<FRACBITS) + (R_GetMenuUncap() * scrollspeed))/16;
|
anim2 = (pat2->width<<FRACBITS) - ((((finalecount * scrollspeed) % (pat2->width*16))<<FRACBITS) + (R_GetMenuUncap() * scrollspeed))/16;
|
||||||
|
|
||||||
// SRB2Kart: F_DrawPatchCol is over-engineered; recoded to be less shitty and error-prone
|
// SRB2Kart: F_DrawPatchCol is over-engineered; recoded to be less shitty and error-prone
|
||||||
if (rendermode != render_none)
|
if (rendermode != render_none)
|
||||||
@@ -183,15 +183,15 @@ static void F_SkyScroll(INT32 scrollspeed)
|
|||||||
while (x < w)
|
while (x < w)
|
||||||
{
|
{
|
||||||
V_DrawFixedPatch(x, y, FRACUNIT, V_SNAPTOTOP|V_SNAPTOLEFT, pat, NULL);
|
V_DrawFixedPatch(x, y, FRACUNIT, V_SNAPTOTOP|V_SNAPTOLEFT, pat, NULL);
|
||||||
x += SHORT(pat->width)<<FRACBITS;
|
x += pat->width<<FRACBITS;
|
||||||
}
|
}
|
||||||
|
|
||||||
x = -anim2;
|
x = -anim2;
|
||||||
y = (BASEVIDHEIGHT - SHORT(pat2->height))<<FRACBITS;
|
y = (BASEVIDHEIGHT - pat2->height)<<FRACBITS;
|
||||||
while (x < w)
|
while (x < w)
|
||||||
{
|
{
|
||||||
V_DrawFixedPatch(x, y, FRACUNIT, V_SNAPTOBOTTOM|V_SNAPTOLEFT, pat2, NULL);
|
V_DrawFixedPatch(x, y, FRACUNIT, V_SNAPTOBOTTOM|V_SNAPTOLEFT, pat2, NULL);
|
||||||
x += SHORT(pat2->width)<<FRACBITS;
|
x += pat2->width<<FRACBITS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@ void F_IntroDrawer(void)
|
|||||||
// DRAW A FULL PIC INSTEAD OF FLAT!
|
// DRAW A FULL PIC INSTEAD OF FLAT!
|
||||||
if (intro_scenenum == 0)
|
if (intro_scenenum == 0)
|
||||||
{
|
{
|
||||||
background = W_CachePatchName("KARTKREW", PU_CACHE);
|
background = W_CachePatchName("KARTKREW", PU_PATCH_LOWPRIORITY);
|
||||||
highres = true;
|
highres = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -534,8 +534,15 @@ static const char *credits[] = {
|
|||||||
"\"Sunflower\" aka \"AnimeSonic\"",
|
"\"Sunflower\" aka \"AnimeSonic\"",
|
||||||
"\"Yuz\" aka \"Yuzler\"",
|
"\"Yuz\" aka \"Yuzler\"",
|
||||||
"\"Democrab\"",
|
"\"Democrab\"",
|
||||||
"\"Expand\" aka \"Maver\"",
|
"\"EXpand\"",
|
||||||
"\"Nexit\"",
|
"\"Nexit\"",
|
||||||
|
"\"Spee\"",
|
||||||
|
"\"Jin\"",
|
||||||
|
"\"riomccloud\"",
|
||||||
|
"\"chromaticpipe\"",
|
||||||
|
"\"Achii\"",
|
||||||
|
"\"Anonimus\"",
|
||||||
|
"\"scizor300\"",
|
||||||
"",
|
"",
|
||||||
"\1Special Thanks",
|
"\1Special Thanks",
|
||||||
"SEGA",
|
"SEGA",
|
||||||
@@ -623,10 +630,10 @@ void F_CreditDrawer(void)
|
|||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||||
|
|
||||||
// Draw background
|
// Draw background
|
||||||
V_DrawSciencePatch(0, 0 - FixedMul(32<<FRACBITS, FixedDiv(credbgtimer%TICRATE, TICRATE)), V_SNAPTOTOP, W_CachePatchName("CREDTILE", PU_CACHE), FRACUNIT);
|
V_DrawSciencePatch(0, 0 - FixedMul(32<<FRACBITS, FixedDiv(credbgtimer%TICRATE, TICRATE)), V_SNAPTOTOP, W_CachePatchName("CREDTILE", PU_PATCH_LOWPRIORITY), FRACUNIT);
|
||||||
|
|
||||||
V_DrawSciencePatch(0, 0 - FixedMul(40<<FRACBITS, FixedDiv(credbgtimer%(TICRATE/2), (TICRATE/2))), V_SNAPTOTOP, W_CachePatchName("CREDZIGZ", PU_CACHE), FRACUNIT);
|
V_DrawSciencePatch(0, 0 - FixedMul(40<<FRACBITS, FixedDiv(credbgtimer%(TICRATE/2), (TICRATE/2))), V_SNAPTOTOP, W_CachePatchName("CREDZIGZ", PU_PATCH_LOWPRIORITY), FRACUNIT);
|
||||||
V_DrawSciencePatch(320<<FRACBITS, 0 - FixedMul(40<<FRACBITS, FixedDiv(credbgtimer%(TICRATE/2), (TICRATE/2))), V_SNAPTOTOP|V_FLIP, W_CachePatchName("CREDZIGZ", PU_CACHE), FRACUNIT);
|
V_DrawSciencePatch(320<<FRACBITS, 0 - FixedMul(40<<FRACBITS, FixedDiv(credbgtimer%(TICRATE/2), (TICRATE/2))), V_SNAPTOTOP|V_FLIP, W_CachePatchName("CREDZIGZ", PU_PATCH_LOWPRIORITY), FRACUNIT);
|
||||||
|
|
||||||
// Draw pictures
|
// Draw pictures
|
||||||
for (i = 0; credits_pics[i].patch; i++)
|
for (i = 0; credits_pics[i].patch; i++)
|
||||||
@@ -640,7 +647,7 @@ void F_CreditDrawer(void)
|
|||||||
sc = FRACUNIT; // quick hack so I don't have to add another field to credits_pics
|
sc = FRACUNIT; // quick hack so I don't have to add another field to credits_pics
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawFixedPatch(credits_pics[i].x<<FRACBITS, (credits_pics[i].y<<FRACBITS) - 4*(animtimer<<FRACBITS)/5, sc, 0, W_CachePatchName(credits_pics[i].patch, PU_CACHE), colormap);
|
V_DrawFixedPatch(credits_pics[i].x<<FRACBITS, (credits_pics[i].y<<FRACBITS) - 4*(animtimer<<FRACBITS)/5, sc, 0, W_CachePatchName(credits_pics[i].patch, PU_PATCH), colormap);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dim the background
|
// Dim the background
|
||||||
@@ -839,9 +846,9 @@ void F_GameEvaluationDrawer(void)
|
|||||||
|
|
||||||
patchname[4] = 'A'+(char)i;
|
patchname[4] = 'A'+(char)i;
|
||||||
if (emeralds & (1<<i))
|
if (emeralds & (1<<i))
|
||||||
V_DrawScaledPatch(x, y, 0, W_CachePatchName(patchname, PU_CACHE));
|
V_DrawScaledPatch(x, y, 0, W_CachePatchName(patchname, PU_PATCH_LOWPRIORITY));
|
||||||
else
|
else
|
||||||
V_DrawTranslucentPatch(x, y, TRANSLEVEL, W_CachePatchName(patchname, PU_CACHE));
|
V_DrawTranslucentPatch(x, y, TRANSLEVEL, W_CachePatchName(patchname, PU_PATCH_LOWPRIORITY));
|
||||||
|
|
||||||
eemeralds_cur += INTERVAL;
|
eemeralds_cur += INTERVAL;
|
||||||
}
|
}
|
||||||
@@ -857,9 +864,6 @@ void F_GameEvaluationDrawer(void)
|
|||||||
if (ALL7EMERALDS(emeralds))
|
if (ALL7EMERALDS(emeralds))
|
||||||
++timesBeatenWithEmeralds;
|
++timesBeatenWithEmeralds;
|
||||||
|
|
||||||
/*if (ultimatemode)
|
|
||||||
++timesBeatenUltimate;*/
|
|
||||||
|
|
||||||
if (M_UpdateUnlockablesAndExtraEmblems(false))
|
if (M_UpdateUnlockablesAndExtraEmblems(false))
|
||||||
S_StartSound(NULL, sfx_ncitem);
|
S_StartSound(NULL, sfx_ncitem);
|
||||||
|
|
||||||
@@ -870,10 +874,10 @@ void F_GameEvaluationDrawer(void)
|
|||||||
if (finalecount >= 5*TICRATE)
|
if (finalecount >= 5*TICRATE)
|
||||||
{
|
{
|
||||||
if (drawemblem)
|
if (drawemblem)
|
||||||
V_DrawScaledPatch(120, 192, 0, W_CachePatchName("NWNGA0", PU_CACHE));
|
V_DrawScaledPatch(120, 192, 0, W_CachePatchName("NWNGA0", PU_PATCH_LOWPRIORITY));
|
||||||
|
|
||||||
if (drawchaosemblem)
|
if (drawchaosemblem)
|
||||||
V_DrawScaledPatch(200, 192, 0, W_CachePatchName("NWNGA0", PU_CACHE));
|
V_DrawScaledPatch(200, 192, 0, W_CachePatchName("NWNGA0", PU_PATCH_LOWPRIORITY));
|
||||||
|
|
||||||
V_DrawString(8, 16, V_YELLOWMAP, "Unlocked:");
|
V_DrawString(8, 16, V_YELLOWMAP, "Unlocked:");
|
||||||
|
|
||||||
@@ -968,10 +972,10 @@ void F_StartTitleScreen(void)
|
|||||||
demoDelayLeft = demoDelayTime;
|
demoDelayLeft = demoDelayTime;
|
||||||
demoIdleLeft = demoIdleTime;
|
demoIdleLeft = demoIdleTime;
|
||||||
|
|
||||||
ttbanner = W_CachePatchName("TTKBANNR", PU_LEVEL);
|
ttbanner = W_CachePatchName("TTKBANNR", PU_PATCH_LOWPRIORITY);
|
||||||
ttkart = W_CachePatchName("TTKART", PU_LEVEL);
|
ttkart = W_CachePatchName("TTKART", PU_PATCH_LOWPRIORITY);
|
||||||
ttcheckers = W_CachePatchName("TTCHECK", PU_LEVEL);
|
ttcheckers = W_CachePatchName("TTCHECK", PU_PATCH_LOWPRIORITY);
|
||||||
ttkflash = W_CachePatchName("TTKFLASH", PU_LEVEL);
|
ttkflash = W_CachePatchName("TTKFLASH", PU_PATCH_LOWPRIORITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
// (no longer) De-Demo'd Title Screen
|
// (no longer) De-Demo'd Title Screen
|
||||||
@@ -1006,7 +1010,7 @@ void F_TitleScreenDrawer(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
INT32 transval = 0;
|
INT32 transval = 0;
|
||||||
|
|
||||||
if (finalecount <= (50+(9<<1)))
|
if (finalecount <= (50+(9<<1)))
|
||||||
transval = (finalecount - 50)>>1;
|
transval = (finalecount - 50)>>1;
|
||||||
|
|
||||||
@@ -1053,8 +1057,8 @@ void F_TitleScreenTicker(boolean run)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// are demos disabled?
|
// are demos disabled?
|
||||||
if (!cv_rollingdemos.value)
|
if (!cv_rollingdemos.value || modifiedgame) // occasionally mappacks supply invalid replays which means the game crashes almost always when you idle on the titlescreen too long
|
||||||
return;
|
return; // we check for all addons since added luas/socs and stuff like that makes them desynch like crazy so why would you even watch them?
|
||||||
|
|
||||||
// Wait for a while (for the music to finish, preferably)
|
// Wait for a while (for the music to finish, preferably)
|
||||||
// before starting demos
|
// before starting demos
|
||||||
@@ -1186,7 +1190,7 @@ void F_StartWaitingPlayers(void)
|
|||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
sprframe = &skins[randskin].spritedef.spriteframes[(6+(i*3)) & FF_FRAMEMASK];
|
sprframe = &skins[randskin].spritedef.spriteframes[(6+(i*3)) & FF_FRAMEMASK];
|
||||||
driver[i] = W_CachePatchNum(sprframe->lumppat[1], PU_LEVEL);
|
driver[i] = W_CachePatchNum(sprframe->lumppat[1], PU_CACHE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1255,15 +1259,15 @@ void F_ContinueDrawer(void)
|
|||||||
ncontinues = 20;
|
ncontinues = 20;
|
||||||
|
|
||||||
if (imcontinuing)
|
if (imcontinuing)
|
||||||
contsonic = W_CachePatchName("CONT2", PU_CACHE);
|
contsonic = W_CachePatchName("CONT2", PU_PATCH_LOWPRIORITY);
|
||||||
else
|
else
|
||||||
contsonic = W_CachePatchName("CONT1", PU_CACHE);
|
contsonic = W_CachePatchName("CONT1", PU_PATCH_LOWPRIORITY);
|
||||||
|
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 100, 0, "CONTINUE?");
|
V_DrawCenteredString(BASEVIDWIDTH/2, 100, 0, "CONTINUE?");
|
||||||
|
|
||||||
// Draw a Sonic!
|
// Draw a Sonic!
|
||||||
V_DrawScaledPatch((BASEVIDWIDTH - SHORT(contsonic->width))/2, 32, 0, contsonic);
|
V_DrawScaledPatch((BASEVIDWIDTH - contsonic->width)/2, 32, 0, contsonic);
|
||||||
|
|
||||||
// Draw the continue markers! Show continues minus one.
|
// Draw the continue markers! Show continues minus one.
|
||||||
x -= ncontinues * 6;
|
x -= ncontinues * 6;
|
||||||
@@ -1482,10 +1486,10 @@ void F_CutsceneDrawer(void)
|
|||||||
{
|
{
|
||||||
if (cutscenes[cutnum]->scene[scenenum].pichires[picnum])
|
if (cutscenes[cutnum]->scene[scenenum].pichires[picnum])
|
||||||
V_DrawSmallScaledPatch(picxpos, picypos, 0,
|
V_DrawSmallScaledPatch(picxpos, picypos, 0,
|
||||||
W_CachePatchName(cutscenes[cutnum]->scene[scenenum].picname[picnum], PU_CACHE));
|
W_CachePatchName(cutscenes[cutnum]->scene[scenenum].picname[picnum], PU_PATCH_LOWPRIORITY));
|
||||||
else
|
else
|
||||||
V_DrawScaledPatch(picxpos,picypos, 0,
|
V_DrawScaledPatch(picxpos,picypos, 0,
|
||||||
W_CachePatchName(cutscenes[cutnum]->scene[scenenum].picname[picnum], PU_CACHE));
|
W_CachePatchName(cutscenes[cutnum]->scene[scenenum].picname[picnum], PU_PATCH_LOWPRIORITY));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dofadenow && rendermode != render_none)
|
if (dofadenow && rendermode != render_none)
|
||||||
|
|||||||
@@ -661,6 +661,10 @@ boolean preparefilemenu(boolean samedepth, boolean replayhut)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dirmenu != coredirmenu)
|
||||||
|
Z_Free(dirmenu);
|
||||||
|
dirmenu = NULL;
|
||||||
|
|
||||||
for (; sizecoredirmenu > 0; sizecoredirmenu--) // clear out existing items
|
for (; sizecoredirmenu > 0; sizecoredirmenu--) // clear out existing items
|
||||||
{
|
{
|
||||||
Z_Free(coredirmenu[sizecoredirmenu-1]);
|
Z_Free(coredirmenu[sizecoredirmenu-1]);
|
||||||
|
|||||||
+501
-391
File diff suppressed because it is too large.
Load diff
+24
-8
@@ -42,6 +42,7 @@ extern savebuffer_t demobuf;
|
|||||||
|
|
||||||
// demoplaying back and demo recording
|
// demoplaying back and demo recording
|
||||||
extern consvar_t cv_recordmultiplayerdemos, cv_netdemosyncquality, cv_maxdemosize, cv_demochangemap;
|
extern consvar_t cv_recordmultiplayerdemos, cv_netdemosyncquality, cv_maxdemosize, cv_demochangemap;
|
||||||
|
extern consvar_t cv_demodateformat;
|
||||||
|
|
||||||
// Publicly-accessible demo vars
|
// Publicly-accessible demo vars
|
||||||
struct demovars_s {
|
struct demovars_s {
|
||||||
@@ -83,6 +84,8 @@ typedef struct menudemo_s {
|
|||||||
menudemotype_e type;
|
menudemotype_e type;
|
||||||
|
|
||||||
char title[65]; // Null-terminated for string prints
|
char title[65]; // Null-terminated for string prints
|
||||||
|
char date[11]; // date when replay was recorded
|
||||||
|
char version[12]; // combined version and subversion
|
||||||
UINT16 map;
|
UINT16 map;
|
||||||
UINT8 addonstatus; // What do we need to do addon-wise to play this demo?
|
UINT8 addonstatus; // What do we need to do addon-wise to play this demo?
|
||||||
UINT8 gametype;
|
UINT8 gametype;
|
||||||
@@ -170,8 +173,10 @@ extern consvar_t cv_smallposnum;
|
|||||||
extern consvar_t cv_newspeedometer;
|
extern consvar_t cv_newspeedometer;
|
||||||
|
|
||||||
extern consvar_t cv_saltyhop;
|
extern consvar_t cv_saltyhop;
|
||||||
|
extern consvar_t cv_saltyheight;
|
||||||
extern consvar_t cv_saltyhopsfx;
|
extern consvar_t cv_saltyhopsfx;
|
||||||
extern consvar_t cv_saltysquish;
|
extern consvar_t cv_saltysquish;
|
||||||
|
extern consvar_t cv_saltyroll;
|
||||||
|
|
||||||
extern consvar_t cv_driftsparkpulse;
|
extern consvar_t cv_driftsparkpulse;
|
||||||
extern consvar_t cv_gravstretch;
|
extern consvar_t cv_gravstretch;
|
||||||
@@ -182,6 +187,10 @@ extern consvar_t cv_sloperolldist;
|
|||||||
extern consvar_t cv_sparkroll;
|
extern consvar_t cv_sparkroll;
|
||||||
extern consvar_t cv_spinoutroll;
|
extern consvar_t cv_spinoutroll;
|
||||||
|
|
||||||
|
extern consvar_t cv_squishdance, cv_squishdancespeed;
|
||||||
|
|
||||||
|
extern consvar_t cv_playerblendeffects;
|
||||||
|
|
||||||
extern consvar_t cv_cechotoggle;
|
extern consvar_t cv_cechotoggle;
|
||||||
|
|
||||||
#ifndef NONET
|
#ifndef NONET
|
||||||
@@ -379,16 +388,24 @@ boolean G_CheckDemoStatus(void);
|
|||||||
void G_SaveDemo(void);
|
void G_SaveDemo(void);
|
||||||
boolean G_DemoTitleResponder(event_t *ev);
|
boolean G_DemoTitleResponder(event_t *ev);
|
||||||
|
|
||||||
|
#define G_GametypeHasTeams() (G_IsGameType(GT_TEAMMATCH) || G_IsGameType(GT_CTF))
|
||||||
|
#define G_BattleGametype() (G_IsGameType(GT_MATCH))
|
||||||
|
#define G_RaceGametype() (G_IsGameType(GT_RACE))
|
||||||
|
#define G_TagGametype() (G_IsGameType(GT_TAG) || G_IsGameType(GT_HIDEANDSEEK))
|
||||||
|
|
||||||
|
FUNCINLINE static ATTRINLINE boolean G_IsGameType(int type)
|
||||||
|
{
|
||||||
|
return (gametype == type);
|
||||||
|
}
|
||||||
|
|
||||||
|
FUNCINLINE static ATTRINLINE boolean G_GametypeHasSpectators(void)
|
||||||
|
{
|
||||||
|
return (netgame || (multiplayer && demo.playback));
|
||||||
|
}
|
||||||
|
|
||||||
INT32 G_GetGametypeByName(const char *gametypestr);
|
INT32 G_GetGametypeByName(const char *gametypestr);
|
||||||
boolean G_IsSpecialStage(INT32 mapnum);
|
|
||||||
boolean G_GametypeUsesLives(void);
|
|
||||||
boolean G_GametypeHasTeams(void);
|
|
||||||
boolean G_GametypeHasSpectators(void);
|
|
||||||
boolean G_BattleGametype(void);
|
|
||||||
UINT8 G_SometimesGetDifferentGametype(UINT8 prefgametype);
|
UINT8 G_SometimesGetDifferentGametype(UINT8 prefgametype);
|
||||||
UINT8 G_GetGametypeColor(INT16 gt);
|
UINT8 G_GetGametypeColor(INT16 gt);
|
||||||
boolean G_RaceGametype(void);
|
|
||||||
boolean G_TagGametype(void);
|
|
||||||
void G_ExitLevel(void);
|
void G_ExitLevel(void);
|
||||||
void G_NextLevel(void);
|
void G_NextLevel(void);
|
||||||
void G_Continue(void);
|
void G_Continue(void);
|
||||||
@@ -418,7 +435,6 @@ void G_SetRetryFlag(void);
|
|||||||
void G_ClearRetryFlag(void);
|
void G_ClearRetryFlag(void);
|
||||||
boolean G_GetRetryFlag(void);
|
boolean G_GetRetryFlag(void);
|
||||||
|
|
||||||
|
|
||||||
void G_LoadGameData(void);
|
void G_LoadGameData(void);
|
||||||
void G_LoadGameSettings(void);
|
void G_LoadGameSettings(void);
|
||||||
|
|
||||||
|
|||||||
+141
-160
@@ -20,6 +20,8 @@
|
|||||||
#include "d_net.h"
|
#include "d_net.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
|
|
||||||
|
#include "m_menu.h"
|
||||||
|
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "i_video.h"
|
#include "i_video.h"
|
||||||
#include "r_draw.h"
|
#include "r_draw.h"
|
||||||
@@ -56,44 +58,35 @@ consvar_t cv_rumble[MAXSPLITSCREENPLAYERS] = {
|
|||||||
{"rumble4", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, rumble_off_handle4, 0, NULL, NULL, 0, 0, NULL}
|
{"rumble4", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, rumble_off_handle4, 0, NULL, NULL, 0, 0, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static CV_PossibleValue_t gamepadled_cons_t[] = {{0, "Off"}, {1, "Skincolor"}, {2, "Mobjcolor"}, {0, NULL}};
|
||||||
consvar_t cv_gamepadled[MAXSPLITSCREENPLAYERS] = {
|
consvar_t cv_gamepadled[MAXSPLITSCREENPLAYERS] = {
|
||||||
{"gamepadled", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle, 0, NULL, NULL, 0, 0, NULL},
|
{"gamepadled", "Skincolor", CV_SAVE|CV_CALL|CV_NOINIT, gamepadled_cons_t, led_off_handle, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"gamepadled2", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle2, 0, NULL, NULL, 0, 0, NULL},
|
{"gamepadled2", "Skincolor", CV_SAVE|CV_CALL|CV_NOINIT, gamepadled_cons_t, led_off_handle2, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"gamepadled3", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle3, 0, NULL, NULL, 0, 0, NULL},
|
{"gamepadled3", "Skincolor", CV_SAVE|CV_CALL|CV_NOINIT, gamepadled_cons_t, led_off_handle3, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"gamepadled4", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle4, 0, NULL, NULL, 0, 0, NULL}
|
{"gamepadled4", "Skincolor", CV_SAVE|CV_CALL|CV_NOINIT, gamepadled_cons_t, led_off_handle4, 0, NULL, NULL, 0, 0, NULL}
|
||||||
};
|
|
||||||
|
|
||||||
consvar_t cv_ledpowerup[MAXSPLITSCREENPLAYERS] = {
|
|
||||||
{"ledpowerup", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle, 0, NULL, NULL, 0, 0, NULL},
|
|
||||||
{"ledpowerup2", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle2, 0, NULL, NULL, 0, 0, NULL},
|
|
||||||
{"ledpowerup3", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle3, 0, NULL, NULL, 0, 0, NULL},
|
|
||||||
{"ledpowerup4", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, led_off_handle4, 0, NULL, NULL, 0, 0, NULL}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void rumble_off_handle(void)
|
static void rumble_off_handle(void)
|
||||||
{
|
{
|
||||||
if (cv_rumble[0].value == 0)
|
if (!cv_rumble[0].value)
|
||||||
G_ResetPlayerDeviceRumble(0);
|
G_ResetPlayerDeviceRumble(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void rumble_off_handle2(void)
|
static void rumble_off_handle2(void)
|
||||||
{
|
{
|
||||||
if (cv_rumble[1].value == 0)
|
if (!cv_rumble[1].value)
|
||||||
G_ResetPlayerDeviceRumble(1);
|
G_ResetPlayerDeviceRumble(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void rumble_off_handle3(void)
|
static void rumble_off_handle3(void)
|
||||||
{
|
{
|
||||||
if (cv_rumble[2].value == 0)
|
if (!cv_rumble[2].value)
|
||||||
G_ResetPlayerDeviceRumble(2);
|
G_ResetPlayerDeviceRumble(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void rumble_off_handle4(void)
|
static void rumble_off_handle4(void)
|
||||||
{
|
{
|
||||||
if (cv_rumble[3].value == 0)
|
if (!cv_rumble[3].value)
|
||||||
G_ResetPlayerDeviceRumble(3);
|
G_ResetPlayerDeviceRumble(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,19 +95,16 @@ static void led_off_handle(void)
|
|||||||
G_ResetPlayerGamepadIndicatorColor(0);
|
G_ResetPlayerGamepadIndicatorColor(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void led_off_handle2(void)
|
static void led_off_handle2(void)
|
||||||
{
|
{
|
||||||
G_ResetPlayerGamepadIndicatorColor(1);
|
G_ResetPlayerGamepadIndicatorColor(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void led_off_handle3(void)
|
static void led_off_handle3(void)
|
||||||
{
|
{
|
||||||
G_ResetPlayerGamepadIndicatorColor(2);
|
G_ResetPlayerGamepadIndicatorColor(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void led_off_handle4(void)
|
static void led_off_handle4(void)
|
||||||
{
|
{
|
||||||
G_ResetPlayerGamepadIndicatorColor(3);
|
G_ResetPlayerGamepadIndicatorColor(3);
|
||||||
@@ -131,10 +121,7 @@ joy3xmove[JOYAXISSET], joy3ymove[JOYAXISSET], joy4xmove[JOYAXISSET], joy4ymove[J
|
|||||||
UINT8 gamekeydown[NUMINPUTS];
|
UINT8 gamekeydown[NUMINPUTS];
|
||||||
|
|
||||||
// two key codes (or virtual key) per game control
|
// two key codes (or virtual key) per game control
|
||||||
INT32 gamecontrol[num_gamecontrols][2];
|
INT32 gamecontrol[MAXSPLITSCREENPLAYERS][num_gamecontrols][2];
|
||||||
INT32 gamecontrolbis[num_gamecontrols][2]; // secondary splitscreen player
|
|
||||||
INT32 gamecontrol3[num_gamecontrols][2]; // tertiary splitscreen player
|
|
||||||
INT32 gamecontrol4[num_gamecontrols][2]; // quarternary splitscreen player
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -264,6 +251,26 @@ void G_MapEventsToControls(event_t *ev)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void G_ResetControls(void)
|
||||||
|
{
|
||||||
|
memset(gamekeydown, 0, NUMINPUTS);
|
||||||
|
|
||||||
|
memset(joyxmove, 0, sizeof(joyxmove));
|
||||||
|
memset(joyymove, 0, sizeof(joyymove));
|
||||||
|
|
||||||
|
memset(joy2xmove, 0, sizeof(joy2xmove));
|
||||||
|
memset(joy2ymove, 0, sizeof(joy2ymove));
|
||||||
|
|
||||||
|
memset(joy3xmove, 0, sizeof(joy3xmove));
|
||||||
|
memset(joy3ymove, 0, sizeof(joy3ymove));
|
||||||
|
|
||||||
|
memset(joy4xmove, 0, sizeof(joy4xmove));
|
||||||
|
memset(joy4ymove, 0, sizeof(joy4ymove));
|
||||||
|
|
||||||
|
// reset those just in case the game missed the keyup event
|
||||||
|
memset(dpadscrollstate, false, sizeof(dpadscrollstate));
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// General double-click detection routine for any kind of input.
|
// General double-click detection routine for any kind of input.
|
||||||
//
|
//
|
||||||
@@ -881,13 +888,16 @@ UINT16 G_GetSkinColor(INT32 playernum)
|
|||||||
{
|
{
|
||||||
player_t *player = &players[displayplayers[playernum]];
|
player_t *player = &players[displayplayers[playernum]];
|
||||||
|
|
||||||
// make rgb rainbow vomit when invul or flash blue when grow
|
if (player)
|
||||||
if (cv_ledpowerup[playernum].value && player->mo && (player->kartstuff[k_invincibilitytimer] || player->kartstuff[k_growshrinktimer] || player->powers[pw_invulnerability]))
|
{
|
||||||
return player->mo->color;
|
// make rgb rainbow vomit when invul or flash blue when grow
|
||||||
|
if ((cv_gamepadled[playernum].value == 2) && player->mo && player->mo->color)
|
||||||
|
return player->mo->color;
|
||||||
|
|
||||||
// take actual player skincolour when ingame
|
// take actual player skincolour when ingame
|
||||||
if (player->skincolor)
|
if (player->skincolor)
|
||||||
return player->skincolor;
|
return player->skincolor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// otherwise just fallback to whatever the cvar is
|
// otherwise just fallback to whatever the cvar is
|
||||||
@@ -944,13 +954,10 @@ static void G_ResetPlayerDeviceRumble(INT32 playernum)
|
|||||||
void G_ResetAllDeviceRumbles(void)
|
void G_ResetAllDeviceRumbles(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int devices;
|
|
||||||
|
|
||||||
devices = I_NumJoys();
|
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||||
|
|
||||||
for (i = 0; i < devices; i++)
|
|
||||||
{
|
{
|
||||||
I_GamepadRumble(devices, 0, 0, 0);
|
I_GamepadRumble(i, 0, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -977,13 +984,14 @@ void G_ClearControlKeys(INT32 (*setupcontrols)[2], INT32 control)
|
|||||||
|
|
||||||
void G_ClearAllControlKeys(void)
|
void G_ClearAllControlKeys(void)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i, k;
|
||||||
for (i = 0; i < num_gamecontrols; i++)
|
|
||||||
|
for (k = 0; k < MAXSPLITSCREENPLAYERS; k++)
|
||||||
{
|
{
|
||||||
G_ClearControlKeys(gamecontrol, i);
|
for (i = 0; i < num_gamecontrols; i++)
|
||||||
G_ClearControlKeys(gamecontrolbis, i);
|
{
|
||||||
G_ClearControlKeys(gamecontrol3, i);
|
G_ClearControlKeys(gamecontrol[k], i);
|
||||||
G_ClearControlKeys(gamecontrol4, i);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1022,7 +1030,7 @@ INT32 G_KeyStringtoNum(const char *keystr)
|
|||||||
if (!keystr[0])
|
if (!keystr[0])
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z')
|
if (!keystr[0] || (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z'))
|
||||||
return keystr[0];
|
return keystr[0];
|
||||||
|
|
||||||
if (!strncmp(keystr, "KEY", 3) && keystr[3] >= '0' && keystr[3] <= '9')
|
if (!strncmp(keystr, "KEY", 3) && keystr[3] >= '0' && keystr[3] <= '9')
|
||||||
@@ -1041,158 +1049,131 @@ void G_Controldefault(UINT8 player)
|
|||||||
if (player == 0 || player == 1)
|
if (player == 0 || player == 1)
|
||||||
{
|
{
|
||||||
// Main controls
|
// Main controls
|
||||||
gamecontrol[gc_aimforward ][0] = KEY_UPARROW;
|
gamecontrol[0][gc_aimforward ][0] = KEY_UPARROW;
|
||||||
gamecontrol[gc_aimbackward][0] = KEY_DOWNARROW;
|
gamecontrol[0][gc_aimbackward][0] = KEY_DOWNARROW;
|
||||||
gamecontrol[gc_turnleft ][0] = KEY_LEFTARROW;
|
gamecontrol[0][gc_turnleft ][0] = KEY_LEFTARROW;
|
||||||
gamecontrol[gc_turnright ][0] = KEY_RIGHTARROW;
|
gamecontrol[0][gc_turnright ][0] = KEY_RIGHTARROW;
|
||||||
gamecontrol[gc_accelerate ][0] = 'a';
|
gamecontrol[0][gc_accelerate ][0] = 'a';
|
||||||
gamecontrol[gc_drift ][0] = 's';
|
gamecontrol[0][gc_drift ][0] = 's';
|
||||||
gamecontrol[gc_brake ][0] = 'd';
|
gamecontrol[0][gc_brake ][0] = 'd';
|
||||||
gamecontrol[gc_fire ][0] = KEY_SPACE;
|
gamecontrol[0][gc_fire ][0] = KEY_SPACE;
|
||||||
gamecontrol[gc_lookback ][0] = KEY_LSHIFT;
|
gamecontrol[0][gc_lookback ][0] = KEY_LSHIFT;
|
||||||
|
|
||||||
gamecontrol[gc_accelerate ][1] = KEY_JOY1+0; // A
|
gamecontrol[0][gc_accelerate ][1] = KEY_JOY1+0; // A
|
||||||
gamecontrol[gc_lookback ][1] = KEY_JOY1+2; // X
|
gamecontrol[0][gc_lookback ][1] = KEY_JOY1+2; // X
|
||||||
gamecontrol[gc_brake ][1] = KEY_JOY1+1; // B
|
gamecontrol[0][gc_brake ][1] = KEY_JOY1+1; // B
|
||||||
gamecontrol[gc_fire ][1] = KEY_JOY1+9; // LB
|
gamecontrol[0][gc_fire ][1] = KEY_JOY1+9; // LB
|
||||||
gamecontrol[gc_drift ][1] = KEY_JOY1+10; // RB
|
gamecontrol[0][gc_drift ][1] = KEY_JOY1+10; // RB
|
||||||
|
|
||||||
// Extra controls
|
// Extra controls
|
||||||
gamecontrol[gc_pause ][0] = KEY_PAUSE;
|
gamecontrol[0][gc_pause ][0] = KEY_PAUSE;
|
||||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
gamecontrol[0][gc_console ][0] = KEY_CONSOLE;
|
||||||
gamecontrol[gc_screenshot ][0] = KEY_F8;
|
gamecontrol[0][gc_screenshot ][0] = KEY_F8;
|
||||||
gamecontrol[gc_recordgif ][0] = KEY_F9;
|
gamecontrol[0][gc_recordgif ][0] = KEY_F9;
|
||||||
gamecontrol[gc_viewpoint ][0] = KEY_F12;
|
gamecontrol[0][gc_viewpoint ][0] = KEY_F12;
|
||||||
gamecontrol[gc_talkkey ][0] = 't';
|
gamecontrol[0][gc_talkkey ][0] = 't';
|
||||||
//gamecontrol[gc_teamkey ][0] = 'y';
|
//gamecontrol[gc_teamkey ][0] = 'y';
|
||||||
gamecontrol[gc_scores ][0] = KEY_TAB;
|
gamecontrol[0][gc_scores ][0] = KEY_TAB;
|
||||||
gamecontrol[gc_spectate ][0] = '\'';
|
gamecontrol[0][gc_spectate ][0] = '\'';
|
||||||
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
gamecontrol[0][gc_lookup ][0] = KEY_PGUP;
|
||||||
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
gamecontrol[0][gc_lookdown ][0] = KEY_PGDN;
|
||||||
gamecontrol[gc_centerview ][0] = KEY_END;
|
gamecontrol[0][gc_centerview ][0] = KEY_END;
|
||||||
gamecontrol[gc_camreset ][0] = KEY_HOME;
|
gamecontrol[0][gc_camreset ][0] = KEY_HOME;
|
||||||
gamecontrol[gc_camtoggle ][0] = KEY_BACKSPACE;
|
gamecontrol[0][gc_camtoggle ][0] = KEY_BACKSPACE;
|
||||||
|
|
||||||
gamecontrol[gc_viewpoint ][1] = KEY_JOY1+3; // Y
|
gamecontrol[0][gc_viewpoint ][1] = KEY_JOY1+3; // Y
|
||||||
gamecontrol[gc_pause ][1] = KEY_JOY1+4; // Back
|
gamecontrol[0][gc_pause ][1] = KEY_JOY1+4; // Back
|
||||||
gamecontrol[gc_systemmenu ][0] = KEY_JOY1+6; // Start
|
gamecontrol[0][gc_systemmenu ][0] = KEY_JOY1+6; // Start
|
||||||
//gamecontrol[gc_camtoggle ][1] = KEY_HAT1+0; // D-Pad Up
|
//gamecontrol[0][gc_camtoggle ][1] = KEY_HAT1+0; // D-Pad Up
|
||||||
//gamecontrol[gc_screenshot ][1] = KEY_HAT1+1; // D-Pad Down // absolutely fucking NOT
|
//gamecontrol[0][gc_screenshot ][1] = KEY_HAT1+1; // D-Pad Down // absolutely fucking NOT
|
||||||
gamecontrol[gc_talkkey ][1] = KEY_HAT1+1; // D-Pad Down
|
gamecontrol[0][gc_talkkey ][1] = KEY_HAT1+1; // D-Pad Down
|
||||||
gamecontrol[gc_scores ][1] = KEY_HAT1+0; // D-Pad Up
|
gamecontrol[0][gc_scores ][1] = KEY_HAT1+0; // D-Pad Up
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player == 0 || player == 2)
|
if (player == 0 || player == 2)
|
||||||
{
|
{
|
||||||
// Player 2 controls
|
// Player 2 controls
|
||||||
gamecontrolbis[gc_accelerate ][0] = KEY_2JOY1+0; // A
|
gamecontrol[1][gc_accelerate ][0] = KEY_2JOY1+0; // A
|
||||||
gamecontrolbis[gc_lookback ][0] = KEY_2JOY1+2; // X
|
gamecontrol[1][gc_lookback ][0] = KEY_2JOY1+2; // X
|
||||||
gamecontrolbis[gc_brake ][0] = KEY_2JOY1+1; // B
|
gamecontrol[1][gc_brake ][0] = KEY_2JOY1+1; // B
|
||||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+9; // LB
|
gamecontrol[1][gc_fire ][0] = KEY_2JOY1+9; // LB
|
||||||
gamecontrolbis[gc_drift ][0] = KEY_2JOY1+10; // RB
|
gamecontrol[1][gc_drift ][0] = KEY_2JOY1+10; // RB
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player == 0 || player == 3)
|
if (player == 0 || player == 3)
|
||||||
{
|
{
|
||||||
// Player 3 controls
|
// Player 3 controls
|
||||||
gamecontrol3[gc_accelerate ][0] = KEY_3JOY1+0; // A
|
gamecontrol[2][gc_accelerate ][0] = KEY_3JOY1+0; // A
|
||||||
gamecontrol3[gc_lookback ][0] = KEY_3JOY1+2; // X
|
gamecontrol[2][gc_lookback ][0] = KEY_3JOY1+2; // X
|
||||||
gamecontrol3[gc_brake ][0] = KEY_3JOY1+1; // B
|
gamecontrol[2][gc_brake ][0] = KEY_3JOY1+1; // B
|
||||||
gamecontrol3[gc_fire ][0] = KEY_3JOY1+9; // LB
|
gamecontrol[2][gc_fire ][0] = KEY_3JOY1+9; // LB
|
||||||
gamecontrol3[gc_drift ][0] = KEY_3JOY1+10; // RB
|
gamecontrol[2][gc_drift ][0] = KEY_3JOY1+10; // RB
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player == 0 || player == 4)
|
if (player == 0 || player == 4)
|
||||||
{
|
{
|
||||||
// Player 4 controls
|
// Player 4 controls
|
||||||
gamecontrol4[gc_accelerate ][0] = KEY_4JOY1+0; // A
|
gamecontrol[3][gc_accelerate ][0] = KEY_4JOY1+0; // A
|
||||||
gamecontrol4[gc_lookback ][0] = KEY_4JOY1+2; // X
|
gamecontrol[3][gc_lookback ][0] = KEY_4JOY1+2; // X
|
||||||
gamecontrol4[gc_brake ][0] = KEY_4JOY1+1; // B
|
gamecontrol[3][gc_brake ][0] = KEY_4JOY1+1; // B
|
||||||
gamecontrol4[gc_fire ][0] = KEY_4JOY1+9; // LB
|
gamecontrol[3][gc_fire ][0] = KEY_4JOY1+9; // LB
|
||||||
gamecontrol4[gc_drift ][0] = KEY_4JOY1+10; // RB
|
gamecontrol[3][gc_drift ][0] = KEY_4JOY1+10; // RB
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void G_SaveKeySetting(FILE *f)
|
void G_SaveKeySetting(FILE *f)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i, k;
|
||||||
|
|
||||||
for (i = 1; i < num_gamecontrols; i++)
|
static const char *controltext[MAXSPLITSCREENPLAYERS] = {
|
||||||
|
"setcontrol",
|
||||||
|
"setcontrol2",
|
||||||
|
"setcontrol3",
|
||||||
|
"setcontrol4"
|
||||||
|
};
|
||||||
|
|
||||||
|
for (k = 0; k < MAXSPLITSCREENPLAYERS; k++)
|
||||||
{
|
{
|
||||||
fprintf(f, "setcontrol \"%s\" \"%s\"", gamecontrolname[i],
|
for (i = 1; i < num_gamecontrols; i++)
|
||||||
G_KeynumToString(gamecontrol[i][0]));
|
{
|
||||||
|
fprintf(f, "%s \"%s\" \"%s\"", controltext[k], gamecontrolname[i],
|
||||||
|
G_KeynumToString(gamecontrol[k][i][0]));
|
||||||
|
|
||||||
if (gamecontrol[i][1])
|
if (gamecontrol[k][i][1])
|
||||||
fprintf(f, " \"%s\"\n", G_KeynumToString(gamecontrol[i][1]));
|
fprintf(f, " \"%s\"\n", G_KeynumToString(gamecontrol[k][i][1]));
|
||||||
else
|
else
|
||||||
fprintf(f, "\n");
|
fprintf(f, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 1; i < num_gamecontrols; i++)
|
|
||||||
{
|
|
||||||
fprintf(f, "setcontrol2 \"%s\" \"%s\"", gamecontrolname[i],
|
|
||||||
G_KeynumToString(gamecontrolbis[i][0]));
|
|
||||||
|
|
||||||
if (gamecontrolbis[i][1])
|
|
||||||
fprintf(f, " \"%s\"\n", G_KeynumToString(gamecontrolbis[i][1]));
|
|
||||||
else
|
|
||||||
fprintf(f, "\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 1; i < num_gamecontrols; i++)
|
|
||||||
{
|
|
||||||
fprintf(f, "setcontrol3 \"%s\" \"%s\"", gamecontrolname[i],
|
|
||||||
G_KeynumToString(gamecontrol3[i][0]));
|
|
||||||
|
|
||||||
if (gamecontrol3[i][1])
|
|
||||||
fprintf(f, " \"%s\"\n", G_KeynumToString(gamecontrol3[i][1]));
|
|
||||||
else
|
|
||||||
fprintf(f, "\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 1; i < num_gamecontrols; i++)
|
|
||||||
{
|
|
||||||
fprintf(f, "setcontrol4 \"%s\" \"%s\"", gamecontrolname[i],
|
|
||||||
G_KeynumToString(gamecontrol4[i][0]));
|
|
||||||
|
|
||||||
if (gamecontrol4[i][1])
|
|
||||||
fprintf(f, " \"%s\"\n", G_KeynumToString(gamecontrol4[i][1]));
|
|
||||||
else
|
|
||||||
fprintf(f, "\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
INT32 G_CheckDoubleUsage(INT32 keynum, boolean modify)
|
INT32 G_CheckDoubleUsage(INT32 keynum, boolean modify)
|
||||||
{
|
{
|
||||||
INT32 result = gc_null;
|
INT32 result = gc_null;
|
||||||
|
|
||||||
if (cv_controlperkey.value == 1)
|
if (cv_controlperkey.value == 1)
|
||||||
{
|
{
|
||||||
INT32 i, j;
|
INT32 i, j, k;
|
||||||
for (i = 0; i < num_gamecontrols; i++)
|
|
||||||
|
for (k = 0; k < MAXSPLITSCREENPLAYERS; k++)
|
||||||
{
|
{
|
||||||
for (j = 0; j < 2; j++)
|
for (i = 0; i < num_gamecontrols; i++)
|
||||||
{
|
{
|
||||||
if (gamecontrol[i][j] == keynum) {
|
for (j = 0; j < 2; j++)
|
||||||
result = i;
|
{
|
||||||
if (modify) gamecontrol[i][j] = KEY_NULL;
|
if (gamecontrol[k][i][j] == keynum)
|
||||||
|
{
|
||||||
|
result = i;
|
||||||
|
if (modify) gamecontrol[k][i][j] = KEY_NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result && !modify)
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
if (gamecontrolbis[i][j] == keynum) {
|
|
||||||
result = i;
|
|
||||||
if (modify) gamecontrolbis[i][j] = KEY_NULL;
|
|
||||||
}
|
|
||||||
if (gamecontrol3[i][j] == keynum) {
|
|
||||||
result = i;
|
|
||||||
if (modify) gamecontrol3[i][j] = KEY_NULL;
|
|
||||||
}
|
|
||||||
if (gamecontrol4[i][j] == keynum) {
|
|
||||||
result = i;
|
|
||||||
if (modify) gamecontrol4[i][j] = KEY_NULL;
|
|
||||||
}
|
|
||||||
if (result && !modify)
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1346,11 +1327,11 @@ static void setcontrol(INT32 (*gc)[2])
|
|||||||
INT32 player;
|
INT32 player;
|
||||||
boolean nestedoverride = false;
|
boolean nestedoverride = false;
|
||||||
|
|
||||||
if ((void*)gc == (void*)&gamecontrol4)
|
if ((void*)gc == (void*)&gamecontrol[3])
|
||||||
player = 3;
|
player = 3;
|
||||||
else if ((void*)gc == (void*)&gamecontrol3)
|
else if ((void*)gc == (void*)&gamecontrol[2])
|
||||||
player = 2;
|
player = 2;
|
||||||
else if ((void*)gc == (void*)&gamecontrolbis)
|
else if ((void*)gc == (void*)&gamecontrol[1])
|
||||||
player = 1;
|
player = 1;
|
||||||
else
|
else
|
||||||
player = 0;
|
player = 0;
|
||||||
@@ -1413,7 +1394,7 @@ void Command_Setcontrol_f(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setcontrol(gamecontrol);
|
setcontrol(gamecontrol[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Command_Setcontrol2_f(void)
|
void Command_Setcontrol2_f(void)
|
||||||
@@ -1428,7 +1409,7 @@ void Command_Setcontrol2_f(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setcontrol(gamecontrolbis);
|
setcontrol(gamecontrol[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Command_Setcontrol3_f(void)
|
void Command_Setcontrol3_f(void)
|
||||||
@@ -1443,7 +1424,7 @@ void Command_Setcontrol3_f(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setcontrol(gamecontrol3);
|
setcontrol(gamecontrol[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Command_Setcontrol4_f(void)
|
void Command_Setcontrol4_f(void)
|
||||||
@@ -1458,5 +1439,5 @@ void Command_Setcontrol4_f(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setcontrol(gamecontrol4);
|
setcontrol(gamecontrol[3]);
|
||||||
}
|
}
|
||||||
+7
-9
@@ -109,7 +109,6 @@ extern consvar_t cv_mousesens, cv_mouseysens;
|
|||||||
extern consvar_t cv_controlperkey, cv_turnsmooth;
|
extern consvar_t cv_controlperkey, cv_turnsmooth;
|
||||||
extern consvar_t cv_rumble[MAXSPLITSCREENPLAYERS];
|
extern consvar_t cv_rumble[MAXSPLITSCREENPLAYERS];
|
||||||
extern consvar_t cv_gamepadled[MAXSPLITSCREENPLAYERS];
|
extern consvar_t cv_gamepadled[MAXSPLITSCREENPLAYERS];
|
||||||
extern consvar_t cv_ledpowerup[MAXSPLITSCREENPLAYERS];
|
|
||||||
|
|
||||||
extern INT32 mousex, mousey;
|
extern INT32 mousex, mousey;
|
||||||
extern INT32 mlooky; //mousey with mlookSensitivity
|
extern INT32 mlooky; //mousey with mlookSensitivity
|
||||||
@@ -121,14 +120,12 @@ extern INT32 joyxmove[JOYAXISSET], joyymove[JOYAXISSET], joy2xmove[JOYAXISSET],
|
|||||||
extern UINT8 gamekeydown[NUMINPUTS];
|
extern UINT8 gamekeydown[NUMINPUTS];
|
||||||
|
|
||||||
// two key codes (or virtual key) per game control
|
// two key codes (or virtual key) per game control
|
||||||
extern INT32 gamecontrol[num_gamecontrols][2];
|
extern INT32 gamecontrol[MAXSPLITSCREENPLAYERS][num_gamecontrols][2];
|
||||||
extern INT32 gamecontrolbis[num_gamecontrols][2]; // secondary splitscreen player
|
|
||||||
extern INT32 gamecontrol3[num_gamecontrols][2];
|
#define PLAYER1INPUTDOWN(gc) (gamekeydown[gamecontrol[0][gc][0]] || gamekeydown[gamecontrol[0][gc][1]])
|
||||||
extern INT32 gamecontrol4[num_gamecontrols][2];
|
#define PLAYER2INPUTDOWN(gc) (gamekeydown[gamecontrol[1][gc][0]] || gamekeydown[gamecontrol[1][gc][1]])
|
||||||
#define PLAYER1INPUTDOWN(gc) (gamekeydown[gamecontrol[gc][0]] || gamekeydown[gamecontrol[gc][1]])
|
#define PLAYER3INPUTDOWN(gc) (gamekeydown[gamecontrol[2][gc][0]] || gamekeydown[gamecontrol[2][gc][1]])
|
||||||
#define PLAYER2INPUTDOWN(gc) (gamekeydown[gamecontrolbis[gc][0]] || gamekeydown[gamecontrolbis[gc][1]])
|
#define PLAYER4INPUTDOWN(gc) (gamekeydown[gamecontrol[3][gc][0]] || gamekeydown[gamecontrol[3][gc][1]])
|
||||||
#define PLAYER3INPUTDOWN(gc) (gamekeydown[gamecontrol3[gc][0]] || gamekeydown[gamecontrol3[gc][1]])
|
|
||||||
#define PLAYER4INPUTDOWN(gc) (gamekeydown[gamecontrol4[gc][0]] || gamekeydown[gamecontrol4[gc][1]])
|
|
||||||
|
|
||||||
// peace to my little coder fingers!
|
// peace to my little coder fingers!
|
||||||
// check a gamecontrol being active or not
|
// check a gamecontrol being active or not
|
||||||
@@ -140,6 +137,7 @@ void G_PlayerDeviceRumble(INT32 playernum, UINT16 low_strength, UINT16 high_stre
|
|||||||
|
|
||||||
// remaps the input event to a game control.
|
// remaps the input event to a game control.
|
||||||
void G_MapEventsToControls(event_t *ev);
|
void G_MapEventsToControls(event_t *ev);
|
||||||
|
void G_ResetControls(void);
|
||||||
|
|
||||||
// returns the name of a key
|
// returns the name of a key
|
||||||
const char *G_KeynumToString(INT32 keynum);
|
const char *G_KeynumToString(INT32 keynum);
|
||||||
|
|||||||
Loaded 100 of 293 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user