Upload
This commit is contained in:
commit
43352ff262
1291 changed files with 220976 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/.project
|
||||||
BIN
3DS/ALKU2.PRJ
Normal file
BIN
3DS/ALKU2.PRJ
Normal file
Binary file not shown.
2574
3DS/CITY.ASC
Normal file
2574
3DS/CITY.ASC
Normal file
File diff suppressed because it is too large
Load diff
BIN
3DS/CITYBBK.3DS
Normal file
BIN
3DS/CITYBBK.3DS
Normal file
Binary file not shown.
BIN
3DS/CITYREL3.PRJ
Normal file
BIN
3DS/CITYREL3.PRJ
Normal file
Binary file not shown.
BIN
3DS/I_SHP_3.3DS
Normal file
BIN
3DS/I_SHP_3.3DS
Normal file
Binary file not shown.
279
3DS/MIKKO.VUE
Normal file
279
3DS/MIKKO.VUE
Normal file
|
|
@ -0,0 +1,279 @@
|
||||||
|
|
||||||
|
frame 0
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 992.2941 -2008.3781 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 1
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 1251.9691 -1843.2548 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 2
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 1432.126 -1663.0979 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 3
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 1648.3141 -1266.7529 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 4
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 1810.4552 -906.4392 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 5
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 1954.5806 -528.1099 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 6
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 1972.5963 -167.7963 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 7
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 1900.5336 300.6115 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 8
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 1738.3925 606.8781 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 9
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 1612.2827 787.0349 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 10
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 1450.1416 1021.2388 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 11
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 1125.8594 1165.3643 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 12
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 531.3419 1327.5054 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 13
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 153.0126 1111.3171 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 14
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera -207.3011 1003.2231 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 15
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera -495.5519 823.0662 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 16
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera -717.7454 799.0453 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 17
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera -963.9597 769.0192 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 18
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera -1396.3361 552.8311 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 19
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera -1882.7595 84.4233 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 20
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera -2026.885 -492.0785 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 21
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera -1918.791 -1122.6273 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 22
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera -1612.5244 -1609.0508 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 23
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera -1108.0853 -2005.3958 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 24
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera -837.8501 -2131.5056 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 25
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera -351.4268 -2185.5527 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 26
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera -207.1788 -2185.5527 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 27
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 79.581 -2313.1538 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 28
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 474.3122 -2254.6331 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 29
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 676.9583 -2175.115 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
|
|
||||||
|
frame 30
|
||||||
|
transform "Object" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object01" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object02" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
transform "Object03" 1 0 0 0 1 0 0 0 1 0 0 0
|
||||||
|
spotlight "Light03" 351.3406 -1814.2559 0 123.9621 -237.3054 63.4363 0.5529 0.5529 0.5529 3 7.5
|
||||||
|
spotlight "Light01" -909.4925 1005.9252 0 -335.7399 -182.0046 0 0.7333 0.7333 0.7333 1 9.25
|
||||||
|
camera 855.6239 -2116.4724 -449.8637 0 -2.6717 -2.6534 0.75 192
|
||||||
BIN
3DS/PASKA2.3DS
Normal file
BIN
3DS/PASKA2.3DS
Normal file
Binary file not shown.
BIN
3DS/PEILI.PRJ
Normal file
BIN
3DS/PEILI.PRJ
Normal file
Binary file not shown.
BIN
3DS/PEILI2.PRJ
Normal file
BIN
3DS/PEILI2.PRJ
Normal file
Binary file not shown.
BIN
3DS/PXLSHIP.3DS
Normal file
BIN
3DS/PXLSHIP.3DS
Normal file
Binary file not shown.
BIN
3DS/PXLSHIP2.3DS
Normal file
BIN
3DS/PXLSHIP2.3DS
Normal file
Binary file not shown.
BIN
3DS/PXLSHIP3.3DS
Normal file
BIN
3DS/PXLSHIP3.3DS
Normal file
Binary file not shown.
BIN
3DS/U2CITY10.PRJ
Normal file
BIN
3DS/U2CITY10.PRJ
Normal file
Binary file not shown.
BIN
3DS/U2CITY11.PRJ
Normal file
BIN
3DS/U2CITY11.PRJ
Normal file
Binary file not shown.
BIN
3DS/U2CITY2.PRJ
Normal file
BIN
3DS/U2CITY2.PRJ
Normal file
Binary file not shown.
BIN
3DS/U2CITY3.PRJ
Normal file
BIN
3DS/U2CITY3.PRJ
Normal file
Binary file not shown.
BIN
3DS/U2CITY4.PRJ
Normal file
BIN
3DS/U2CITY4.PRJ
Normal file
Binary file not shown.
BIN
3DS/U2CITY5.PRJ
Normal file
BIN
3DS/U2CITY5.PRJ
Normal file
Binary file not shown.
BIN
3DS/U2CITY6.PRJ
Normal file
BIN
3DS/U2CITY6.PRJ
Normal file
Binary file not shown.
BIN
3DS/U2CITY7.PRJ
Normal file
BIN
3DS/U2CITY7.PRJ
Normal file
Binary file not shown.
BIN
3DS/U2CITY8.PRJ
Normal file
BIN
3DS/U2CITY8.PRJ
Normal file
Binary file not shown.
BIN
3DS/U2CITY9.PRJ
Normal file
BIN
3DS/U2CITY9.PRJ
Normal file
Binary file not shown.
BIN
3DS/U2E.PRJ
Normal file
BIN
3DS/U2E.PRJ
Normal file
Binary file not shown.
BIN
3DS/UUSALKU.3DS
Normal file
BIN
3DS/UUSALKU.3DS
Normal file
Binary file not shown.
1254
3DS/UUSALKU.ASC
Normal file
1254
3DS/UUSALKU.ASC
Normal file
File diff suppressed because it is too large
Load diff
BIN
3DS/UUSALKU.PRJ
Normal file
BIN
3DS/UUSALKU.PRJ
Normal file
Binary file not shown.
BIN
ALKU/ALKU.DSK
Normal file
BIN
ALKU/ALKU.DSK
Normal file
Binary file not shown.
BIN
ALKU/ALKU.PRJ
Normal file
BIN
ALKU/ALKU.PRJ
Normal file
Binary file not shown.
110
ALKU/ASMYT.ASM
Normal file
110
ALKU/ASMYT.ASM
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
IDEAL
|
||||||
|
MODEL large
|
||||||
|
P386
|
||||||
|
|
||||||
|
CODESEG
|
||||||
|
|
||||||
|
mmask dw 0102h,0202h,0402h,0802h,0102h,0202h,0402h,0802h
|
||||||
|
rmask dw 0004h,0104h,0204h,0304h,0004h,0104h,0204h,0304h
|
||||||
|
|
||||||
|
PUBLIC C ascrolltext
|
||||||
|
|
||||||
|
PROC C ascrolltext
|
||||||
|
|
||||||
|
ARG scrl:word, text:dword
|
||||||
|
|
||||||
|
push ds es si di
|
||||||
|
push 0a000h
|
||||||
|
pop es
|
||||||
|
lds si, [text]
|
||||||
|
mov cx, 0d
|
||||||
|
@@l1:
|
||||||
|
|
||||||
|
mov bx, cx
|
||||||
|
add bx, [scrl]
|
||||||
|
and bx, 3d
|
||||||
|
shl bx, 1d
|
||||||
|
mov ax, [cs:mmask+bx]
|
||||||
|
mov dx, 3c4h
|
||||||
|
out dx, ax
|
||||||
|
mov ax, [cs:rmask+bx]
|
||||||
|
mov dx, 3ceh
|
||||||
|
out dx, ax
|
||||||
|
|
||||||
|
mov di, cx
|
||||||
|
add di, [scrl]
|
||||||
|
shr di, 2d
|
||||||
|
@@l3:
|
||||||
|
REPT 20
|
||||||
|
add si, 4d
|
||||||
|
mov bx, [si-4]
|
||||||
|
cmp bx, -1
|
||||||
|
je @@l2
|
||||||
|
mov ax, [si-2]
|
||||||
|
xor [es:bx+di], al
|
||||||
|
ENDM
|
||||||
|
jmp @@l3
|
||||||
|
@@l2:
|
||||||
|
inc cx
|
||||||
|
cmp cx, 4d
|
||||||
|
jne @@l1
|
||||||
|
|
||||||
|
pop di si es ds
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
PUBLIC C outline
|
||||||
|
|
||||||
|
mrol dw 0
|
||||||
|
|
||||||
|
PROC C outline
|
||||||
|
|
||||||
|
ARG src:dword, dest:dword
|
||||||
|
|
||||||
|
push ds es si di
|
||||||
|
|
||||||
|
mov [cs:mrol], 0802h
|
||||||
|
mov cx, 4d
|
||||||
|
@@l1:
|
||||||
|
mov dx, 3c4h
|
||||||
|
mov ax, [cs:mrol]
|
||||||
|
out dx, ax
|
||||||
|
|
||||||
|
lds si, [src]
|
||||||
|
add si, cx
|
||||||
|
dec si
|
||||||
|
les di, [dest]
|
||||||
|
xor ax, ax
|
||||||
|
mov [es:di-352], al
|
||||||
|
mov [es:di-352+176], al
|
||||||
|
|
||||||
|
ccc=0
|
||||||
|
REPT 75
|
||||||
|
mov al, [ds:si+ccc*640]
|
||||||
|
mov [es:di+ccc*352], al
|
||||||
|
mov [es:di+ccc*352+176], al
|
||||||
|
ccc=ccc+1
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
mov ax, ds
|
||||||
|
add ax, 75*40
|
||||||
|
mov ds, ax
|
||||||
|
|
||||||
|
ccc=0
|
||||||
|
REPT 75
|
||||||
|
mov al, [ds:si+ccc*640]
|
||||||
|
mov [es:di+ccc*352+75*352], al
|
||||||
|
mov [es:di+ccc*352+75*352+176], al
|
||||||
|
ccc=ccc+1
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
shr [cs:(Byte mrol+1)], 1d
|
||||||
|
dec cx
|
||||||
|
jnz @@l1
|
||||||
|
|
||||||
|
|
||||||
|
pop di si es ds
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
END
|
||||||
BIN
ALKU/ASMYT.OBJ
Normal file
BIN
ALKU/ASMYT.OBJ
Normal file
Binary file not shown.
149
ALKU/COPPER.ASM
Normal file
149
ALKU/COPPER.ASM
Normal file
|
|
@ -0,0 +1,149 @@
|
||||||
|
IDEAL
|
||||||
|
MODEL large
|
||||||
|
P386
|
||||||
|
|
||||||
|
CODESEG
|
||||||
|
|
||||||
|
PUBLIC C frame_count, C init_copper, C close_copper, C cop_pal, C do_pal, C cop_start, C cop_scrl
|
||||||
|
|
||||||
|
twait dw 0
|
||||||
|
frame_count dw 0
|
||||||
|
old_int8 dw 0
|
||||||
|
dw 0
|
||||||
|
cop_pal dd 0
|
||||||
|
do_pal dw 0
|
||||||
|
cop_start dw 0
|
||||||
|
cop_scrl dw 0
|
||||||
|
|
||||||
|
|
||||||
|
PROC close_copper
|
||||||
|
|
||||||
|
mov bx, 7
|
||||||
|
mov ax, 0
|
||||||
|
mov cx, 0
|
||||||
|
mov dx, 0
|
||||||
|
int 0fch
|
||||||
|
|
||||||
|
mov bx, 7
|
||||||
|
mov ax, 1
|
||||||
|
mov cx, 0
|
||||||
|
mov dx, 0
|
||||||
|
int 0fch
|
||||||
|
|
||||||
|
mov bx, 7
|
||||||
|
mov ax, 2
|
||||||
|
mov cx, 0
|
||||||
|
mov dx, 0
|
||||||
|
int 0fch
|
||||||
|
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
PROC init_copper
|
||||||
|
|
||||||
|
mov bx, 7
|
||||||
|
mov ax, 1
|
||||||
|
mov cx, OFFSET copper1
|
||||||
|
mov dx, SEG copper1
|
||||||
|
int 0fch
|
||||||
|
|
||||||
|
mov bx, 7
|
||||||
|
mov ax, 2
|
||||||
|
mov cx, OFFSET copper2
|
||||||
|
mov dx, SEG copper2
|
||||||
|
int 0fch
|
||||||
|
|
||||||
|
mov bx, 7
|
||||||
|
mov ax, 0
|
||||||
|
mov cx, OFFSET copper3
|
||||||
|
mov dx, SEG copper3
|
||||||
|
int 0fch
|
||||||
|
|
||||||
|
ret
|
||||||
|
|
||||||
|
PROC copper1
|
||||||
|
|
||||||
|
mov dx, 03d4h
|
||||||
|
mov al, 0dh
|
||||||
|
mov ah, [Byte cs:cop_start]
|
||||||
|
out dx, ax
|
||||||
|
mov al, 0ch
|
||||||
|
mov ah, [Byte cs:cop_start+1]
|
||||||
|
out dx, ax
|
||||||
|
|
||||||
|
mov dx, 3c0h
|
||||||
|
mov al, 33h
|
||||||
|
out dx, al
|
||||||
|
mov ax, [cs:cop_scrl]
|
||||||
|
out dx, al
|
||||||
|
|
||||||
|
retf
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
PROC copper2
|
||||||
|
|
||||||
|
inc [cs:frame_count]
|
||||||
|
|
||||||
|
cmp [cs:do_pal], 0d
|
||||||
|
je @@no_pal
|
||||||
|
|
||||||
|
pusha
|
||||||
|
push ds
|
||||||
|
lds si, [cs:cop_pal]
|
||||||
|
mov cx, 768d
|
||||||
|
mov dx, 3c8h
|
||||||
|
mov al, 0d
|
||||||
|
out dx, al
|
||||||
|
inc dx
|
||||||
|
rep outsb
|
||||||
|
mov [cs:do_pal], 0d
|
||||||
|
pop ds
|
||||||
|
popa
|
||||||
|
@@no_pal:
|
||||||
|
retf
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
PUBLIC C cop_dofade
|
||||||
|
cop_dofade dw 0
|
||||||
|
|
||||||
|
PUBLIC C fadepal
|
||||||
|
fadepal db 768*2 dup(?)
|
||||||
|
|
||||||
|
PUBLIC C cop_fadepal
|
||||||
|
cop_fadepal dd 0
|
||||||
|
|
||||||
|
PROC copper3
|
||||||
|
cmp [cs:cop_dofade], 0d
|
||||||
|
je @@l1
|
||||||
|
dec [cs:cop_dofade]
|
||||||
|
|
||||||
|
push ds si di cx
|
||||||
|
|
||||||
|
mov [Word cs:cop_pal], OFFSET fadepal
|
||||||
|
mov [Word cs:cop_pal+2], SEG fadepal
|
||||||
|
mov [do_pal], 1d
|
||||||
|
|
||||||
|
lds si, [cs:cop_fadepal]
|
||||||
|
mov di, OFFSET fadepal
|
||||||
|
mov cx, 768/16d
|
||||||
|
@@l4:
|
||||||
|
ccc=0
|
||||||
|
REPT 16
|
||||||
|
mov ax, [ds:si+ccc*2]
|
||||||
|
add [cs:di+ccc+768], al
|
||||||
|
adc [cs:di+ccc], ah
|
||||||
|
ccc=ccc+1
|
||||||
|
ENDM
|
||||||
|
add di, 16d
|
||||||
|
add si, 32d
|
||||||
|
dec cx
|
||||||
|
jnz @@l4
|
||||||
|
|
||||||
|
pop cx di si ds
|
||||||
|
@@l1:
|
||||||
|
retf
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
|
||||||
|
END
|
||||||
|
|
||||||
BIN
ALKU/COPPER.OBJ
Normal file
BIN
ALKU/COPPER.OBJ
Normal file
Binary file not shown.
BIN
ALKU/CUT64KB.EXE
Normal file
BIN
ALKU/CUT64KB.EXE
Normal file
Binary file not shown.
BIN
ALKU/DISC.OBJ
Normal file
BIN
ALKU/DISC.OBJ
Normal file
Binary file not shown.
BIN
ALKU/DP_PREFS
Normal file
BIN
ALKU/DP_PREFS
Normal file
Binary file not shown.
2813
ALKU/FONA.INC
Normal file
2813
ALKU/FONA.INC
Normal file
File diff suppressed because it is too large
Load diff
BIN
ALKU/FONA.LBM
Normal file
BIN
ALKU/FONA.LBM
Normal file
Binary file not shown.
BIN
ALKU/FONA.UH
Normal file
BIN
ALKU/FONA.UH
Normal file
Binary file not shown.
BIN
ALKU/FONA2.LBM
Normal file
BIN
ALKU/FONA2.LBM
Normal file
Binary file not shown.
4097
ALKU/HOI.IN0
Normal file
4097
ALKU/HOI.IN0
Normal file
File diff suppressed because it is too large
Load diff
3955
ALKU/HOI.IN1
Normal file
3955
ALKU/HOI.IN1
Normal file
File diff suppressed because it is too large
Load diff
BIN
ALKU/HOI.LBM
Normal file
BIN
ALKU/HOI.LBM
Normal file
Binary file not shown.
BIN
ALKU/HOI.U
Normal file
BIN
ALKU/HOI.U
Normal file
Binary file not shown.
BIN
ALKU/HOIKKA.LBM
Normal file
BIN
ALKU/HOIKKA.LBM
Normal file
Binary file not shown.
BIN
ALKU/INCBIN.EXE
Normal file
BIN
ALKU/INCBIN.EXE
Normal file
Binary file not shown.
22
ALKU/INCLUDE.ASM
Normal file
22
ALKU/INCLUDE.ASM
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
IDEAL
|
||||||
|
MODEL large
|
||||||
|
P386
|
||||||
|
|
||||||
|
PUBLIC C hzpic, C font
|
||||||
|
|
||||||
|
SEGMENT kakka0 para use16 private 'FAR_DATA'
|
||||||
|
LABEL hzpic BYTE
|
||||||
|
INCLUDE 'hoi.in0'
|
||||||
|
ENDS
|
||||||
|
SEGMENT kakka1 byte use16 private 'FAR_DATA'
|
||||||
|
INCLUDE 'hoi.in1'
|
||||||
|
ENDS
|
||||||
|
|
||||||
|
SEGMENT asdf byte use16 private 'FAR_DATA'
|
||||||
|
LABEL font byte
|
||||||
|
INCLUDE 'fona.inc'
|
||||||
|
|
||||||
|
dw 1500*5 dup(?)
|
||||||
|
|
||||||
|
ENDS
|
||||||
|
END
|
||||||
BIN
ALKU/INCLUDE.OBJ
Normal file
BIN
ALKU/INCLUDE.OBJ
Normal file
Binary file not shown.
BIN
ALKU/LBM2P.EXE
Normal file
BIN
ALKU/LBM2P.EXE
Normal file
Binary file not shown.
BIN
ALKU/LBM2U.EXE
Normal file
BIN
ALKU/LBM2U.EXE
Normal file
Binary file not shown.
542
ALKU/MAIN.C
Normal file
542
ALKU/MAIN.C
Normal file
|
|
@ -0,0 +1,542 @@
|
||||||
|
#include <dos.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include "tweak.h"
|
||||||
|
#include "h:\u2\dis\dis.h"
|
||||||
|
|
||||||
|
#define SCRLF 9
|
||||||
|
|
||||||
|
extern init_copper();
|
||||||
|
extern close_copper();
|
||||||
|
extern far int frame_count;
|
||||||
|
extern far char * far cop_pal;
|
||||||
|
extern far int do_pal;
|
||||||
|
extern far int cop_start;
|
||||||
|
extern far int cop_scrl;
|
||||||
|
extern far int cop_dofade;
|
||||||
|
extern far char * far cop_fadepal;
|
||||||
|
extern far char fadepal[];
|
||||||
|
|
||||||
|
extern char far hzpic[];
|
||||||
|
extern outline(char far *f, char far *t);
|
||||||
|
extern ascrolltext(int scrl, int *dtau);
|
||||||
|
char * far vmem=(char *)0x0a0000000L;
|
||||||
|
int mmask[4]={0x0102,0x0202,0x0402,0x0802};
|
||||||
|
|
||||||
|
char (* far vvmem)[176];
|
||||||
|
extern char far font[31][1500];
|
||||||
|
char rowbuf[1024];
|
||||||
|
|
||||||
|
char palette[768]; // pic
|
||||||
|
char palette2[768]; // pic & text
|
||||||
|
|
||||||
|
char fade1[768]; // black
|
||||||
|
char fade2[768]; // text
|
||||||
|
|
||||||
|
int picin[768];
|
||||||
|
int textin[768];
|
||||||
|
int textout[768];
|
||||||
|
|
||||||
|
char *fonaorder="ABCDEFGHIJKLMNOPQRSTUVWXabcdefghijklmnopqrstuvwxyz0123456789!?,.:<3A><>()+-*='<27>™";
|
||||||
|
int fonap[256];
|
||||||
|
int fonaw[256];
|
||||||
|
|
||||||
|
int far dtau[30000];
|
||||||
|
char far tbuf[186][352];
|
||||||
|
|
||||||
|
int a=0,p=0,tptr=0;
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
int aa,b,c,x,y,f;
|
||||||
|
|
||||||
|
asm mov ax, 3
|
||||||
|
asm int 10h
|
||||||
|
|
||||||
|
init();
|
||||||
|
|
||||||
|
|
||||||
|
while(dis_sync()<1 && !dis_exit());
|
||||||
|
|
||||||
|
prtc(160,120,"A");
|
||||||
|
prtc(160,160,"Future Crew");
|
||||||
|
prtc(160,200,"Production");
|
||||||
|
dofade(fade1,fade2); wait(300); dofade(fade2,fade1); fonapois();
|
||||||
|
|
||||||
|
while(dis_sync()<2 && !dis_exit());
|
||||||
|
|
||||||
|
prtc(160,160,"First Presented");
|
||||||
|
prtc(160,200,"at Assembly 93");
|
||||||
|
dofade(fade1,fade2); wait(300); dofade(fade2,fade1); fonapois();
|
||||||
|
|
||||||
|
while(dis_sync()<3 && !dis_exit());
|
||||||
|
|
||||||
|
prtc(160,120,"in");
|
||||||
|
prtc(160,160,"<EFBFBD>");
|
||||||
|
prtc(160,179,"™");
|
||||||
|
dofade(fade1,fade2); wait(300); dofade(fade2,fade1); fonapois();
|
||||||
|
|
||||||
|
while(dis_sync()<4 && !dis_exit());
|
||||||
|
|
||||||
|
memcpy(fadepal,fade1,768);
|
||||||
|
cop_fadepal=picin;
|
||||||
|
cop_dofade=128;
|
||||||
|
for(a=1,p=1,f=0,frame_count=0;cop_dofade!=0 && !dis_exit();)
|
||||||
|
do_scroll(2);
|
||||||
|
|
||||||
|
for(f=60;a<320 && !dis_exit();)
|
||||||
|
{
|
||||||
|
if(f==0) {
|
||||||
|
cop_fadepal=textin;
|
||||||
|
cop_dofade=64;
|
||||||
|
f+=20;
|
||||||
|
}
|
||||||
|
else if(f==50) {
|
||||||
|
cop_fadepal=textout;
|
||||||
|
cop_dofade=64;
|
||||||
|
f++;
|
||||||
|
}
|
||||||
|
else if(f>50 && cop_dofade==0) {
|
||||||
|
cop_pal=palette; do_pal=1; f++;
|
||||||
|
memset(tbuf,0,186*320);
|
||||||
|
switch(tptr++) {
|
||||||
|
case 0:
|
||||||
|
addtext(160,50,"Graphics");
|
||||||
|
addtext(160,90,"Marvel");
|
||||||
|
addtext(160,130,"Pixel"); // sucks
|
||||||
|
ffonapois();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
faddtext(160,50,"Music");
|
||||||
|
faddtext(160,90, "Purple Motion");
|
||||||
|
faddtext(160,130, "Skaven");
|
||||||
|
ffonapois();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
faddtext(160,30,"Code");
|
||||||
|
faddtext(160,70, "Psi");
|
||||||
|
faddtext(160,110, "Trug");
|
||||||
|
faddtext(160,148, "Wildfire");
|
||||||
|
ffonapois();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
faddtext(160,50,"Additional Design");
|
||||||
|
faddtext(160,90, "Abyss");
|
||||||
|
// faddtext(160,110,"Useless Design");
|
||||||
|
faddtext(160,130, "Gore");
|
||||||
|
ffonapois();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
ffonapois();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
faddtext(160,80, "BUG BUG BUG");
|
||||||
|
faddtext(160,130, "Timing error");
|
||||||
|
ffonapois();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
while(((a&1) || dis_sync()<4+tptr) && !dis_exit() && a<319)
|
||||||
|
do_scroll(0);
|
||||||
|
aa=a;
|
||||||
|
if(aa<320-12) fmaketext(aa+16);
|
||||||
|
f=0;
|
||||||
|
}
|
||||||
|
else f++;
|
||||||
|
do_scroll(1);
|
||||||
|
}
|
||||||
|
if(f>63/SCRLF){
|
||||||
|
dofade(palette2,palette);
|
||||||
|
}
|
||||||
|
fonapois();
|
||||||
|
close_copper();
|
||||||
|
}
|
||||||
|
|
||||||
|
init() {
|
||||||
|
int a,b,c,x,y,p=0,f;
|
||||||
|
|
||||||
|
dis_partstart();
|
||||||
|
tw_opengraph();
|
||||||
|
init_copper();
|
||||||
|
tw_setpalette(fade1);
|
||||||
|
memcpy(palette,hzpic+16,768);
|
||||||
|
|
||||||
|
for(a=0;a<88;a++)
|
||||||
|
{
|
||||||
|
outline(MK_FP(FP_SEG(hzpic),FP_OFF(hzpic)+a*4+784), MK_FP(0x0a000,a+176*50));
|
||||||
|
outline(MK_FP(FP_SEG(hzpic),FP_OFF(hzpic)+a*4+784), MK_FP(0x0a000,a+176*50+88));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(y=0;y<32;y++)
|
||||||
|
{
|
||||||
|
for(a=0;a<1500;a++)
|
||||||
|
{
|
||||||
|
switch(font[y][a]&3)
|
||||||
|
{
|
||||||
|
case 0x1 : b=0x40; break;
|
||||||
|
case 0x2 : b=0x80; break;
|
||||||
|
case 0x3 : b=0xc0; break;
|
||||||
|
default : b=0;
|
||||||
|
}
|
||||||
|
font[y][a]=b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(y=0;y<768;y+=3)
|
||||||
|
{
|
||||||
|
if(y<64*3)
|
||||||
|
{
|
||||||
|
palette2[y+0]=palette[y+0];
|
||||||
|
palette2[y+1]=palette[y+1];
|
||||||
|
palette2[y+2]=palette[y+2];
|
||||||
|
}
|
||||||
|
else if(y<128*3)
|
||||||
|
{
|
||||||
|
palette2[y+0]=(fade2[y+0]=palette[0x1*3+0])*63+palette[y%(64*3)+0]*(63-palette[0x1*3+0])>>6;
|
||||||
|
palette2[y+1]=(fade2[y+1]=palette[0x1*3+1])*63+palette[y%(64*3)+1]*(63-palette[0x1*3+1])>>6;
|
||||||
|
palette2[y+2]=(fade2[y+2]=palette[0x1*3+2])*63+palette[y%(64*3)+2]*(63-palette[0x1*3+2])>>6;
|
||||||
|
}
|
||||||
|
else if(y<192*3)
|
||||||
|
{
|
||||||
|
palette2[y+0]=(fade2[y+0]=palette[0x2*3+0])*63+palette[y%(64*3)+0]*(63-palette[0x2*3+0])>>6;
|
||||||
|
palette2[y+1]=(fade2[y+1]=palette[0x2*3+1])*63+palette[y%(64*3)+1]*(63-palette[0x2*3+1])>>6;
|
||||||
|
palette2[y+2]=(fade2[y+2]=palette[0x2*3+2])*63+palette[y%(64*3)+2]*(63-palette[0x2*3+2])>>6;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
palette2[y+0]=(fade2[y+0]=palette[0x3*3+0])*63+palette[y%(64*3)+0]*(63-palette[0x3*3+0])>>6;
|
||||||
|
palette2[y+1]=(fade2[y+1]=palette[0x3*3+1])*63+palette[y%(64*3)+1]*(63-palette[0x3*3+1])>>6;
|
||||||
|
palette2[y+2]=(fade2[y+2]=palette[0x3*3+2])*63+palette[y%(64*3)+2]*(63-palette[0x3*3+2])>>6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(a=192;a<768;a++) palette[a]=palette[a-192];
|
||||||
|
|
||||||
|
for(x=0;x<1500 && *fonaorder;)
|
||||||
|
{
|
||||||
|
while(x<1500)
|
||||||
|
{
|
||||||
|
for(y=0;y<32;y++) if(font[y][x]) break;
|
||||||
|
if(y!=32) break;
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
b=x;
|
||||||
|
while(x<1500)
|
||||||
|
{
|
||||||
|
for(y=0;y<32;y++) if(font[y][x]) break;
|
||||||
|
if(y==32) break;
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
//printf("%c: %i %i\n",*fonaorder,b,x-b);
|
||||||
|
fonap[*fonaorder]=b;
|
||||||
|
fonaw[*fonaorder]=x-b;
|
||||||
|
fonaorder++;
|
||||||
|
}
|
||||||
|
fonap[32]=1500-20;
|
||||||
|
fonaw[32]=16;
|
||||||
|
|
||||||
|
for(a=0;a<768;a++)
|
||||||
|
{
|
||||||
|
textin[a]=(palette2[a]-palette[a])*256/64;
|
||||||
|
textout[a]=(palette[a]-palette2[a])*256/64;
|
||||||
|
picin[a]=(palette[a]-fade1[a])*256/128;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
wait(int t)
|
||||||
|
{
|
||||||
|
while(frame_count<t && !dis_exit()); frame_count=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
fonapois()
|
||||||
|
{
|
||||||
|
char far *vvmem=MK_FP(0x0a000,0);
|
||||||
|
unsigned a;
|
||||||
|
|
||||||
|
outport(0x3c4,0x0102);
|
||||||
|
outport(0x3ce,0x0004);
|
||||||
|
for(a=160*64;a<160U*(64+256);a++) vvmem[a]=vvmem[a]&63;
|
||||||
|
|
||||||
|
outport(0x3c4,0x0202);
|
||||||
|
outport(0x3ce,0x0104);
|
||||||
|
for(a=160*64;a<160U*(64+256);a++) vvmem[a]=vvmem[a]&63;
|
||||||
|
|
||||||
|
outport(0x3c4,0x0402);
|
||||||
|
outport(0x3ce,0x0204);
|
||||||
|
for(a=160*64;a<160U*(64+256);a++) vvmem[a]=vvmem[a]&63;
|
||||||
|
outport(0x3c4,0x0802);
|
||||||
|
outport(0x3ce,0x0304);
|
||||||
|
for(a=160*64;a<160U*(64+256);a++) vvmem[a]=vvmem[a]&63;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
prt(int x,int y,char *txt)
|
||||||
|
{
|
||||||
|
int x2w,x2,y2,y2w=y+32,sx,d;
|
||||||
|
while(*txt)
|
||||||
|
{
|
||||||
|
x2w=fonaw[*txt]+x;
|
||||||
|
sx=fonap[*txt];
|
||||||
|
for(x2=x;x2<x2w;x2++)
|
||||||
|
{
|
||||||
|
for(y2=y;y2<y2w;y2++)
|
||||||
|
{
|
||||||
|
d=font[y2-y][sx];
|
||||||
|
tw_putpixel(x2,y2,tw_getpixel(x2,y2)|d);
|
||||||
|
}
|
||||||
|
sx++;
|
||||||
|
}
|
||||||
|
x=x2+2;
|
||||||
|
txt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prtc(int x,int y,char *txt)
|
||||||
|
{
|
||||||
|
int w=0;
|
||||||
|
char *t=txt;
|
||||||
|
while(*t) w+=fonaw[*t++]+2;
|
||||||
|
prt(x-w/2,y,txt);
|
||||||
|
}
|
||||||
|
|
||||||
|
dofade(char far *pal1, char far *pal2)
|
||||||
|
{
|
||||||
|
int a,b,c;
|
||||||
|
char pal[768];
|
||||||
|
|
||||||
|
for(a=0;a<64 && !dis_exit();a++)
|
||||||
|
{
|
||||||
|
for(b=0;b<768;b++) pal[b]=(pal1[b]*(64-a)+pal2[b]*a>>6);
|
||||||
|
cop_pal=pal; do_pal=1;
|
||||||
|
while(frame_count<1); frame_count=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
char fuckpal[768];
|
||||||
|
|
||||||
|
fdofade(char far *pal1, char far *pal2, int a)
|
||||||
|
{
|
||||||
|
int b,c;
|
||||||
|
|
||||||
|
if(a<0 || a>64) return(0);
|
||||||
|
for(b=0;b<768;b++) fuckpal[b]=(pal1[b]*(64-a)+pal2[b]*a>>6);
|
||||||
|
cop_pal=fuckpal; do_pal=1;
|
||||||
|
}
|
||||||
|
|
||||||
|
addtext(int tx,int ty,char *txt)
|
||||||
|
{
|
||||||
|
int a,b,c,x,y,w=0;
|
||||||
|
char *t=txt;
|
||||||
|
|
||||||
|
while(*t) w+=fonaw[*t++]+2;
|
||||||
|
|
||||||
|
t=txt; w/=2;
|
||||||
|
while(*t)
|
||||||
|
{
|
||||||
|
for(x=0;x<fonaw[*t];x++)
|
||||||
|
for(y=0;y<32;y++)
|
||||||
|
tbuf[y+ty][tx+x-w]=font[y][fonap[*t]+x];
|
||||||
|
|
||||||
|
tx+=fonaw[*t++]+2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
maketext(int scrl)
|
||||||
|
{
|
||||||
|
char far *vvmem=MK_FP(0x0a000,0);
|
||||||
|
int *p1=dtau;
|
||||||
|
int mtau[]={1*256+2,2*256+2,4*256+2,8*256+2};
|
||||||
|
int a,b,c,x,y,m;
|
||||||
|
|
||||||
|
for(m=0;m<4;m++)
|
||||||
|
{
|
||||||
|
for(x=m;x<320;x+=4) for(y=1;y<184;y++)
|
||||||
|
if(tbuf[y][x]!=tbuf[y][x-2]) {
|
||||||
|
*p1++=x/4+y*176+100*176;
|
||||||
|
*p1++=tbuf[y][x]^tbuf[y][x-2];
|
||||||
|
}
|
||||||
|
*p1++=-1;
|
||||||
|
*p1++=-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(x=0;x<320;x++)
|
||||||
|
{
|
||||||
|
outport(0x3c4,mtau[(x+scrl)&3]);
|
||||||
|
outport(0x3ce,((x+scrl)&3)*256+4);
|
||||||
|
for(y=1;y<184;y++)
|
||||||
|
{
|
||||||
|
vvmem[y*176+176*100+(x+scrl)/4]^=tbuf[y][x-1-1];
|
||||||
|
vvmem[y*176+176*100+(x+scrl)/4+88]^=tbuf[y][x-1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scrolltext(int scrl)
|
||||||
|
{
|
||||||
|
char far *vvmem=MK_FP(0x0a000,0);
|
||||||
|
int mtau[]={1*256+2,2*256+2,4*256+2,8*256+2,1*256+2,2*256+2,4*256+2,8*256+2};
|
||||||
|
int *p1=dtau;
|
||||||
|
int x,y,a,c,m,aa;
|
||||||
|
|
||||||
|
p1=dtau;
|
||||||
|
for(m=0;m<4;m++)
|
||||||
|
{
|
||||||
|
aa=(scrl+m)/4;
|
||||||
|
outport(0x3c4,mtau[(scrl+m)&3]);
|
||||||
|
outport(0x3ce,((scrl+m)&3)*256+4);
|
||||||
|
while(*p1!=-1)
|
||||||
|
{
|
||||||
|
a=*p1++;
|
||||||
|
c=*p1++;
|
||||||
|
vvmem[a+aa]^=c;
|
||||||
|
}
|
||||||
|
p1+=2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
do_scroll(int mode)
|
||||||
|
{
|
||||||
|
if(mode==0 && frame_count<SCRLF) return(0);
|
||||||
|
while(frame_count<SCRLF);
|
||||||
|
frame_count-=SCRLF;
|
||||||
|
if(mode==1) ascrolltext(a+p*352,dtau);
|
||||||
|
cop_start=a/4+p*88; cop_scrl=(a&3)*2;
|
||||||
|
|
||||||
|
if((a&3)==0)
|
||||||
|
{
|
||||||
|
outline(MK_FP(FP_SEG(hzpic),FP_OFF(hzpic)+(a/4+86)*4+784), MK_FP(0x0a000,(a/4+86)+176*50));
|
||||||
|
outline(MK_FP(FP_SEG(hzpic),FP_OFF(hzpic)+(a/4+86)*4+784), MK_FP(0x0a000,(a/4+86)+176*50+88));
|
||||||
|
}
|
||||||
|
a+=1; p^=1;
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
faddtext(int tx,int ty,char *txt)
|
||||||
|
{
|
||||||
|
int a,b,c,x,y,w=0;
|
||||||
|
char *t=txt;
|
||||||
|
|
||||||
|
while(*t) w+=fonaw[*t++]+2;
|
||||||
|
|
||||||
|
t=txt; w/=2;
|
||||||
|
while(*t)
|
||||||
|
{
|
||||||
|
for(x=0;x<fonaw[*t];x++)
|
||||||
|
for(y=0;y<32;y++)
|
||||||
|
tbuf[y+ty][tx+x-w]=font[y][fonap[*t]+x];
|
||||||
|
|
||||||
|
do_scroll(0);
|
||||||
|
tx+=fonaw[*t++]+2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fmaketext(int scrl)
|
||||||
|
{
|
||||||
|
char far *vvmem=MK_FP(0x0a000,0);
|
||||||
|
int *p1=dtau;
|
||||||
|
int mtau[]={1*256+2,2*256+2,4*256+2,8*256+2};
|
||||||
|
int b,c,x,y,m;
|
||||||
|
|
||||||
|
for(m=0;m<4;m++)
|
||||||
|
{
|
||||||
|
for(x=m;x<320;x+=4) {
|
||||||
|
for(y=1;y<184;y++) if(tbuf[y][x]!=tbuf[y][x-2]) {
|
||||||
|
*p1++=x/4+y*176+100*176;
|
||||||
|
*p1++=tbuf[y][x]^tbuf[y][x-2];
|
||||||
|
}
|
||||||
|
do_scroll(0);
|
||||||
|
}
|
||||||
|
*p1++=-1;
|
||||||
|
*p1++=-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(x=0;x<320;x++)
|
||||||
|
{
|
||||||
|
outport(0x3c4,mtau[(x+scrl)&3]);
|
||||||
|
outport(0x3ce,((x+scrl)&3)*256+4);
|
||||||
|
for(y=1;y<184;y++)
|
||||||
|
{
|
||||||
|
vvmem[y*176+176*100+(x+scrl)/4]^=tbuf[y][x-1-1];
|
||||||
|
vvmem[y*176+176*100+(x+scrl)/4+88]^=tbuf[y][x-1];
|
||||||
|
}
|
||||||
|
do_scroll(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
while(a<=scrl) do_scroll(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
ffonapois()
|
||||||
|
{
|
||||||
|
long far *vvmem=MK_FP(0x0a000,0);
|
||||||
|
unsigned a;
|
||||||
|
|
||||||
|
outport(0x3c4,0x0102);
|
||||||
|
outport(0x3ce,0x0004);
|
||||||
|
for(a=40*64;a<40U*(64+256+10);a++) vvmem[a]=vvmem[a]&0x3f3f3f3f;
|
||||||
|
do_scroll(0);
|
||||||
|
|
||||||
|
outport(0x3c4,0x0202);
|
||||||
|
outport(0x3ce,0x0104);
|
||||||
|
for(a=40*64;a<40U*(64+256+10);a++) vvmem[a]=vvmem[a]&0x3f3f3f3f;
|
||||||
|
do_scroll(0);
|
||||||
|
|
||||||
|
outport(0x3c4,0x0402);
|
||||||
|
outport(0x3ce,0x0204);
|
||||||
|
for(a=40*64;a<40U*(64+256+10);a++) vvmem[a]=vvmem[a]&0x3f3f3f3f;
|
||||||
|
do_scroll(0);
|
||||||
|
|
||||||
|
outport(0x3c4,0x0802);
|
||||||
|
outport(0x3ce,0x0304);
|
||||||
|
for(a=40*64;a<40U*(64+256+10);a++) vvmem[a]=vvmem[a]&0x3f3f3f3f;
|
||||||
|
do_scroll(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
char far cfpal[768*2];
|
||||||
|
int far cop_fade;
|
||||||
|
|
||||||
|
fffade(char far *pal1, char far *pal2, int frames)
|
||||||
|
{
|
||||||
|
int a,b,c;
|
||||||
|
for(a=0;a<768;a++)
|
||||||
|
{
|
||||||
|
cfpal[a]=pal1[a];
|
||||||
|
cfpal[a+768]=(pal2[a]-pal1[a])*256/frames;
|
||||||
|
}
|
||||||
|
cop_fade=frames;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
dis_sync
|
||||||
|
|
||||||
|
0 = ...
|
||||||
|
1 = fc_pres
|
||||||
|
2 = first
|
||||||
|
3 = maisema
|
||||||
|
4 = gfx
|
||||||
|
5 = music
|
||||||
|
6 = code
|
||||||
|
7 = addi
|
||||||
|
8 = exit
|
||||||
|
|
||||||
|
dis_muscode=row/order
|
||||||
|
|
||||||
|
2 ekaa = mustaa
|
||||||
|
2 fc..
|
||||||
|
3 93..
|
||||||
|
4 feidaa ineen
|
||||||
|
5 music
|
||||||
|
6 gfx
|
||||||
|
7 code
|
||||||
|
8 addi
|
||||||
|
|
||||||
|
bx=6
|
||||||
|
ax=?
|
||||||
|
int fch
|
||||||
|
cx=ord
|
||||||
|
bx=row
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
BIN
ALKU/MAIN.OBJ
Normal file
BIN
ALKU/MAIN.OBJ
Normal file
Binary file not shown.
BIN
ALKU/PIC001.LBM
Normal file
BIN
ALKU/PIC001.LBM
Normal file
Binary file not shown.
BIN
ALKU/RYPPIS.LBM
Normal file
BIN
ALKU/RYPPIS.LBM
Normal file
Binary file not shown.
3
ALKU/TEST.BAT
Normal file
3
ALKU/TEST.BAT
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
@alku.exe
|
||||||
|
@..\pam\pam.exe
|
||||||
|
@d
|
||||||
333
ALKU/TWEAK.ASM
Normal file
333
ALKU/TWEAK.ASM
Normal file
|
|
@ -0,0 +1,333 @@
|
||||||
|
IDEAL
|
||||||
|
MODEL large
|
||||||
|
P386
|
||||||
|
|
||||||
|
CODESEG
|
||||||
|
|
||||||
|
PUBLIC C tw_opengraph, C tw_putpixel, C tw_setpalette, C tw_setstart
|
||||||
|
PUBLIC C tw_pictovmem, C tw_closegraph, C tw_waitvr, C tw_setrgbpalette
|
||||||
|
PUBLIC C tw_clrscr, C tw_setpalarea, C tw_getpixel
|
||||||
|
|
||||||
|
PUBLIC C scr_seg ; videomuistin alku segmentti
|
||||||
|
|
||||||
|
planetau db 1,2,4,8
|
||||||
|
scr_seg dw 0a000h
|
||||||
|
|
||||||
|
; avaa 320x200 tweak tilan, 4 sivua, 4 planea
|
||||||
|
|
||||||
|
PROC tw_opengraph
|
||||||
|
|
||||||
|
mov ax,13h
|
||||||
|
int 10h
|
||||||
|
|
||||||
|
mov dx, 03c4h
|
||||||
|
mov ax, 0604h
|
||||||
|
out dx, ax ; chain4 off
|
||||||
|
|
||||||
|
mov ax, 0f02h
|
||||||
|
out dx, ax
|
||||||
|
mov dx, 0a000h
|
||||||
|
mov es, dx
|
||||||
|
xor di, di
|
||||||
|
xor ax, ax
|
||||||
|
mov cx, 8000h
|
||||||
|
rep stosw ; clear vmem
|
||||||
|
|
||||||
|
mov dx, 03d4h
|
||||||
|
mov ax, 0014h
|
||||||
|
out dx, ax ; crtc long off
|
||||||
|
|
||||||
|
mov ax, 0e317h
|
||||||
|
out dx, ax ; crtc byte on
|
||||||
|
|
||||||
|
mov ax, 0009h
|
||||||
|
out dx, ax ; 400
|
||||||
|
|
||||||
|
mov ax, 5813h
|
||||||
|
out dx, ax ; 640 wide
|
||||||
|
|
||||||
|
mov ax, 07018h ; linecompare
|
||||||
|
out dx, ax
|
||||||
|
mov ax, 1f07h
|
||||||
|
out dx, ax ; 8th bit
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
PROC tw_clrscr
|
||||||
|
|
||||||
|
mov dx, 3c4h
|
||||||
|
mov ax, 0f02h
|
||||||
|
out dx, ax
|
||||||
|
mov dx, [cs:scr_seg]
|
||||||
|
mov es, dx
|
||||||
|
xor di, di
|
||||||
|
xor eax, eax
|
||||||
|
mov cx, 1000h
|
||||||
|
rep stosd ; clear vmem
|
||||||
|
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
PROC tw_closegraph
|
||||||
|
|
||||||
|
mov ax, 03h
|
||||||
|
int 10h
|
||||||
|
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
; piirt„„ pisteen ruudulle
|
||||||
|
|
||||||
|
PROC tw_putpixel
|
||||||
|
|
||||||
|
ARG x:word, y:word, color:word
|
||||||
|
|
||||||
|
push bp
|
||||||
|
mov bp, sp
|
||||||
|
|
||||||
|
mov ax, [cs:scr_seg]
|
||||||
|
mov es, ax
|
||||||
|
|
||||||
|
mov dx, 03c4h
|
||||||
|
mov bx, [x]
|
||||||
|
and bx, 03h
|
||||||
|
mov ah, [cs:planetau+bx]
|
||||||
|
mov al, 02h
|
||||||
|
out dx, ax ; select plane
|
||||||
|
|
||||||
|
mov bx, [x]
|
||||||
|
shr bx, 2
|
||||||
|
mov ax, [y]
|
||||||
|
shl ax, 4
|
||||||
|
add bx, ax
|
||||||
|
shl ax, 1
|
||||||
|
add bx, ax
|
||||||
|
shl ax, 2
|
||||||
|
add bx, ax
|
||||||
|
|
||||||
|
mov cx, [color]
|
||||||
|
mov [es:bx], cl
|
||||||
|
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
PROC tw_getpixel
|
||||||
|
|
||||||
|
ARG x:word, y:word
|
||||||
|
|
||||||
|
push bp
|
||||||
|
mov bp, sp
|
||||||
|
|
||||||
|
mov ax, [scr_seg]
|
||||||
|
mov es, ax
|
||||||
|
|
||||||
|
mov dx, 03ceh
|
||||||
|
mov ax, [x]
|
||||||
|
and ax, 03h
|
||||||
|
mov ah, al
|
||||||
|
mov al, 04h
|
||||||
|
out dx, ax ; select plane
|
||||||
|
|
||||||
|
mov ax, [y]
|
||||||
|
shl ax, 4
|
||||||
|
mov bx, ax
|
||||||
|
shl ax, 1
|
||||||
|
add bx, ax
|
||||||
|
shl ax, 2
|
||||||
|
add bx, ax
|
||||||
|
mov ax, [x]
|
||||||
|
shr ax, 2
|
||||||
|
add bx, ax
|
||||||
|
|
||||||
|
xor ax, ax
|
||||||
|
mov al,[es:bx]
|
||||||
|
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
; vaihtaa koko paletin
|
||||||
|
|
||||||
|
PROC tw_setpalette
|
||||||
|
|
||||||
|
ARG pal:dword
|
||||||
|
|
||||||
|
push bp
|
||||||
|
mov bp, sp
|
||||||
|
push si ds
|
||||||
|
|
||||||
|
lds si,[pal]
|
||||||
|
cld
|
||||||
|
mov cx, 300h
|
||||||
|
mov dx, 03c8h
|
||||||
|
mov al, 0
|
||||||
|
out dx, al
|
||||||
|
inc dx
|
||||||
|
|
||||||
|
rep outsb
|
||||||
|
|
||||||
|
pop ds si
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
PROC C tw_setpalarea
|
||||||
|
|
||||||
|
ARG pal:dword, start:word, cnt:word
|
||||||
|
|
||||||
|
push si ds
|
||||||
|
|
||||||
|
lds si,[pal]
|
||||||
|
cld
|
||||||
|
mov cx, [cnt]
|
||||||
|
mov ax, cx
|
||||||
|
add cx, ax
|
||||||
|
add cx, ax
|
||||||
|
mov dx, 03c8h
|
||||||
|
mov ax, [start]
|
||||||
|
out dx, al
|
||||||
|
inc dx
|
||||||
|
|
||||||
|
rep outsb
|
||||||
|
|
||||||
|
pop ds si
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
; asettaa videomuistin alun
|
||||||
|
|
||||||
|
PROC tw_setstart
|
||||||
|
|
||||||
|
ARG start:word
|
||||||
|
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
|
||||||
|
mov bx, [start]
|
||||||
|
mov dx, 03d4h
|
||||||
|
mov al, 0dh
|
||||||
|
mov ah, bl
|
||||||
|
out dx, ax
|
||||||
|
mov al, 0ch
|
||||||
|
mov ah, bh
|
||||||
|
out dx, ax
|
||||||
|
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
; kopioi muistista unpacked 1bpl kuvan 4planen kuvaksi videomuistiin
|
||||||
|
; void tw_pictovmem(char far *pic, unsigned int vstart, unsigned int bytes);
|
||||||
|
|
||||||
|
PROC tw_pictovmem
|
||||||
|
|
||||||
|
ARG pic:dword,to:word,len:word
|
||||||
|
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
push ds es si di
|
||||||
|
|
||||||
|
mov es, [scr_seg]
|
||||||
|
mov di, [to]
|
||||||
|
lds si, [pic]
|
||||||
|
mov cx, [len]
|
||||||
|
|
||||||
|
mov dx,03ceh
|
||||||
|
mov ax,4005h ; w-mode 0
|
||||||
|
out dx,ax
|
||||||
|
|
||||||
|
mov dx, 03c4h
|
||||||
|
mov al, 02h
|
||||||
|
mov ah, 1h
|
||||||
|
out dx, ax
|
||||||
|
shr cx, 2
|
||||||
|
@@l1:
|
||||||
|
movsb
|
||||||
|
add si, 3
|
||||||
|
loop @@l1
|
||||||
|
|
||||||
|
|
||||||
|
lds si, [pic]
|
||||||
|
add si, 1d
|
||||||
|
mov di, [to]
|
||||||
|
mov cx, [len]
|
||||||
|
|
||||||
|
mov ax, 0202h
|
||||||
|
out dx, ax
|
||||||
|
shr cx, 2
|
||||||
|
@@l2:
|
||||||
|
movsb
|
||||||
|
add si, 3
|
||||||
|
loop @@l2
|
||||||
|
|
||||||
|
|
||||||
|
lds si, [pic]
|
||||||
|
add si, 2d
|
||||||
|
mov di, [to]
|
||||||
|
mov cx, [len]
|
||||||
|
|
||||||
|
mov ax, 0402h
|
||||||
|
out dx, ax
|
||||||
|
shr cx, 2
|
||||||
|
@@l3:
|
||||||
|
movsb
|
||||||
|
add si, 3
|
||||||
|
loop @@l3
|
||||||
|
|
||||||
|
|
||||||
|
lds si, [pic]
|
||||||
|
add si, 3d
|
||||||
|
mov di, [to]
|
||||||
|
mov cx, [len]
|
||||||
|
|
||||||
|
mov ax, 0802h
|
||||||
|
out dx, ax
|
||||||
|
shr cx, 2
|
||||||
|
@@l4:
|
||||||
|
movsb
|
||||||
|
add si, 3
|
||||||
|
loop @@l4
|
||||||
|
|
||||||
|
pop di si es ds
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
PROC tw_waitvr
|
||||||
|
|
||||||
|
mov dx, 03dah
|
||||||
|
|
||||||
|
@@loop1:
|
||||||
|
in al, dx
|
||||||
|
test al, 08h
|
||||||
|
jnz @@loop1
|
||||||
|
|
||||||
|
@@loop2:
|
||||||
|
in al, dx
|
||||||
|
test al, 08h
|
||||||
|
jz @@loop2
|
||||||
|
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
|
||||||
|
PROC C tw_setrgbpalette
|
||||||
|
|
||||||
|
ARG pal:word, r:word, g:word, b:word
|
||||||
|
|
||||||
|
mov dx, 3c8h
|
||||||
|
mov ax, [pal]
|
||||||
|
out dx, al
|
||||||
|
|
||||||
|
inc dx
|
||||||
|
mov ax, [r]
|
||||||
|
out dx, al
|
||||||
|
mov ax, [g]
|
||||||
|
out dx, al
|
||||||
|
mov ax, [b]
|
||||||
|
out dx, al
|
||||||
|
|
||||||
|
ret
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
END
|
||||||
12
ALKU/TWEAK.H
Normal file
12
ALKU/TWEAK.H
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
extern void tw_opengraph();
|
||||||
|
extern void tw_closegraph();
|
||||||
|
extern void tw_putpixel(int x, int y, int color);
|
||||||
|
extern int tw_getpixel(int x, int y);
|
||||||
|
extern void tw_setpalette(void far *pal);
|
||||||
|
extern void tw_setpalarea(void far *pal,int start,int cnt);
|
||||||
|
extern void tw_setrgbpalette(int pal, int r, int g, int b);
|
||||||
|
extern void tw_setstart(int start);
|
||||||
|
extern void tw_pictovmem(void far *pic, int to, int len);
|
||||||
|
extern void tw_crlscr();
|
||||||
|
|
||||||
|
extern int far scr_seg;
|
||||||
BIN
ALKU/TWEAK.OBJ
Normal file
BIN
ALKU/TWEAK.OBJ
Normal file
Binary file not shown.
BIN
ALKU/U2-MOVIE.LBM
Normal file
BIN
ALKU/U2-MOVIE.LBM
Normal file
Binary file not shown.
1
ALKU/U2.BAT
Normal file
1
ALKU/U2.BAT
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
@h:\u2\main\u2.exe %1 %2 %3 %4 %5
|
||||||
1
ALKU/X.BAT
Normal file
1
ALKU/X.BAT
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
copy alku.exe ..\main\data
|
||||||
119
BEG/ASM.ASM
Normal file
119
BEG/ASM.ASM
Normal file
|
|
@ -0,0 +1,119 @@
|
||||||
|
code SEGMENT para public 'CODE'
|
||||||
|
ASSUME cs:code
|
||||||
|
.386
|
||||||
|
LOCALS
|
||||||
|
|
||||||
|
PUBLIC _inittwk
|
||||||
|
_inittwk PROC FAR
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
push si
|
||||||
|
push di
|
||||||
|
push ds
|
||||||
|
; ;clear palette
|
||||||
|
; mov dx,3c8h
|
||||||
|
; xor al,al
|
||||||
|
; out dx,al
|
||||||
|
; inc dx
|
||||||
|
; mov cx,768
|
||||||
|
;@@1: out dx,al
|
||||||
|
; loop @@1
|
||||||
|
;400 rows
|
||||||
|
mov dx,3d4h
|
||||||
|
mov ax,00009h
|
||||||
|
out dx,ax
|
||||||
|
;tweak
|
||||||
|
mov dx,3d4h
|
||||||
|
mov ax,00014h
|
||||||
|
out dx,ax
|
||||||
|
mov ax,0e317h
|
||||||
|
out dx,ax
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,0604h
|
||||||
|
out dx,ax
|
||||||
|
;
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,0f02h
|
||||||
|
out dx,ax
|
||||||
|
mov ax,0a000h
|
||||||
|
mov es,ax
|
||||||
|
xor di,di
|
||||||
|
mov cx,32768
|
||||||
|
xor ax,ax
|
||||||
|
rep stosw
|
||||||
|
;
|
||||||
|
pop ds
|
||||||
|
pop di
|
||||||
|
pop si
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
_inittwk ENDP
|
||||||
|
|
||||||
|
PUBLIC _lineblit
|
||||||
|
_lineblit PROC FAR
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
push si
|
||||||
|
push di
|
||||||
|
push ds
|
||||||
|
mov di,[bp+6]
|
||||||
|
mov es,[bp+8]
|
||||||
|
mov si,[bp+10]
|
||||||
|
mov ds,[bp+12]
|
||||||
|
zpl=0
|
||||||
|
REPT 4
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,02h+(100h shl zpl)
|
||||||
|
out dx,ax
|
||||||
|
zzz=0
|
||||||
|
REPT 80/2
|
||||||
|
mov al,ds:[si+(zzz+0)*4+zpl]
|
||||||
|
mov ah,ds:[si+(zzz+1)*4+zpl]
|
||||||
|
mov es:[di+zzz],ax
|
||||||
|
zzz=zzz+2
|
||||||
|
ENDM
|
||||||
|
zpl=zpl+1
|
||||||
|
ENDM
|
||||||
|
pop ds
|
||||||
|
pop di
|
||||||
|
pop si
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
_lineblit ENDP
|
||||||
|
|
||||||
|
REPOUTSB MACRO
|
||||||
|
local l1
|
||||||
|
l1: mov al,ds:[si]
|
||||||
|
inc si
|
||||||
|
out dx,al
|
||||||
|
dec cx
|
||||||
|
jnz l1
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
PUBLIC _setpalarea
|
||||||
|
_setpalarea PROC FAR
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
push si
|
||||||
|
push di
|
||||||
|
push ds
|
||||||
|
mov si,[bp+6]
|
||||||
|
mov ds,[bp+8]
|
||||||
|
mov ax,[bp+10]
|
||||||
|
mov dx,3c8h
|
||||||
|
out dx,al
|
||||||
|
inc dx
|
||||||
|
mov cx,[bp+12]
|
||||||
|
shl cx,1
|
||||||
|
add cx,ax
|
||||||
|
REPOUTSB
|
||||||
|
pop ds
|
||||||
|
pop di
|
||||||
|
pop si
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
_setpalarea ENDP
|
||||||
|
|
||||||
|
code ENDS
|
||||||
|
END
|
||||||
|
|
||||||
BIN
BEG/ASM.OBJ
Normal file
BIN
BEG/ASM.OBJ
Normal file
Binary file not shown.
87
BEG/BEG.C
Normal file
87
BEG/BEG.C
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "..\dis\dis.h"
|
||||||
|
|
||||||
|
#include "readp.c"
|
||||||
|
|
||||||
|
extern char pic[];
|
||||||
|
|
||||||
|
char *vram=(char *)0xa0000000L;
|
||||||
|
|
||||||
|
char pal2[768];
|
||||||
|
char palette[768];
|
||||||
|
char rowbuf[640];
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
int a,b,c,y;
|
||||||
|
dis_partstart();
|
||||||
|
outp(0x3c4,2);
|
||||||
|
outp(0x3c5,15);
|
||||||
|
memset(vram,15,32768);
|
||||||
|
memset(vram+32768,15,32768);
|
||||||
|
//_asm mov ax,80h+13h
|
||||||
|
//_asm int 10h
|
||||||
|
for(a=0;a<32;a++) dis_waitb();
|
||||||
|
outp(0x3c8,0);
|
||||||
|
for(a=0;a<255;a++)
|
||||||
|
{
|
||||||
|
outp(0x3c9,63);
|
||||||
|
outp(0x3c9,63);
|
||||||
|
outp(0x3c9,63);
|
||||||
|
}
|
||||||
|
outp(0x3c9,0);
|
||||||
|
outp(0x3c9,0);
|
||||||
|
outp(0x3c9,0);
|
||||||
|
inp(0x3da);
|
||||||
|
outp(0x3c0,0x11);
|
||||||
|
outp(0x3c0,255);
|
||||||
|
outp(0x3c0,0x20);
|
||||||
|
//inittwk();
|
||||||
|
_asm
|
||||||
|
{
|
||||||
|
mov dx,3d4h
|
||||||
|
mov ax,000ch
|
||||||
|
out dx,ax
|
||||||
|
mov ax,000dh
|
||||||
|
out dx,ax
|
||||||
|
mov al,9
|
||||||
|
out dx,al
|
||||||
|
inc dx
|
||||||
|
in al,dx
|
||||||
|
and al,not 80h
|
||||||
|
and al,not 31
|
||||||
|
out dx,al
|
||||||
|
mov dx,3c0h
|
||||||
|
mov al,11h
|
||||||
|
out dx,al
|
||||||
|
mov al,0
|
||||||
|
out dx,al
|
||||||
|
mov al,32
|
||||||
|
out dx,al
|
||||||
|
}
|
||||||
|
_asm
|
||||||
|
{
|
||||||
|
mov dx,3c0h
|
||||||
|
mov al,11h
|
||||||
|
out dx,al
|
||||||
|
mov al,255
|
||||||
|
out dx,al
|
||||||
|
mov al,20h
|
||||||
|
out dx,al
|
||||||
|
}
|
||||||
|
|
||||||
|
readp(palette,-1,pic);
|
||||||
|
for(y=0;y<400;y++)
|
||||||
|
{
|
||||||
|
readp(rowbuf,y,pic);
|
||||||
|
lineblit(vram+(unsigned)y*80U,rowbuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(c=0;c<=128;c++)
|
||||||
|
{
|
||||||
|
for(a=0;a<768-3;a++) pal2[a]=((128-c)*63+palette[a]*c)/128;
|
||||||
|
dis_waitb();
|
||||||
|
setpalarea(pal2,0,254);
|
||||||
|
}
|
||||||
|
setpalarea(palette,0,254);
|
||||||
|
}
|
||||||
BIN
BEG/BEG.EXE
Normal file
BIN
BEG/BEG.EXE
Normal file
Binary file not shown.
BIN
BEG/BEG.OBJ
Normal file
BIN
BEG/BEG.OBJ
Normal file
Binary file not shown.
BIN
BEG/DP_PREFS
Normal file
BIN
BEG/DP_PREFS
Normal file
Binary file not shown.
24
BEG/MAKEFILE
Normal file
24
BEG/MAKEFILE
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
all : beg.exe
|
||||||
|
|
||||||
|
# objects
|
||||||
|
|
||||||
|
objs=beg.obj asm.obj
|
||||||
|
|
||||||
|
# option flags
|
||||||
|
|
||||||
|
asm_f = /ML /m9 /s /JJUMPS
|
||||||
|
c_f = /AL /c /W3
|
||||||
|
|
||||||
|
# general compile orders
|
||||||
|
|
||||||
|
.asm.obj :
|
||||||
|
tasm $(asm_f) $<
|
||||||
|
|
||||||
|
.c.obj :
|
||||||
|
cl /qc $(c_f) $<
|
||||||
|
|
||||||
|
beg.exe : $(objs)
|
||||||
|
link /E $(objs)+_pic.obk+..\dis\disc.obj,beg.exe,nul;
|
||||||
|
copy beg.exe ..\main\data\beglogo.exe
|
||||||
|
|
||||||
|
|
||||||
64
BEG/READP.C
Normal file
64
BEG/READP.C
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
struct st_readp
|
||||||
|
{
|
||||||
|
int magic;
|
||||||
|
int wid;
|
||||||
|
int hig;
|
||||||
|
int cols;
|
||||||
|
int add;
|
||||||
|
};
|
||||||
|
|
||||||
|
void readp(char *dest,int row,char *src)
|
||||||
|
{
|
||||||
|
int bytes,a,b;
|
||||||
|
struct st_readp *hdr;
|
||||||
|
hdr=(struct st_readp *)src;
|
||||||
|
if(row==-1)
|
||||||
|
{
|
||||||
|
memcpy(dest,src+16,hdr->cols*3);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(row>=hdr->hig) return;
|
||||||
|
src+=hdr->add*16;
|
||||||
|
while(row)
|
||||||
|
{
|
||||||
|
src+=*(int *)src;
|
||||||
|
src+=2;
|
||||||
|
row--;
|
||||||
|
}
|
||||||
|
bytes=*(int *)src;
|
||||||
|
src+=2;
|
||||||
|
_asm
|
||||||
|
{
|
||||||
|
push si
|
||||||
|
push ds
|
||||||
|
push di
|
||||||
|
push es
|
||||||
|
mov cx,bytes
|
||||||
|
lds si,src
|
||||||
|
add cx,si
|
||||||
|
les di,dest
|
||||||
|
l1: mov al,ds:[si]
|
||||||
|
inc si
|
||||||
|
or al,al
|
||||||
|
jns l2
|
||||||
|
mov ah,al
|
||||||
|
and ah,7fh
|
||||||
|
mov al,ds:[si]
|
||||||
|
inc si
|
||||||
|
l4: mov es:[di],al
|
||||||
|
inc di
|
||||||
|
dec ah
|
||||||
|
jnz l4
|
||||||
|
cmp si,cx
|
||||||
|
jb l1
|
||||||
|
jmp l3
|
||||||
|
l2: mov es:[di],al
|
||||||
|
inc di
|
||||||
|
cmp si,cx
|
||||||
|
jb l1
|
||||||
|
l3: pop es
|
||||||
|
pop di
|
||||||
|
pop ds
|
||||||
|
pop si
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
BEG/SRTITLE.LBM
Normal file
BIN
BEG/SRTITLE.LBM
Normal file
Binary file not shown.
BIN
BEG/SRTITLE.UP
Normal file
BIN
BEG/SRTITLE.UP
Normal file
Binary file not shown.
BIN
BEG/TMP.BBM
Normal file
BIN
BEG/TMP.BBM
Normal file
Binary file not shown.
BIN
BEG/_PIC.OBK
Normal file
BIN
BEG/_PIC.OBK
Normal file
Binary file not shown.
98
CODE
Normal file
98
CODE
Normal file
|
|
@ -0,0 +1,98 @@
|
||||||
|
Unreal 2 - Coders Info
|
||||||
|
======================
|
||||||
|
|
||||||
|
__________________________________________________________________________
|
||||||
|
1. General
|
||||||
|
|
||||||
|
Nothing general so far... Except read this file!
|
||||||
|
|
||||||
|
__________________________________________________________________________
|
||||||
|
2. Directory structure
|
||||||
|
|
||||||
|
See file DIRS for descriptions about current directories.
|
||||||
|
|
||||||
|
I'm going to use this structure, hope you will too. For me [root] is
|
||||||
|
D:\S\P\U2, but it could be anything you like. I'll use \ as root
|
||||||
|
for the rest of the text for simplicity, so [root]\DIS is just \DIS.
|
||||||
|
|
||||||
|
Refer to all files relatively. That is, if you are coding part X and
|
||||||
|
need DIS.H, refer to it as "..\DIS\DIS.H". This way our sources are
|
||||||
|
easily shared and minimum number of files lies in multiple directories.
|
||||||
|
|
||||||
|
Don't put your own data to \MAIN\DATA, it's reserved for the loader.
|
||||||
|
The idea is that there will be a batch file etc in MAIN that will
|
||||||
|
copy all part exe's from part directories to \MAIN\DATA, and the
|
||||||
|
loader will load them from there. The makefile in MAIN will create
|
||||||
|
the combined exe to \.
|
||||||
|
|
||||||
|
When you create part directories for your own parts, use intelligent
|
||||||
|
dir names like GLENZ, not something like PART1.
|
||||||
|
|
||||||
|
__________________________________________________________________________
|
||||||
|
3. Coding concerns
|
||||||
|
|
||||||
|
The current suggested memory limit is about 450K, so it'd be great
|
||||||
|
if your part would run in it. No need to start counting memory
|
||||||
|
usage just yet, but keep this in mind, so no this-requires-620K-of-
|
||||||
|
free-mem-routines. Note also that you must use the DIS routines,
|
||||||
|
see later section.
|
||||||
|
|
||||||
|
__________________________________________________________________________
|
||||||
|
4. Music
|
||||||
|
|
||||||
|
Music will most probably be loaded to EMS, so it doesn't use main
|
||||||
|
memory. There will be equpointer information etc available from
|
||||||
|
DIS so using equs etc will be possible.
|
||||||
|
|
||||||
|
__________________________________________________________________________
|
||||||
|
5. Demo Interrupt Server (DIS)
|
||||||
|
|
||||||
|
This is an unreal style interrupt server through which certain
|
||||||
|
demo operations should be performed.
|
||||||
|
|
||||||
|
Mainly, exit status (any key pressed) and waitborder should be
|
||||||
|
processesd through DIS. DIS will also provide internal copper
|
||||||
|
routine for general copper needs and poll the music. There will
|
||||||
|
also be an option for you to use the DIS copper for simple
|
||||||
|
call this procedure once per frame operations. If your part
|
||||||
|
requires hi resolution copper, you must include it to your
|
||||||
|
code. There will be an option to temporarily shut down the
|
||||||
|
DIS copper. If that is done you'll also need to poll the music
|
||||||
|
etc, but more on that when special coppers are needed.
|
||||||
|
|
||||||
|
More exact information on DIS from the \DIS directory (source
|
||||||
|
& documentation included). Once again, don't modify the source,
|
||||||
|
since if you do, our copies will be out of sync.
|
||||||
|
|
||||||
|
There is a resident DIS server in \DIS, which can be used to
|
||||||
|
test the parts before including them to the actual demo. The
|
||||||
|
demo will have the DIS built in. With this resident utility,
|
||||||
|
all parts should be ready-for-demo, which will make compiling
|
||||||
|
the demo easier and reduce the bugs otherwise generated in
|
||||||
|
the progress.
|
||||||
|
|
||||||
|
The basic structure of a part using DIS:
|
||||||
|
1. Initialize dis (actually tell it of a new part)
|
||||||
|
dis_version() /* will return 0 if no dis, in mem, then exit to dos */
|
||||||
|
or dis_partstart() /* checks & exits automatically */
|
||||||
|
|
||||||
|
2. Do the demo effect, remember to wait for borders with
|
||||||
|
dis_waitb()
|
||||||
|
|
||||||
|
3. Repeat 2 until dis_exit() returns 1.
|
||||||
|
|
||||||
|
Note, that you can use dis_indemo() to determine if you are actually
|
||||||
|
running inside the demo, since inside the demo you generally don't
|
||||||
|
reset video mode etc for smooth transitions. If dis_indemo returns
|
||||||
|
0, you are running from dos, and should set/reset video on startup
|
||||||
|
and exit.
|
||||||
|
|
||||||
|
__________________________________________________________________________
|
||||||
|
6. Part packaging
|
||||||
|
|
||||||
|
Every part should be combined to a single exe file. Convert
|
||||||
|
data files to object files and link. If you need (like me)
|
||||||
|
a paragraph starting segment (offset=0, segment para), use
|
||||||
|
\UTIL\DOOBJ.
|
||||||
|
|
||||||
|
The EXE should run on it's own with DIS on the background.
|
||||||
158
COMAN/ASM
Normal file
158
COMAN/ASM
Normal file
|
|
@ -0,0 +1,158 @@
|
||||||
|
PUBLIC _docol,_docolset
|
||||||
|
|
||||||
|
PUBLIC _docol_mapc,_docol_maph,_docol_ycd
|
||||||
|
PUBLIC _docol_hig,_docol_higr,_docol_higrr,_docol_higrrr
|
||||||
|
PUBLIC _docol_bailout,_docol_debug
|
||||||
|
PUBLIC _docol_avg
|
||||||
|
|
||||||
|
BAILOUT equ 256
|
||||||
|
|
||||||
|
ALIGN 16
|
||||||
|
_docol_hig dd 256 dup(0)
|
||||||
|
_docol_higr dd 256 dup(0)
|
||||||
|
_docol_higrr dd 256 dup(0)
|
||||||
|
_docol_higrrr dd 256 dup(0)
|
||||||
|
_docol_ycd dd 200 dup(0)
|
||||||
|
_docol_bailout dw BAILOUT
|
||||||
|
_docol_mapc dw 0,0
|
||||||
|
_docol_maph dw 0,0
|
||||||
|
_docol_avg dw 0,0
|
||||||
|
_docol_debug dd 0
|
||||||
|
|
||||||
|
_docolset PROC FAR
|
||||||
|
CBEG
|
||||||
|
movpar ax,0
|
||||||
|
mov cx,(slf1-slf0)/BAILOUT
|
||||||
|
mul cx
|
||||||
|
add ax,OFFSET slf0
|
||||||
|
mov bx,ax
|
||||||
|
movpar ax,1
|
||||||
|
movpar dx,2
|
||||||
|
mov cs:[bx+10+2],ax
|
||||||
|
mov cs:[bx+10+4],dx
|
||||||
|
CEND
|
||||||
|
_docolset ENDP
|
||||||
|
|
||||||
|
public _doavg
|
||||||
|
_doavg PROC FAR
|
||||||
|
CBEG
|
||||||
|
mov ax,SEG _vbuf
|
||||||
|
mov es,ax
|
||||||
|
mov ds,cs:_docol_avg[2]
|
||||||
|
movpar di,0
|
||||||
|
|
||||||
|
add di,80*320
|
||||||
|
mov cx,200-80
|
||||||
|
@@1: mov bl,es:[di]
|
||||||
|
diadd=2
|
||||||
|
REPT 159
|
||||||
|
mov bh,es:[di+diadd]
|
||||||
|
mov al,ds:[bx]
|
||||||
|
mov bl,bh
|
||||||
|
mov es:[di+diadd-1],al
|
||||||
|
diadd=diadd+2
|
||||||
|
ENDM
|
||||||
|
add di,320
|
||||||
|
dec cx
|
||||||
|
jz @@2
|
||||||
|
jmp @@1
|
||||||
|
@@2:
|
||||||
|
CEND
|
||||||
|
_doavg ENDP
|
||||||
|
|
||||||
|
_docol PROC FAR
|
||||||
|
CBEG
|
||||||
|
mov ax,cs
|
||||||
|
mov ds,ax
|
||||||
|
|
||||||
|
push bp ;store C parameter start
|
||||||
|
|
||||||
|
mov fs,ds:_docol_maph[2]
|
||||||
|
mov gs,ds:_docol_mapc[2]
|
||||||
|
|
||||||
|
movpar ax,1
|
||||||
|
shl ax,7
|
||||||
|
movpar si,0
|
||||||
|
movzx esi,si
|
||||||
|
add si,ax ;basepos
|
||||||
|
|
||||||
|
xor ebx,ebx
|
||||||
|
;movpar ax,3 ;screen pos
|
||||||
|
;and ax,3
|
||||||
|
;mov bh,al ;scatterer
|
||||||
|
|
||||||
|
movpar dx,2
|
||||||
|
movsx edx,dx
|
||||||
|
shl edx,7
|
||||||
|
rol edx,16
|
||||||
|
mov bp,dx
|
||||||
|
add bp,-128 ;baseadd
|
||||||
|
xor dx,dx
|
||||||
|
|
||||||
|
;selfmod: vram/pos, docol_ycd/pos
|
||||||
|
;eax - -
|
||||||
|
;ebx indexer-tmp (+scatterpos)
|
||||||
|
;ecx - -
|
||||||
|
;edx xaddl 0
|
||||||
|
;esi xl x
|
||||||
|
;edi - -
|
||||||
|
;ebp - xaddh
|
||||||
|
;ds code
|
||||||
|
;es -
|
||||||
|
;fs maph
|
||||||
|
;gs mapc
|
||||||
|
diadd=OFFSET slf0
|
||||||
|
REPT BAILOUT
|
||||||
|
and si,16383
|
||||||
|
mov bl,fs:[si]
|
||||||
|
mov eax,ds:_docol_hig[ebx*4]
|
||||||
|
mov dword ptr ds:[diadd+0+2],eax ;set compare
|
||||||
|
add esi,edx
|
||||||
|
mov al,gs:[si]
|
||||||
|
mov byte ptr ds:[diadd+8+1],al ;set color
|
||||||
|
adc si,bp
|
||||||
|
diadd=diadd+(slf1-slf0)/BAILOUT
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
jmp @@flsh
|
||||||
|
@@flsh: pop bp ;restore C parameter start
|
||||||
|
|
||||||
|
mov ax,SEG _vbuf
|
||||||
|
mov es,ax
|
||||||
|
movpar ax,3
|
||||||
|
mov bp,ax
|
||||||
|
mov di,OFFSET _docol_ycd+199*4
|
||||||
|
mov ecx,ds:[di]
|
||||||
|
xor eax,eax
|
||||||
|
|
||||||
|
;selfmod: vram/pos, docol_ycd/pos
|
||||||
|
;eax yc ycl
|
||||||
|
;ebx - -
|
||||||
|
;ecx ycaddh ycaddl
|
||||||
|
;edx - -
|
||||||
|
;esi - -
|
||||||
|
;edi - offset to ycd
|
||||||
|
;ebp - offset to vram
|
||||||
|
;ds code
|
||||||
|
;es vram
|
||||||
|
|
||||||
|
int 3
|
||||||
|
|
||||||
|
slf0: siadd=0
|
||||||
|
REPT BAILOUT
|
||||||
|
local l1,l2,l3
|
||||||
|
l3: cmp eax,12345678h ;@0 compare ray / scene
|
||||||
|
jge short l1 ;@6 hit?
|
||||||
|
mov cl,12h ;@8 load color
|
||||||
|
l2: sub eax,12345678h ;@10 adjust next ray pos
|
||||||
|
mov es:[bp+0],cl ; store color
|
||||||
|
sub di,4 ; adjust raytable pointer
|
||||||
|
sub bp,320 ; next screen pos
|
||||||
|
cmp dword ptr ds:l3[2],eax ; next ray hits too?
|
||||||
|
jge short l2 ; yup.
|
||||||
|
mov ecx,ds:[di] ; next ray direction
|
||||||
|
l1: add eax,ecx ; on we go in Z
|
||||||
|
siadd=siadd+4
|
||||||
|
ENDM
|
||||||
|
slf1: CEND
|
||||||
|
_docol ENDP
|
||||||
239
COMAN/ASM.ASM
Normal file
239
COMAN/ASM.ASM
Normal file
|
|
@ -0,0 +1,239 @@
|
||||||
|
EXTRN theloop:far
|
||||||
|
|
||||||
|
code SEGMENT para public 'CODE'
|
||||||
|
ASSUME cs:code
|
||||||
|
.386
|
||||||
|
LOCALS
|
||||||
|
|
||||||
|
PUBLIC _wave1,_wave2,_vbuf,_cameralevel
|
||||||
|
_wave1 dw 0,0
|
||||||
|
_wave2 dw 0,0
|
||||||
|
_vbuf dw 0,0
|
||||||
|
_cameralevel dw 0
|
||||||
|
|
||||||
|
PUBLIC _sin1024
|
||||||
|
include sin1024.inc
|
||||||
|
|
||||||
|
PUBLIC _combguse
|
||||||
|
_combguse db 90*160 dup(0)
|
||||||
|
|
||||||
|
PUBLIC _setborder
|
||||||
|
_setborder PROC FAR
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
mov dx,3dah
|
||||||
|
in al,dx
|
||||||
|
mov dx,3c0h
|
||||||
|
mov al,11h+32
|
||||||
|
out dx,al
|
||||||
|
mov al,[bp+6]
|
||||||
|
out dx,al
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
_setborder ENDP
|
||||||
|
|
||||||
|
PUBLIC _inittwk
|
||||||
|
_inittwk PROC FAR
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
push si
|
||||||
|
push di
|
||||||
|
push ds
|
||||||
|
;clear palette
|
||||||
|
mov dx,3c8h
|
||||||
|
xor al,al
|
||||||
|
out dx,al
|
||||||
|
inc dx
|
||||||
|
mov cx,768
|
||||||
|
@@1: out dx,al
|
||||||
|
loop @@1
|
||||||
|
mov dx,3d4h
|
||||||
|
;400 rows
|
||||||
|
;mov ax,00009h
|
||||||
|
;out dx,ax
|
||||||
|
;tweak
|
||||||
|
mov ax,00014h
|
||||||
|
out dx,ax
|
||||||
|
mov ax,0e317h
|
||||||
|
out dx,ax
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,0604h
|
||||||
|
out dx,ax
|
||||||
|
;
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,0f02h
|
||||||
|
out dx,ax
|
||||||
|
mov ax,0a000h
|
||||||
|
mov es,ax
|
||||||
|
xor di,di
|
||||||
|
mov cx,32768
|
||||||
|
xor ax,ax
|
||||||
|
rep stosw
|
||||||
|
;
|
||||||
|
pop ds
|
||||||
|
pop di
|
||||||
|
pop si
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
_inittwk ENDP
|
||||||
|
|
||||||
|
PUBLIC _setpalarea
|
||||||
|
_setpalarea PROC FAR
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
push si
|
||||||
|
push di
|
||||||
|
push ds
|
||||||
|
lds si,[bp+6]
|
||||||
|
mov ax,[bp+10]
|
||||||
|
mov dx,3c8h
|
||||||
|
out dx,al
|
||||||
|
mov cx,[bp+12]
|
||||||
|
mov ax,cx
|
||||||
|
shl cx,1
|
||||||
|
add cx,ax
|
||||||
|
inc dx
|
||||||
|
rep outsb
|
||||||
|
sti
|
||||||
|
pop ds
|
||||||
|
pop di
|
||||||
|
pop si
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
_setpalarea ENDP
|
||||||
|
|
||||||
|
PUBLIC _docol
|
||||||
|
_docol PROC FAR
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
push si
|
||||||
|
push di
|
||||||
|
push ds
|
||||||
|
mov es,cs:_vbuf[2]
|
||||||
|
mov fs,cs:_wave1[2]
|
||||||
|
mov gs,cs:_wave2[2]
|
||||||
|
mov ax,not 1
|
||||||
|
mov si,[bp+6]
|
||||||
|
and si,ax
|
||||||
|
mov di,[bp+8]
|
||||||
|
and di,ax
|
||||||
|
mov cx,[bp+10]
|
||||||
|
and cx,ax
|
||||||
|
mov dx,[bp+12]
|
||||||
|
and dx,ax
|
||||||
|
mov bp,[bp+14]
|
||||||
|
mov ax,cs:_cameralevel
|
||||||
|
call theloop
|
||||||
|
pop ds
|
||||||
|
pop di
|
||||||
|
pop si
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
_docol ENDP
|
||||||
|
|
||||||
|
PUBLIC _docopy
|
||||||
|
_docopy PROC FAR
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
push si
|
||||||
|
push di
|
||||||
|
push ds
|
||||||
|
mov es,[bp+6]
|
||||||
|
|
||||||
|
IFDEF PXLSUX
|
||||||
|
mov ax,cs
|
||||||
|
mov ds,ax
|
||||||
|
mov si,OFFSET _combguse
|
||||||
|
mov di,0
|
||||||
|
mov cx,60
|
||||||
|
;
|
||||||
|
@@7: mov dx,3c4h
|
||||||
|
mov ax,0302h
|
||||||
|
out dx,ax
|
||||||
|
zzz=0
|
||||||
|
REPT 20
|
||||||
|
mov eax,ds:[si+zzz]
|
||||||
|
mov es:[di+zzz],eax
|
||||||
|
zzz=zzz+4
|
||||||
|
ENDM
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,0C02h
|
||||||
|
out dx,ax
|
||||||
|
zzz=0
|
||||||
|
REPT 20
|
||||||
|
mov eax,ds:[si+zzz+80]
|
||||||
|
mov es:[di+zzz],eax
|
||||||
|
zzz=zzz+4
|
||||||
|
ENDM
|
||||||
|
add si,160
|
||||||
|
add di,80
|
||||||
|
dec cx
|
||||||
|
jnz @@7
|
||||||
|
ENDIF
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,0f02h
|
||||||
|
out dx,ax
|
||||||
|
mov es,[bp+6]
|
||||||
|
mov ds,cs:_vbuf[2]
|
||||||
|
mov si,60*160
|
||||||
|
mov di,52*80
|
||||||
|
mov cx,18*80/4
|
||||||
|
xor eax,eax
|
||||||
|
rep stosd
|
||||||
|
mov cx,140
|
||||||
|
mov bl,255
|
||||||
|
mov bh,bl
|
||||||
|
mov ax,bx
|
||||||
|
shl ebx,16
|
||||||
|
mov bx,ax
|
||||||
|
;
|
||||||
|
@@1: mov dx,3c4h
|
||||||
|
mov ax,0302h
|
||||||
|
out dx,ax
|
||||||
|
zzz=0
|
||||||
|
REPT 20
|
||||||
|
mov eax,ds:[si+zzz]
|
||||||
|
mov es:[di+zzz],eax
|
||||||
|
zzz=zzz+4
|
||||||
|
ENDM
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,0C02h
|
||||||
|
out dx,ax
|
||||||
|
zzz=0
|
||||||
|
REPT 20
|
||||||
|
mov eax,ds:[si+zzz+80]
|
||||||
|
mov es:[di+zzz],eax
|
||||||
|
zzz=zzz+4
|
||||||
|
ENDM
|
||||||
|
add si,160
|
||||||
|
add di,80
|
||||||
|
dec cx
|
||||||
|
jnz @@1
|
||||||
|
|
||||||
|
; mov ax,cs
|
||||||
|
; mov ds,ax
|
||||||
|
; mov si,OFFSET _combguse+60*160
|
||||||
|
xor eax,eax
|
||||||
|
mov es,cs:_vbuf[2]
|
||||||
|
mov di,68*160
|
||||||
|
mov cx,30*160/4/4
|
||||||
|
@@cl1: mov es:[di],eax
|
||||||
|
add di,4
|
||||||
|
mov es:[di],eax
|
||||||
|
add di,4
|
||||||
|
mov es:[di],eax
|
||||||
|
add di,4
|
||||||
|
mov es:[di],eax
|
||||||
|
add di,4
|
||||||
|
dec cx
|
||||||
|
jnz @@cl1
|
||||||
|
|
||||||
|
pop ds
|
||||||
|
pop di
|
||||||
|
pop si
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
_docopy ENDP
|
||||||
|
|
||||||
|
code ENDS
|
||||||
|
END
|
||||||
BIN
COMAN/ASM.OBJ
Normal file
BIN
COMAN/ASM.OBJ
Normal file
Binary file not shown.
207
COMAN/ASM1.ASM
Normal file
207
COMAN/ASM1.ASM
Normal file
|
|
@ -0,0 +1,207 @@
|
||||||
|
EXTRN theloop:far
|
||||||
|
|
||||||
|
code SEGMENT para public 'CODE'
|
||||||
|
ASSUME cs:code
|
||||||
|
.386
|
||||||
|
LOCALS
|
||||||
|
|
||||||
|
PUBLIC _wave1,_wave2,_vbuf,_cameralevel
|
||||||
|
_wave1 dw 0,0
|
||||||
|
_wave2 dw 0,0
|
||||||
|
_vbuf dw 0,0
|
||||||
|
_cameralevel dw 0
|
||||||
|
|
||||||
|
PUBLIC _sin1024
|
||||||
|
include sin1024.inc
|
||||||
|
|
||||||
|
PUBLIC _setborder
|
||||||
|
_setborder PROC FAR
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
mov dx,3dah
|
||||||
|
in al,dx
|
||||||
|
mov dx,3c0h
|
||||||
|
mov al,11h+32
|
||||||
|
out dx,al
|
||||||
|
mov al,[bp+6]
|
||||||
|
out dx,al
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
_setborder ENDP
|
||||||
|
|
||||||
|
PUBLIC _inittwk
|
||||||
|
_inittwk PROC FAR
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
push si
|
||||||
|
push di
|
||||||
|
push ds
|
||||||
|
;clear palette
|
||||||
|
mov dx,3c8h
|
||||||
|
xor al,al
|
||||||
|
out dx,al
|
||||||
|
inc dx
|
||||||
|
mov cx,768
|
||||||
|
@@1: out dx,al
|
||||||
|
loop @@1
|
||||||
|
mov dx,3d4h
|
||||||
|
;400 rows
|
||||||
|
;mov ax,00009h
|
||||||
|
;out dx,ax
|
||||||
|
;tweak
|
||||||
|
mov ax,00014h
|
||||||
|
out dx,ax
|
||||||
|
mov ax,0e317h
|
||||||
|
out dx,ax
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,0604h
|
||||||
|
out dx,ax
|
||||||
|
;
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,0f02h
|
||||||
|
out dx,ax
|
||||||
|
mov ax,0a000h
|
||||||
|
mov es,ax
|
||||||
|
xor di,di
|
||||||
|
mov cx,32768
|
||||||
|
xor ax,ax
|
||||||
|
rep stosw
|
||||||
|
;
|
||||||
|
pop ds
|
||||||
|
pop di
|
||||||
|
pop si
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
_inittwk ENDP
|
||||||
|
|
||||||
|
PUBLIC _setpalarea
|
||||||
|
_setpalarea PROC FAR
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
push si
|
||||||
|
push di
|
||||||
|
push ds
|
||||||
|
lds si,[bp+6]
|
||||||
|
mov ax,[bp+10]
|
||||||
|
mov dx,3c8h
|
||||||
|
out dx,al
|
||||||
|
mov cx,[bp+12]
|
||||||
|
mov ax,cx
|
||||||
|
shl cx,1
|
||||||
|
add cx,ax
|
||||||
|
inc dx
|
||||||
|
rep outsb
|
||||||
|
sti
|
||||||
|
pop ds
|
||||||
|
pop di
|
||||||
|
pop si
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
_setpalarea ENDP
|
||||||
|
|
||||||
|
PUBLIC _docol
|
||||||
|
_docol PROC FAR
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
push si
|
||||||
|
push di
|
||||||
|
push ds
|
||||||
|
mov es,cs:_vbuf[2]
|
||||||
|
mov fs,cs:_wave1[2]
|
||||||
|
mov gs,cs:_wave2[2]
|
||||||
|
mov si,[bp+6]
|
||||||
|
mov di,[bp+8]
|
||||||
|
mov cx,[bp+10]
|
||||||
|
add cx,cx
|
||||||
|
mov dx,[bp+12]
|
||||||
|
add dx,dx
|
||||||
|
mov bp,[bp+14]
|
||||||
|
mov ax,cs:_cameralevel
|
||||||
|
int 3
|
||||||
|
call theloop
|
||||||
|
pop ds
|
||||||
|
pop di
|
||||||
|
pop si
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
_docol ENDP
|
||||||
|
|
||||||
|
PUBLIC _docopy
|
||||||
|
_docopy PROC FAR
|
||||||
|
push bp
|
||||||
|
mov bp,sp
|
||||||
|
push si
|
||||||
|
push di
|
||||||
|
push ds
|
||||||
|
mov es,[bp+6]
|
||||||
|
mov ds,cs:_vbuf[2]
|
||||||
|
mov si,50*160
|
||||||
|
mov di,50*80
|
||||||
|
mov cx,150
|
||||||
|
mov bl,255
|
||||||
|
mov bh,bl
|
||||||
|
mov ax,bx
|
||||||
|
shl ebx,16
|
||||||
|
mov bx,ax
|
||||||
|
@@1: cmp cx,100
|
||||||
|
jge @@2
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,0302h
|
||||||
|
out dx,ax
|
||||||
|
zzz=0
|
||||||
|
REPT 20
|
||||||
|
mov eax,ds:[si+zzz]
|
||||||
|
mov es:[di+zzz],eax
|
||||||
|
zzz=zzz+4
|
||||||
|
ENDM
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,0C02h
|
||||||
|
out dx,ax
|
||||||
|
zzz=0
|
||||||
|
REPT 20
|
||||||
|
mov eax,ds:[si+zzz+80]
|
||||||
|
mov es:[di+zzz],eax
|
||||||
|
zzz=zzz+4
|
||||||
|
ENDM
|
||||||
|
add si,160
|
||||||
|
add di,80
|
||||||
|
dec cx
|
||||||
|
jnz @@1
|
||||||
|
pop ds
|
||||||
|
pop di
|
||||||
|
pop si
|
||||||
|
pop bp
|
||||||
|
ret
|
||||||
|
@@2: ;this loop also clears
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,0302h
|
||||||
|
out dx,ax
|
||||||
|
zzz=0
|
||||||
|
REPT 20
|
||||||
|
mov eax,ds:[si+zzz]
|
||||||
|
mov ds:[si+zzz],ebx
|
||||||
|
mov es:[di+zzz],eax
|
||||||
|
zzz=zzz+4
|
||||||
|
ENDM
|
||||||
|
mov dx,3c4h
|
||||||
|
mov ax,0C02h
|
||||||
|
out dx,ax
|
||||||
|
zzz=0
|
||||||
|
REPT 20
|
||||||
|
mov eax,ds:[si+zzz+80]
|
||||||
|
mov ds:[si+zzz+80],ebx
|
||||||
|
mov es:[di+zzz],eax
|
||||||
|
zzz=zzz+4
|
||||||
|
ENDM
|
||||||
|
sub ebx,01010101h
|
||||||
|
cmp bl,192
|
||||||
|
jge @@3
|
||||||
|
mov ebx,0c0c0c0c0h
|
||||||
|
@@3: add si,160
|
||||||
|
add di,80
|
||||||
|
dec cx
|
||||||
|
jmp @@1
|
||||||
|
_docopy ENDP
|
||||||
|
|
||||||
|
code ENDS
|
||||||
|
END
|
||||||
BIN
COMAN/C.EXE
Normal file
BIN
COMAN/C.EXE
Normal file
Binary file not shown.
BIN
COMAN/COMBG.LBM
Normal file
BIN
COMAN/COMBG.LBM
Normal file
Binary file not shown.
BIN
COMAN/COMBG.UH
Normal file
BIN
COMAN/COMBG.UH
Normal file
Binary file not shown.
BIN
COMAN/COMBG.X
Normal file
BIN
COMAN/COMBG.X
Normal file
Binary file not shown.
129
COMAN/DOLOOP.1
Normal file
129
COMAN/DOLOOP.1
Normal file
|
|
@ -0,0 +1,129 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int depth=2;
|
||||||
|
int bail=150;
|
||||||
|
int group=3;
|
||||||
|
|
||||||
|
FILE *f1;
|
||||||
|
|
||||||
|
void P(char *str,...)
|
||||||
|
{
|
||||||
|
char out[256];
|
||||||
|
va_list argp;
|
||||||
|
va_start(argp,str);
|
||||||
|
vsprintf(out,str,argp);
|
||||||
|
fprintf(f1,"%s\n",out);
|
||||||
|
va_end(argp);
|
||||||
|
}
|
||||||
|
|
||||||
|
long weirdflip(unsigned long l)
|
||||||
|
{
|
||||||
|
long m,lo,hi;
|
||||||
|
lo=l&0xffff;
|
||||||
|
hi=l>>16;
|
||||||
|
m=(lo<<16)+hi;
|
||||||
|
return(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
int i,j,jm,y,a;
|
||||||
|
long l;
|
||||||
|
f1=fopen("theloop.inc","wt");
|
||||||
|
|
||||||
|
P(";Register usage: ");
|
||||||
|
P(";eax low... ray heigth ");
|
||||||
|
P(";ebx - p->screen ");
|
||||||
|
P(";ecx low... ray direction (always negative)");
|
||||||
|
P(";edx - scenary heigth ");
|
||||||
|
P(";esi - xsin ");
|
||||||
|
P(";edi - ysin ");
|
||||||
|
P(";ebp - p->ray_dir_table");
|
||||||
|
P(";ds ->codesegment");
|
||||||
|
P(";es ->screenbuffer");
|
||||||
|
P(";fs ->wavetable");
|
||||||
|
P(";gs -");
|
||||||
|
P("");
|
||||||
|
P("ALIGN 16 ;following should stay in cache");
|
||||||
|
P("theloop_waveseg dw 0");
|
||||||
|
P("theloop_xsina dw 0");
|
||||||
|
P("theloop_ysina dw 0");
|
||||||
|
P("theloop_heigth dw 0");
|
||||||
|
P("theloop_raydir LABEL DWORD");
|
||||||
|
for(y=0;y<200;y++)
|
||||||
|
{
|
||||||
|
a=(199-y)-100;
|
||||||
|
l=-(long)a*10L*256L*depth;
|
||||||
|
l=weirdflip(l);
|
||||||
|
P("dd 0%08lXh",l);
|
||||||
|
}
|
||||||
|
P("");
|
||||||
|
P(";entry: es=videbuf");
|
||||||
|
P("; bp=pointer to bottom of current column in videbuf");
|
||||||
|
P("; fs=waveXsegment");
|
||||||
|
P("; gs=waveYsegment");
|
||||||
|
P("; si=waveXpos");
|
||||||
|
P("; di=waveYpos");
|
||||||
|
P("; cx=waveXadd");
|
||||||
|
P("; dx=waveYadd");
|
||||||
|
P("; ax=camera heigth adder");
|
||||||
|
P("theloop PROC FAR");
|
||||||
|
P("mov bx,bp");
|
||||||
|
P("mov cs:theloop_xsina,cx");
|
||||||
|
P("mov cs:theloop_ysina,dx");
|
||||||
|
P("mov cs:theloop_heigth,ax");
|
||||||
|
P("mov bp,OFFSET theloop_raydir");
|
||||||
|
P("mov ax,cs");
|
||||||
|
P("mov ds,ax");
|
||||||
|
P("xor eax,eax");
|
||||||
|
P("mov ecx,ds:[bp]");
|
||||||
|
P("add bp,4");
|
||||||
|
for(i=0;i<bail;i+=group)
|
||||||
|
{
|
||||||
|
printf("%i\r",i);
|
||||||
|
jm=i+group; if(jm>bail) jm=bail;
|
||||||
|
for(j=i;j<jm;j++)
|
||||||
|
{
|
||||||
|
P("_@seek%i:",j);
|
||||||
|
P("add si,ds:theloop_xsina");
|
||||||
|
P("xor dh,dh");
|
||||||
|
P("mov dl,fs:[si]");
|
||||||
|
P("add di,ds:theloop_ysina");
|
||||||
|
P("add dl,gs:[di]");
|
||||||
|
P("add dx,ds:theloop_heigth");
|
||||||
|
P("cmp ax,dx");
|
||||||
|
P("jl short _@hit%i",j);
|
||||||
|
P("_@seekr%i:",j);
|
||||||
|
P("add eax,ecx");
|
||||||
|
P("adc ax,-1");
|
||||||
|
}
|
||||||
|
if(jm>=bail)
|
||||||
|
{
|
||||||
|
P("_@seek%i:",bail);
|
||||||
|
P("_@seekr%i:",bail);
|
||||||
|
P("ret");
|
||||||
|
}
|
||||||
|
else P("jmp _@seek%i",jm);
|
||||||
|
for(j=i;j<jm;j++)
|
||||||
|
{
|
||||||
|
l=j*10L*256;
|
||||||
|
l=weirdflip(l);
|
||||||
|
P("_@hit%i:",j);
|
||||||
|
P("add eax,0%08lXh",l*depth);
|
||||||
|
P("adc ax,0");
|
||||||
|
P("mov es:[bx],dl");
|
||||||
|
P("add bp,4");
|
||||||
|
P("sub bx,320");
|
||||||
|
P("cmp ax,dx");
|
||||||
|
P("jle short _@hit%i",j);
|
||||||
|
P("mov ecx,ds:[bp]");
|
||||||
|
P("jmp short _@seekr%i",j+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
P("theloop ENDP");
|
||||||
|
printf(" \r",i);
|
||||||
|
|
||||||
|
fclose(f1);
|
||||||
|
}
|
||||||
165
COMAN/DOLOOP.C
Normal file
165
COMAN/DOLOOP.C
Normal file
|
|
@ -0,0 +1,165 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int horizony=70;
|
||||||
|
int bailstart=0; // must be divisible by 2
|
||||||
|
int bail=192;
|
||||||
|
int bailhalve=64;
|
||||||
|
int group=500;
|
||||||
|
int zwave[1024];
|
||||||
|
|
||||||
|
FILE *f1;
|
||||||
|
|
||||||
|
void P(char *str,...)
|
||||||
|
{
|
||||||
|
char out[256];
|
||||||
|
va_list argp;
|
||||||
|
va_start(argp,str);
|
||||||
|
vsprintf(out,str,argp);
|
||||||
|
fprintf(f1,"%s\n",out);
|
||||||
|
va_end(argp);
|
||||||
|
}
|
||||||
|
|
||||||
|
long wflip(unsigned long l)
|
||||||
|
{
|
||||||
|
long m,lo,hi;
|
||||||
|
lo=l&0xffff;
|
||||||
|
hi=l>>16;
|
||||||
|
m=(lo<<16)+hi;
|
||||||
|
return(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
int i,j,jm,y,a;
|
||||||
|
int sina=1;
|
||||||
|
long l,firstraydir;
|
||||||
|
f1=fopen("theloop.inc","wt");
|
||||||
|
|
||||||
|
for(i=0;i<bail;i++)
|
||||||
|
{
|
||||||
|
zwave[i]=16.0*sin((double)i*3.1415926535*2.0*3.0/(double)bail);
|
||||||
|
}
|
||||||
|
|
||||||
|
P(";Register usage: ");
|
||||||
|
P(";eax low... ray heigth ");
|
||||||
|
P(";ebx - scenary heigth ");
|
||||||
|
P(";ecx low... ray direction (always negative)");
|
||||||
|
P(";edx - tmp ");
|
||||||
|
P(";esi - xsin ");
|
||||||
|
P(";edi - ysin ");
|
||||||
|
P(";ebp - p->screen ");
|
||||||
|
P(";ds ->codesegment");
|
||||||
|
P(";es ->screenbuffer");
|
||||||
|
P(";fs ->wavetablex");
|
||||||
|
P(";gs ->wavetabley");
|
||||||
|
P("");
|
||||||
|
P("ALIGN 16 ;following should stay in cache");
|
||||||
|
P("theloop_waveseg dw 0");
|
||||||
|
P("theloop_xsina1 dw 0");
|
||||||
|
P("theloop_ysina1 dw 0");
|
||||||
|
P("theloop_xsina2 dw 0");
|
||||||
|
P("theloop_ysina2 dw 0");
|
||||||
|
P("theloop_heigth dw 0");
|
||||||
|
firstraydir=-(200-horizony)*2560L;
|
||||||
|
P("");
|
||||||
|
P(";entry: es=videbuf");
|
||||||
|
P("; bp=pointer to bottom of current column in videbuf");
|
||||||
|
P("; fs=waveXsegment");
|
||||||
|
P("; gs=waveYsegment");
|
||||||
|
P("; si=waveXpos");
|
||||||
|
P("; di=waveYpos");
|
||||||
|
P("; cx=waveXadd");
|
||||||
|
P("; dx=waveYadd");
|
||||||
|
P("; ax=camera heigth adder");
|
||||||
|
P("theloop PROC FAR");
|
||||||
|
P("mov cs:theloop_xsina1,cx");
|
||||||
|
P("mov cs:theloop_ysina1,dx");
|
||||||
|
P("add cx,cx");
|
||||||
|
P("mov cs:theloop_xsina2,cx");
|
||||||
|
P("add dx,dx");
|
||||||
|
P("mov cs:theloop_ysina2,dx");
|
||||||
|
P("mov cs:theloop_heigth,ax");
|
||||||
|
P("mov ax,cs");
|
||||||
|
P("mov ds,ax");
|
||||||
|
P("xor eax,eax");
|
||||||
|
P("mov ecx,0%08lXh",wflip(firstraydir));
|
||||||
|
for(i=bailstart;i<bail;i+=group)
|
||||||
|
{
|
||||||
|
jm=i+group; if(jm>bail) jm=bail;
|
||||||
|
for(j=i;j<jm;j++)
|
||||||
|
{
|
||||||
|
printf("%i\r",j);
|
||||||
|
|
||||||
|
if(j==bailhalve)
|
||||||
|
{
|
||||||
|
sina=2;
|
||||||
|
}
|
||||||
|
|
||||||
|
P("_@seek%i:",j);
|
||||||
|
P("add si,ds:theloop_xsina%i",sina);
|
||||||
|
P("mov bx,fs:[si]");
|
||||||
|
P("add di,ds:theloop_ysina%i",sina);
|
||||||
|
P("add bx,gs:[di]");
|
||||||
|
P("add bx,%i",zwave[j]-240);
|
||||||
|
P("cmp ax,bx");
|
||||||
|
P("jge short _@seeko%i",j);
|
||||||
|
|
||||||
|
P("lea dx,[bx+%i]",120-j/8);
|
||||||
|
P("shr dl,1");
|
||||||
|
P("_@hit%i:",j);
|
||||||
|
l=(long)(j)*2560L;
|
||||||
|
l=wflip(l);
|
||||||
|
/**/
|
||||||
|
P("add eax,0%08lXh",l);
|
||||||
|
P("adc ax,0");
|
||||||
|
P("mov es:[bp],dl");
|
||||||
|
P("cmp ax,bx");
|
||||||
|
P("jge short _@seek1a%i",j);
|
||||||
|
P("add eax,0%08lXh",l);
|
||||||
|
P("adc ax,0");
|
||||||
|
P("mov es:[bp-160],dl");
|
||||||
|
P("cmp ax,bx");
|
||||||
|
P("jge short _@seek2a%i",j);
|
||||||
|
P("add eax,0%08lXh",l);
|
||||||
|
P("adc ax,0");
|
||||||
|
P("mov es:[bp-320],dl");
|
||||||
|
/**/
|
||||||
|
P("add ecx,0%08lXh",wflip(3L*2560L));
|
||||||
|
P("adc cx,0");
|
||||||
|
P("sub bp,160*3");
|
||||||
|
/**/
|
||||||
|
P("cmp ax,bx");
|
||||||
|
P("jge short _@seeko%i",j);
|
||||||
|
P("jmp _@hit%i",j);
|
||||||
|
|
||||||
|
P("_@seek2a%i:",j);
|
||||||
|
P("sub bp,160");
|
||||||
|
P("add ecx,0%08lXh",wflip(2560L));
|
||||||
|
P("_@seek1a%i:",j); // carry=0 when jmp here!
|
||||||
|
P("adc ecx,0%08lXh",wflip(2560L));
|
||||||
|
P("adc cx,0");
|
||||||
|
P("sub bp,160");
|
||||||
|
|
||||||
|
P("_@seeko%i:",j);
|
||||||
|
P("add eax,ecx");
|
||||||
|
if(sina==2) P("adc eax,ecx");
|
||||||
|
P("adc ax,-1");
|
||||||
|
|
||||||
|
if(sina==2) j++;
|
||||||
|
}
|
||||||
|
if(jm>=bail)
|
||||||
|
{
|
||||||
|
P("_@seek%i:",bail);
|
||||||
|
P("_@seekr%i:",bail);
|
||||||
|
P("ret");
|
||||||
|
}
|
||||||
|
else P("jmp _@seek%i",jm);
|
||||||
|
}
|
||||||
|
P("theloop ENDP");
|
||||||
|
printf(" \r",i);
|
||||||
|
|
||||||
|
fclose(f1);
|
||||||
|
}
|
||||||
BIN
COMAN/DOLOOP.EXE
Normal file
BIN
COMAN/DOLOOP.EXE
Normal file
Binary file not shown.
BIN
COMAN/DOLOOP.OBJ
Normal file
BIN
COMAN/DOLOOP.OBJ
Normal file
Binary file not shown.
155
COMAN/DOLOOP.OK
Normal file
155
COMAN/DOLOOP.OK
Normal file
|
|
@ -0,0 +1,155 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int depth=2;
|
||||||
|
int bail=150;
|
||||||
|
int group=150;
|
||||||
|
|
||||||
|
FILE *f1;
|
||||||
|
|
||||||
|
void P(char *str,...)
|
||||||
|
{
|
||||||
|
char out[256];
|
||||||
|
va_list argp;
|
||||||
|
va_start(argp,str);
|
||||||
|
vsprintf(out,str,argp);
|
||||||
|
fprintf(f1,"%s\n",out);
|
||||||
|
va_end(argp);
|
||||||
|
}
|
||||||
|
|
||||||
|
long weirdflip(unsigned long l)
|
||||||
|
{
|
||||||
|
long m,lo,hi;
|
||||||
|
lo=l&0xffff;
|
||||||
|
hi=l>>16;
|
||||||
|
m=(lo<<16)+hi;
|
||||||
|
return(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
int i,j,jm,y,a;
|
||||||
|
long l;
|
||||||
|
f1=fopen("theloop.inc","wt");
|
||||||
|
|
||||||
|
P(";Register usage: ");
|
||||||
|
P(";eax low... ray heigth ");
|
||||||
|
P(";ebx - p->screen ");
|
||||||
|
P(";ecx low... ray direction (always negative)");
|
||||||
|
P(";edx - scenary heigth ");
|
||||||
|
P(";esi - xsin ");
|
||||||
|
P(";edi - ysin ");
|
||||||
|
P(";ebp - p->ray_dir_table");
|
||||||
|
P(";ds ->codesegment");
|
||||||
|
P(";es ->screenbuffer");
|
||||||
|
P(";fs ->wavetable");
|
||||||
|
P(";gs -");
|
||||||
|
P("");
|
||||||
|
P("ALIGN 16 ;following should stay in cache");
|
||||||
|
P("theloop_waveseg dw 0");
|
||||||
|
P("theloop_xsina dw 0");
|
||||||
|
P("theloop_ysina dw 0");
|
||||||
|
P("theloop_heigth dw 0");
|
||||||
|
P("theloop_raydir LABEL DWORD");
|
||||||
|
for(y=0;y<200;y++)
|
||||||
|
{
|
||||||
|
a=(199-y)-100;
|
||||||
|
l=-(long)a*10L*256L*depth;
|
||||||
|
l=weirdflip(l);
|
||||||
|
P("dd 0%08lXh",l);
|
||||||
|
}
|
||||||
|
P("");
|
||||||
|
P(";entry: es=videbuf");
|
||||||
|
P("; bp=pointer to bottom of current column in videbuf");
|
||||||
|
P("; fs=waveXsegment");
|
||||||
|
P("; gs=waveYsegment");
|
||||||
|
P("; si=waveXpos");
|
||||||
|
P("; di=waveYpos");
|
||||||
|
P("; cx=waveXadd");
|
||||||
|
P("; dx=waveYadd");
|
||||||
|
P("; ax=camera heigth adder");
|
||||||
|
P("theloop PROC FAR");
|
||||||
|
P("mov bx,bp");
|
||||||
|
P("mov cs:theloop_xsina,cx");
|
||||||
|
P("mov cs:theloop_ysina,dx");
|
||||||
|
P("mov cs:theloop_heigth,ax");
|
||||||
|
P("mov bp,OFFSET theloop_raydir");
|
||||||
|
P("mov ax,cs");
|
||||||
|
P("mov ds,ax");
|
||||||
|
P("xor eax,eax");
|
||||||
|
P("mov ecx,ds:[bp]");
|
||||||
|
P("add bp,4");
|
||||||
|
for(i=0;i<bail;i+=group)
|
||||||
|
{
|
||||||
|
jm=i+group; if(jm>bail) jm=bail;
|
||||||
|
for(j=i;j<jm;j++)
|
||||||
|
{
|
||||||
|
printf("%i\r",j);
|
||||||
|
|
||||||
|
P("_@seek%i:",j);
|
||||||
|
P("add si,ds:theloop_xsina");
|
||||||
|
P("xor dh,dh");
|
||||||
|
P("mov dl,fs:[si]");
|
||||||
|
P("add di,ds:theloop_ysina");
|
||||||
|
P("add dl,gs:[di]");
|
||||||
|
P("add dx,ds:theloop_heigth");
|
||||||
|
P("cmp ax,dx");
|
||||||
|
P("jge short _@seeko%i",j);
|
||||||
|
|
||||||
|
l=j*10L*256*depth;
|
||||||
|
l=weirdflip(l);
|
||||||
|
P("_@hit%i:",j);
|
||||||
|
P("add eax,0%08lXh",l);
|
||||||
|
P("adc ax,0");
|
||||||
|
P("mov es:[bx],dl");
|
||||||
|
P("cmp ax,dx");
|
||||||
|
P("jge short _@seek1a%i",j);
|
||||||
|
P("add eax,0%08lXh",l);
|
||||||
|
P("adc ax,0");
|
||||||
|
P("mov es:[bx-320],dl");
|
||||||
|
P("cmp ax,dx");
|
||||||
|
P("jge short _@seek2a%i",j);
|
||||||
|
P("add eax,0%08lXh",l);
|
||||||
|
P("adc ax,0");
|
||||||
|
P("mov es:[bx-640],dl");
|
||||||
|
P("cmp ax,dx");
|
||||||
|
P("jge short _@seek3a%i",j);
|
||||||
|
P("add eax,0%08lXh",l);
|
||||||
|
P("adc ax,0");
|
||||||
|
P("mov es:[bx-960],dl");
|
||||||
|
P("add bp,4*4");
|
||||||
|
P("sub bx,320*4");
|
||||||
|
P("cmp ax,dx");
|
||||||
|
P("jge short _@seek0a%i",j);
|
||||||
|
P("jmp _@hit%i",j);
|
||||||
|
|
||||||
|
P("_@seek3a%i:",j);
|
||||||
|
P("add bp,4");
|
||||||
|
P("sub bx,320");
|
||||||
|
P("_@seek2a%i:",j);
|
||||||
|
P("add bp,4");
|
||||||
|
P("sub bx,320");
|
||||||
|
P("_@seek1a%i:",j);
|
||||||
|
P("add bp,4");
|
||||||
|
P("sub bx,320");
|
||||||
|
P("_@seek0a%i:",j);
|
||||||
|
P("mov ecx,ds:[bp]");
|
||||||
|
|
||||||
|
P("_@seeko%i:",j);
|
||||||
|
P("add eax,ecx");
|
||||||
|
P("adc ax,-1");
|
||||||
|
}
|
||||||
|
if(jm>=bail)
|
||||||
|
{
|
||||||
|
P("_@seek%i:",bail);
|
||||||
|
P("_@seekr%i:",bail);
|
||||||
|
P("ret");
|
||||||
|
}
|
||||||
|
else P("jmp _@seek%i",jm);
|
||||||
|
}
|
||||||
|
P("theloop ENDP");
|
||||||
|
printf(" \r",i);
|
||||||
|
|
||||||
|
fclose(f1);
|
||||||
|
}
|
||||||
185
COMAN/DOLOOP1.C
Normal file
185
COMAN/DOLOOP1.C
Normal file
|
|
@ -0,0 +1,185 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int horizony=70;
|
||||||
|
int bailstart=0; // must be divisible by 2
|
||||||
|
int bail=192;
|
||||||
|
int bailhalve=64;
|
||||||
|
int group=150;
|
||||||
|
int zwave[1024];
|
||||||
|
|
||||||
|
FILE *f1;
|
||||||
|
|
||||||
|
void P(char *str,...)
|
||||||
|
{
|
||||||
|
char out[256];
|
||||||
|
va_list argp;
|
||||||
|
va_start(argp,str);
|
||||||
|
vsprintf(out,str,argp);
|
||||||
|
fprintf(f1,"%s\n",out);
|
||||||
|
va_end(argp);
|
||||||
|
}
|
||||||
|
|
||||||
|
long wflip(unsigned long l)
|
||||||
|
{
|
||||||
|
long m,lo,hi;
|
||||||
|
lo=l&0xffff;
|
||||||
|
hi=l>>16;
|
||||||
|
m=(lo<<16)+hi;
|
||||||
|
return(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
int i,j,jm,y,a;
|
||||||
|
int sina=1;
|
||||||
|
long l,firstraydir;
|
||||||
|
f1=fopen("theloop.inc","wt");
|
||||||
|
|
||||||
|
for(i=0;i<bail;i++)
|
||||||
|
{
|
||||||
|
zwave[i]=16.0*sin((double)i*3.1415926535*2.0*3.0/(double)bail);
|
||||||
|
}
|
||||||
|
|
||||||
|
P(";Register usage: ");
|
||||||
|
P(";eax low... ray heigth ");
|
||||||
|
P(";ebx - p->screen ");
|
||||||
|
P(";ecx low... ray direction (always negative)");
|
||||||
|
P(";edx - scenary heigth ");
|
||||||
|
P(";esi - xsin ");
|
||||||
|
P(";edi - ysin ");
|
||||||
|
P(";ebp - - ");
|
||||||
|
P(";ds ->codesegment");
|
||||||
|
P(";es ->screenbuffer");
|
||||||
|
P(";fs ->wavetablex");
|
||||||
|
P(";gs ->wavetabley");
|
||||||
|
P("");
|
||||||
|
P("ALIGN 16 ;following should stay in cache");
|
||||||
|
P("theloop_waveseg dw 0");
|
||||||
|
P("theloop_xsina1 dw 0");
|
||||||
|
P("theloop_ysina1 dw 0");
|
||||||
|
P("theloop_xsina2 dw 0");
|
||||||
|
P("theloop_ysina2 dw 0");
|
||||||
|
P("theloop_heigth dw 0");
|
||||||
|
firstraydir=-(200-horizony)*2560L;
|
||||||
|
P("");
|
||||||
|
P(";entry: es=videbuf");
|
||||||
|
P("; bp=pointer to bottom of current column in videbuf");
|
||||||
|
P("; fs=waveXsegment");
|
||||||
|
P("; gs=waveYsegment");
|
||||||
|
P("; si=waveXpos");
|
||||||
|
P("; di=waveYpos");
|
||||||
|
P("; cx=waveXadd");
|
||||||
|
P("; dx=waveYadd");
|
||||||
|
P("; ax=camera heigth adder");
|
||||||
|
P("theloop PROC FAR");
|
||||||
|
P("mov bx,bp");
|
||||||
|
P("mov cs:theloop_xsina1,cx");
|
||||||
|
P("mov cs:theloop_ysina1,dx");
|
||||||
|
P("add cx,cx");
|
||||||
|
P("mov cs:theloop_xsina2,cx");
|
||||||
|
P("add dx,dx");
|
||||||
|
P("mov cs:theloop_ysina2,dx");
|
||||||
|
P("mov cs:theloop_heigth,ax");
|
||||||
|
//P("mov bp,OFFSET theloop_raydir");
|
||||||
|
P("mov ax,cs");
|
||||||
|
P("mov ds,ax");
|
||||||
|
P("xor eax,eax");
|
||||||
|
P("mov ecx,0%08lXh",wflip(firstraydir));
|
||||||
|
for(i=0;i<bailstart/2;i++)
|
||||||
|
{
|
||||||
|
P("add si,cx");
|
||||||
|
P("add si,dx");
|
||||||
|
P("add eax,0%08lXh",wflip(firstraydir*2L));
|
||||||
|
P("adc ax,-1");
|
||||||
|
}
|
||||||
|
for(i=bailstart;i<bail;i+=group)
|
||||||
|
{
|
||||||
|
jm=i+group; if(jm>bail) jm=bail;
|
||||||
|
for(j=i;j<jm;j++)
|
||||||
|
{
|
||||||
|
printf("%i\r",j);
|
||||||
|
|
||||||
|
/*
|
||||||
|
if(j==bailhalve)
|
||||||
|
{
|
||||||
|
P("add ecx,ecx");
|
||||||
|
sina=2;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
P("_@seek%i:",j);
|
||||||
|
P("add si,ds:theloop_xsina%i",sina);
|
||||||
|
P("mov dl,fs:[si]");
|
||||||
|
P("xor dh,dh");
|
||||||
|
P("add di,ds:theloop_ysina%i",sina);
|
||||||
|
P("add dl,gs:[di]");
|
||||||
|
P("add dx,%i",zwave[j]+30-j/4+(-260));
|
||||||
|
//P("add dx,ds:theloop_heigth");
|
||||||
|
P("cmp ax,dx");
|
||||||
|
P("jge short _@seeko%i",j);
|
||||||
|
|
||||||
|
l=(long)j*2560L;
|
||||||
|
l=wflip(l);
|
||||||
|
P("_@hit%i:",j);
|
||||||
|
if(l)
|
||||||
|
{
|
||||||
|
P("add eax,0%08lXh",l);
|
||||||
|
P("adc ax,0");
|
||||||
|
}
|
||||||
|
P("mov es:[bx],dl");
|
||||||
|
P("cmp ax,dx");
|
||||||
|
P("jge short _@seek1a%i",j);
|
||||||
|
if(l)
|
||||||
|
{
|
||||||
|
P("add eax,0%08lXh",l);
|
||||||
|
P("adc ax,0");
|
||||||
|
}
|
||||||
|
P("mov es:[bx-160],dl");
|
||||||
|
P("cmp ax,dx");
|
||||||
|
P("jge short _@seek2a%i",j);
|
||||||
|
if(l)
|
||||||
|
{
|
||||||
|
P("add eax,0%08lXh",l);
|
||||||
|
P("adc ax,0");
|
||||||
|
}
|
||||||
|
P("mov es:[bx-320],dl");
|
||||||
|
/**/
|
||||||
|
P("add ecx,0%08lXh",wflip((long)sina*3L*2560L));
|
||||||
|
P("adc cx,0");
|
||||||
|
P("sub bx,160*3");
|
||||||
|
/**/
|
||||||
|
P("cmp ax,dx");
|
||||||
|
P("jge short _@seeko%i",j);
|
||||||
|
P("jmp _@hit%i",j);
|
||||||
|
|
||||||
|
P("_@seek2a%i:",j);
|
||||||
|
P("add ecx,0%08lXh",wflip((long)sina*2560L));
|
||||||
|
P("adc cx,0");
|
||||||
|
P("sub bx,160");
|
||||||
|
P("_@seek1a%i:",j);
|
||||||
|
P("add ecx,0%08lXh",wflip((long)sina*2560L));
|
||||||
|
P("adc cx,0");
|
||||||
|
P("sub bx,160");
|
||||||
|
|
||||||
|
P("_@seeko%i:",j);
|
||||||
|
P("add eax,ecx");
|
||||||
|
P("adc ax,-1");
|
||||||
|
|
||||||
|
if(sina==2) j++;
|
||||||
|
}
|
||||||
|
if(jm>=bail)
|
||||||
|
{
|
||||||
|
P("_@seek%i:",bail);
|
||||||
|
P("_@seekr%i:",bail);
|
||||||
|
P("ret");
|
||||||
|
}
|
||||||
|
else P("jmp _@seek%i",jm);
|
||||||
|
}
|
||||||
|
P("theloop ENDP");
|
||||||
|
printf(" \r",i);
|
||||||
|
|
||||||
|
fclose(f1);
|
||||||
|
}
|
||||||
131
COMAN/DOLOOP2.C
Normal file
131
COMAN/DOLOOP2.C
Normal file
|
|
@ -0,0 +1,131 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int horizony=70;
|
||||||
|
int bail=192;
|
||||||
|
int bailhalve=64;
|
||||||
|
int group=150;
|
||||||
|
int zwave[1024];
|
||||||
|
|
||||||
|
FILE *f1;
|
||||||
|
|
||||||
|
void P(char *str,...)
|
||||||
|
{
|
||||||
|
char out[256];
|
||||||
|
va_list argp;
|
||||||
|
va_start(argp,str);
|
||||||
|
vsprintf(out,str,argp);
|
||||||
|
fprintf(f1,"%s\n",out);
|
||||||
|
va_end(argp);
|
||||||
|
}
|
||||||
|
|
||||||
|
long wflip(unsigned long l)
|
||||||
|
{
|
||||||
|
long m,lo,hi;
|
||||||
|
lo=l&0xffff;
|
||||||
|
hi=l>>16;
|
||||||
|
m=(lo<<16)+hi;
|
||||||
|
return(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
int i,j,k,jm,y,a;
|
||||||
|
int sina=1;
|
||||||
|
long l,firstraydir;
|
||||||
|
f1=fopen("theloop.inc","wt");
|
||||||
|
|
||||||
|
for(i=0;i<bail;i++)
|
||||||
|
{
|
||||||
|
zwave[i]=(int)(16.0*sin((double)i*3.1415926535*2.0*3.0/(double)bail));
|
||||||
|
}
|
||||||
|
|
||||||
|
P(";Register usage: ");
|
||||||
|
P(";eax low... ray heigth ");
|
||||||
|
P(";ebx - ! ");
|
||||||
|
P(";ecx low... ray direction (always negative)");
|
||||||
|
P(";edx bail scenary heigth ");
|
||||||
|
P(";esi - xsin ");
|
||||||
|
P(";edi - ysin ");
|
||||||
|
P(";ebp - p->screen ");
|
||||||
|
P(";ds ->codesegment");
|
||||||
|
P(";es ->screenbuffer");
|
||||||
|
P(";fs ->wavetablex");
|
||||||
|
P(";gs ->wavetabley");
|
||||||
|
P("");
|
||||||
|
P("ALIGN 16 ;following should stay in cache");
|
||||||
|
P("theloop_waveseg dw 0");
|
||||||
|
P("theloop_xsina1 dw 0");
|
||||||
|
P("theloop_ysina1 dw 0");
|
||||||
|
P("theloop_xsina2 dw 0");
|
||||||
|
P("theloop_ysina2 dw 0");
|
||||||
|
P("theloop_heigth dw 0");
|
||||||
|
firstraydir=-(200-horizony)*2560L;
|
||||||
|
P("");
|
||||||
|
P(";entry: es=videbuf");
|
||||||
|
P("; bp=pointer to bottom of current column in videbuf");
|
||||||
|
P("; fs=waveXsegment");
|
||||||
|
P("; gs=waveYsegment");
|
||||||
|
P("; si=waveXpos");
|
||||||
|
P("; di=waveYpos");
|
||||||
|
P("; cx=waveXadd");
|
||||||
|
P("; dx=waveYadd");
|
||||||
|
P("; ax=camera heigth adder");
|
||||||
|
P("theloop PROC FAR");
|
||||||
|
P("mov cs:theloop_xsina1,cx");
|
||||||
|
P("mov cs:theloop_ysina1,dx");
|
||||||
|
P("add cx,cx");
|
||||||
|
P("mov cs:theloop_xsina2,cx");
|
||||||
|
P("add dx,dx");
|
||||||
|
P("mov cs:theloop_ysina2,dx");
|
||||||
|
P("mov cs:theloop_heigth,ax");
|
||||||
|
P("mov bx,cs:theloop_xsina1");
|
||||||
|
//P("mov bp,OFFSET theloop_raydir");
|
||||||
|
P("mov ax,cs");
|
||||||
|
P("mov ds,ax");
|
||||||
|
P("mov edx,10000h*(%i/3)",-bail);
|
||||||
|
P("xor eax,eax");
|
||||||
|
P("xor ecx,ecx");
|
||||||
|
for(i=199;i>=horizony;i--)
|
||||||
|
{
|
||||||
|
j=i;
|
||||||
|
printf("%i \r",j);
|
||||||
|
|
||||||
|
// seek until scene hits row i
|
||||||
|
P("_@seek%i:",j);
|
||||||
|
for(k=0;k<3;k++)
|
||||||
|
{
|
||||||
|
P("add si,ds:theloop_xsina1");
|
||||||
|
P("mov dx,fs:[si]");
|
||||||
|
P("add di,ds:theloop_ysina1");
|
||||||
|
P("add dx,gs:[di]");
|
||||||
|
P("add dx,%i",-100);
|
||||||
|
l=(i-horizony)*2560L;
|
||||||
|
P("add ecx,0%08lXh",wflip(2560L));
|
||||||
|
P("adc cx,0");
|
||||||
|
P("sub eax,0%08lXh",wflip(l));
|
||||||
|
P("sbb ax,0");
|
||||||
|
P("cmp ax,dx");
|
||||||
|
P("jl short _@seek%im",j);
|
||||||
|
}
|
||||||
|
P("add edx,00010000h");
|
||||||
|
P("jnc _@seek%i",j);
|
||||||
|
P("ret");
|
||||||
|
|
||||||
|
// hit, draw pixel & advance rays
|
||||||
|
P("_@seek%im:",j);
|
||||||
|
P("mov es:[bp+%i],dl",-(199-j)*160);
|
||||||
|
P("add eax,ecx");
|
||||||
|
P("adc ax,0");
|
||||||
|
P("cmp ax,dx");
|
||||||
|
P("jl short _@seek%im",j-1);
|
||||||
|
}
|
||||||
|
P("_@seek%im:",j-1);
|
||||||
|
P("ret");
|
||||||
|
P("theloop ENDP");
|
||||||
|
printf(" \r",i);
|
||||||
|
|
||||||
|
fclose(f1);
|
||||||
|
}
|
||||||
12
COMAN/DOOBJS.BAT
Normal file
12
COMAN/DOOBJS.BAT
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
getslice w1dta.bin 0 32768 w1dta1.bin
|
||||||
|
getslice w1dta.bin 32768 32768 w1dta2.bin
|
||||||
|
doobj w1dta1.bin _w1dta _w1dta1.obj
|
||||||
|
doobj w1dta2.bin _w1dta_ _w1dta2.obj
|
||||||
|
del w1dta1.bin
|
||||||
|
del w1dta2.bin
|
||||||
|
getslice w2dta.bin 0 32768 w2dta1.bin
|
||||||
|
getslice w2dta.bin 32768 32768 w2dta2.bin
|
||||||
|
doobj w2dta1.bin _w2dta _w2dta1.obj
|
||||||
|
doobj w2dta2.bin _w2dta_ _w2dta2.obj
|
||||||
|
del w2dta1.bin
|
||||||
|
del w2dta2.bin
|
||||||
2
COMAN/DOPIC.BAT
Normal file
2
COMAN/DOPIC.BAT
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
lbm2u combg.lbm combg.uh
|
||||||
|
doobj combg.uh _combg _combg.obk
|
||||||
1
COMAN/DP.BAT
Normal file
1
COMAN/DP.BAT
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
c:\others\dp\del_pain
|
||||||
BIN
COMAN/DP_PREFS
Normal file
BIN
COMAN/DP_PREFS
Normal file
Binary file not shown.
38
COMAN/KOE.C
Normal file
38
COMAN/KOE.C
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
int table[1024];
|
||||||
|
|
||||||
|
char *vram=(char *)0xa0000000L;
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
int x,y;
|
||||||
|
double f,g;
|
||||||
|
_asm mov ax,13h
|
||||||
|
_asm int 10h
|
||||||
|
for(x=0;x<1024;x++)
|
||||||
|
{
|
||||||
|
f=(double)x*3.1415926535*3.0/1024.0;
|
||||||
|
f=sin(f);
|
||||||
|
g=(double)x/700;
|
||||||
|
if(g>1) g=2-g;
|
||||||
|
f=f*g*g;
|
||||||
|
y=(int)(f*400.0);
|
||||||
|
table[x]=y;
|
||||||
|
vram[x/4+(y/4+100)*320]=9;
|
||||||
|
}
|
||||||
|
getch();
|
||||||
|
_asm mov ax,3h
|
||||||
|
_asm int 10h
|
||||||
|
for(x=0;x<1024;x++)
|
||||||
|
{
|
||||||
|
if(!x) printf("{%i",table[x]);
|
||||||
|
else printf(",%i",table[x]);
|
||||||
|
if(!(x&15))
|
||||||
|
{
|
||||||
|
printf(" \\\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
printf("};\n");
|
||||||
|
}
|
||||||
228
COMAN/MAIN.C
Normal file
228
COMAN/MAIN.C
Normal file
|
|
@ -0,0 +1,228 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
#include "..\dis\dis.h"
|
||||||
|
|
||||||
|
#define noCALCW12
|
||||||
|
|
||||||
|
char combg[16];
|
||||||
|
|
||||||
|
#ifndef CALCW12
|
||||||
|
extern int w1dta[];
|
||||||
|
extern int w2dta[];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern char combg[];
|
||||||
|
extern char combguse[];
|
||||||
|
|
||||||
|
int flip;
|
||||||
|
|
||||||
|
int wavesin[]=
|
||||||
|
#include "wave.h"
|
||||||
|
|
||||||
|
extern int *wave1;
|
||||||
|
extern int *wave2;
|
||||||
|
extern unsigned char *vbuf;
|
||||||
|
extern int cameralevel;
|
||||||
|
|
||||||
|
char far *vram=(char far *)0xa0000000L;
|
||||||
|
char far *vram2=(char far *)0xa8000000L;
|
||||||
|
|
||||||
|
extern int sin1024[];
|
||||||
|
|
||||||
|
char palette[768];
|
||||||
|
|
||||||
|
char *shiftstatus=(char *)0x0417;
|
||||||
|
int waitb()
|
||||||
|
{
|
||||||
|
//if(*shiftstatus&16) setborder(0);
|
||||||
|
while(!(inp(0x3da)&8));
|
||||||
|
while((inp(0x3da)&8));
|
||||||
|
//if(*shiftstatus&16) setborder(127);
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void doit(void)
|
||||||
|
{
|
||||||
|
unsigned int u,v,uc;
|
||||||
|
int startrise=160,frepeat=1;
|
||||||
|
int a,b,x,y,xa,ya,j,xw,yw,d,r;
|
||||||
|
int rot2=0,rot=0,rsin,rcos,xwav=0,ywav=0,zwav=0;
|
||||||
|
int rsin2,rcos2;
|
||||||
|
int frame=0;
|
||||||
|
rot=0; rot2=0;
|
||||||
|
cameralevel=-270;
|
||||||
|
dis_waitb();
|
||||||
|
while(!dis_exit() && dis_musplus()<0);
|
||||||
|
while(!dis_exit() && frame<4444)
|
||||||
|
{
|
||||||
|
a=dis_musplus();
|
||||||
|
if(a>-8 && a<0) break;
|
||||||
|
while(frepeat--)
|
||||||
|
{
|
||||||
|
if(a>-30 && a<0)
|
||||||
|
{
|
||||||
|
if(startrise<160) startrise+=1;
|
||||||
|
}
|
||||||
|
if(frame<400 && startrise>0)
|
||||||
|
{
|
||||||
|
if(frame==4)
|
||||||
|
{
|
||||||
|
dis_waitb();
|
||||||
|
setpalarea(palette,0,256);
|
||||||
|
}
|
||||||
|
if(startrise>0) startrise-=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rot2+=4;
|
||||||
|
rot+=(sin1024[rot2&1023])/15;
|
||||||
|
r=rot>>3;
|
||||||
|
rsin=sin1024[r&1023];
|
||||||
|
rcos=sin1024[(r+256)&1023];
|
||||||
|
rsin2=sin1024[(r+177)&1023];
|
||||||
|
rcos2=sin1024[(r+177+256)&1023];
|
||||||
|
xw=xwav; yw=ywav;
|
||||||
|
for(a=0;a<160;a++)
|
||||||
|
{
|
||||||
|
x=(a-80);
|
||||||
|
y=160;
|
||||||
|
xa=(int)(((long)x*(long)rcos+(long)y*(long)rsin)/256L);
|
||||||
|
ya=(int)(((long)y*(long)rcos2-(long)x*(long)rsin2)/256L);
|
||||||
|
b=(a&1)*80+(a>>1)+199*160;
|
||||||
|
docol(xw,yw,xa,ya,b);
|
||||||
|
if(a==80)
|
||||||
|
{
|
||||||
|
xwav+=xa*4;
|
||||||
|
ywav+=ya*4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
flip++; if(flip>1) flip=0;
|
||||||
|
switch(flip)
|
||||||
|
{
|
||||||
|
case 0 :
|
||||||
|
outp(0x3d4,0x0c);
|
||||||
|
outp(0x3d5,0x80);
|
||||||
|
frame+=(frepeat=dis_waitb());
|
||||||
|
docopy(0xa000+5*startrise);
|
||||||
|
break;
|
||||||
|
case 1 :
|
||||||
|
outp(0x3d4,0x0c);
|
||||||
|
outp(0x3d5,0x00);
|
||||||
|
frame+=(frepeat=dis_waitb());
|
||||||
|
docopy(0xa800+5*startrise);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
unsigned int u,v,uc;
|
||||||
|
int a,b,x,y,xa,ya,j,k,xw,yw;
|
||||||
|
int rot=0,rsin,rcos,xwav=0,ywav=0;
|
||||||
|
dis_partstart();
|
||||||
|
_asm mov ax,13h
|
||||||
|
_asm int 10h
|
||||||
|
|
||||||
|
for(a=0;a<256;a++)
|
||||||
|
{
|
||||||
|
uc=(223-a*22/26)*3;
|
||||||
|
b=(230-a)/4;
|
||||||
|
b+=sin1024[a*4&1023]/32;
|
||||||
|
if(b<0) b=0;
|
||||||
|
if(b>63) b=63;
|
||||||
|
palette[uc+1]=b;
|
||||||
|
b=(255-a)/3;
|
||||||
|
if(b>63) b=63;
|
||||||
|
palette[uc+2]=b;
|
||||||
|
b=a-220; if(b<0) b=-b;
|
||||||
|
if(b>40) b=40;
|
||||||
|
b=40-b;
|
||||||
|
palette[uc+0]=b/3;
|
||||||
|
//if(!dis_indemo()) vram[a+640]=a;
|
||||||
|
}
|
||||||
|
for(a=0;a<768-16*3;a++)
|
||||||
|
{
|
||||||
|
b=palette[a];
|
||||||
|
b=b*9/6; if(b>63) b=63;
|
||||||
|
palette[a]=b;
|
||||||
|
}
|
||||||
|
for(a=0;a<24;a++)
|
||||||
|
{
|
||||||
|
uc=(255-a)*3;
|
||||||
|
b=a-4; if(b<0) b=0;
|
||||||
|
palette[uc+0]=b/2;
|
||||||
|
palette[uc+1]=0;
|
||||||
|
palette[uc+2]=0;
|
||||||
|
}
|
||||||
|
palette[0]=0;
|
||||||
|
palette[1]=0;
|
||||||
|
palette[2]=0;
|
||||||
|
for(x=(256-16)*3;x<768;x++)
|
||||||
|
{
|
||||||
|
palette[x]=combg[16+x];
|
||||||
|
}
|
||||||
|
vbuf=halloc(16384,4);
|
||||||
|
for(y=0;y<90;y++)
|
||||||
|
{
|
||||||
|
for(x=0;x<80;x++)
|
||||||
|
{
|
||||||
|
combguse[x+y*160]=combg[x*4+y*320+768+16];
|
||||||
|
}
|
||||||
|
for(x=0;x<80;x++)
|
||||||
|
{
|
||||||
|
combguse[x+80+y*160]=combg[x*4+y*320+2+768+16];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dis_waitb();
|
||||||
|
setpalarea(palette,0,256);
|
||||||
|
#ifdef CALCW12
|
||||||
|
wave1=halloc(16384,4);
|
||||||
|
wave2=halloc(16384,4);
|
||||||
|
for(b=u=v=0;b<128;b++)
|
||||||
|
{
|
||||||
|
for(a=0;a<256;a++)
|
||||||
|
{
|
||||||
|
k=((long)u*1024L*7L)>>15;
|
||||||
|
j=wavesin[k&1023]/8;
|
||||||
|
k=((long)u*1024L*3L)>>15;
|
||||||
|
j+=wavesin[k&1023]/7+((rand()&7)*a/256);
|
||||||
|
wave1[u]=j*5/9;
|
||||||
|
k=((long)u*1024L*5L)>>15;
|
||||||
|
j=wavesin[k&1023]/5;
|
||||||
|
k=((long)u*1024L*2L)>>15;
|
||||||
|
j+=wavesin[k&1023]/6;
|
||||||
|
wave2[u]=j*7/9;
|
||||||
|
u++;
|
||||||
|
}
|
||||||
|
if(!dis_indemo()) vram[b*2]=127;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
FILE *f1;
|
||||||
|
f1=fopen("w1dta.bin","wb");
|
||||||
|
fwrite(wave1,2,16384,f1);
|
||||||
|
fwrite(wave1+16384,2,16384,f1);
|
||||||
|
fclose(f1);
|
||||||
|
f1=fopen("w2dta.bin","wb");
|
||||||
|
fwrite(wave2,2,16384,f1);
|
||||||
|
fwrite(wave2+16384,2,16384,f1);
|
||||||
|
fclose(f1);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
wave1=w1dta;
|
||||||
|
wave2=w2dta;
|
||||||
|
#endif
|
||||||
|
inittwk();
|
||||||
|
memset(vram,0,64000);
|
||||||
|
dis_waitb();
|
||||||
|
setpalarea(palette,0,256);
|
||||||
|
|
||||||
|
doit();
|
||||||
|
|
||||||
|
if(!dis_indemo())
|
||||||
|
{
|
||||||
|
_asm mov ax,3h
|
||||||
|
_asm int 10h
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BIN
COMAN/MAIN.OBJ
Normal file
BIN
COMAN/MAIN.OBJ
Normal file
Binary file not shown.
161
COMAN/MAIN1.C
Normal file
161
COMAN/MAIN1.C
Normal file
|
|
@ -0,0 +1,161 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
#include "..\dis\dis.h"
|
||||||
|
|
||||||
|
int flip;
|
||||||
|
|
||||||
|
int wavesin[]=
|
||||||
|
#include "wave.h"
|
||||||
|
|
||||||
|
extern unsigned char *wave1;
|
||||||
|
extern unsigned char *wave2;
|
||||||
|
extern unsigned char *vbuf;
|
||||||
|
extern int cameralevel;
|
||||||
|
|
||||||
|
char far *vram=(char far *)0xa0000000L;
|
||||||
|
char far *vram2=(char far *)0xa8000000L;
|
||||||
|
|
||||||
|
extern int sin1024[];
|
||||||
|
|
||||||
|
char palette[768];
|
||||||
|
|
||||||
|
char *shiftstatus=(char *)0x0417;
|
||||||
|
int waitb()
|
||||||
|
{
|
||||||
|
if(*shiftstatus&16) setborder(0);
|
||||||
|
while(!(inp(0x3da)&8));
|
||||||
|
while((inp(0x3da)&8));
|
||||||
|
if(*shiftstatus&16) setborder(127);
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void doit(void)
|
||||||
|
{
|
||||||
|
unsigned int u,v,uc;
|
||||||
|
int startrise=160;
|
||||||
|
int a,b,x,y,xa,ya,j,xw,yw,d;
|
||||||
|
int rot2=0,rot=0,rsin,rcos,xwav=0,ywav=0,zwav=0;
|
||||||
|
int rsin2,rcos2;
|
||||||
|
int frame=0;
|
||||||
|
rot=200; rot2=0;
|
||||||
|
cameralevel=-270;
|
||||||
|
while(!kbhit() && frame<444)
|
||||||
|
{
|
||||||
|
if(frame<50)
|
||||||
|
{
|
||||||
|
if(frame==4)
|
||||||
|
{
|
||||||
|
setpalarea(palette,0,256);
|
||||||
|
}
|
||||||
|
if(startrise>0) startrise-=4;
|
||||||
|
}
|
||||||
|
rsin=sin1024[rot&1023];
|
||||||
|
rcos=sin1024[(rot+256)&1023];
|
||||||
|
rsin2=sin1024[(rot+177)&1023];
|
||||||
|
rcos2=sin1024[(rot+177+256)&1023];
|
||||||
|
zwav+=1;
|
||||||
|
rot2+=2;
|
||||||
|
rot+=3*(sin1024[rot2&1023]+64)/256;
|
||||||
|
xw=xwav; yw=ywav;
|
||||||
|
for(a=0;a<160;a++)
|
||||||
|
{
|
||||||
|
x=(a-80);
|
||||||
|
y=160;
|
||||||
|
xa=(int)(((long)x*(long)rcos+(long)y*(long)rsin)/256L);
|
||||||
|
ya=(int)(((long)y*(long)rcos2-(long)x*(long)rsin2)/256L);
|
||||||
|
b=(a&1)*80+(a>>1)+199*160;
|
||||||
|
docol(xw,yw,xa,ya,b);
|
||||||
|
if(a==80)
|
||||||
|
{
|
||||||
|
xwav+=xa*4+ya/2;
|
||||||
|
ywav+=ya*4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
flip++; if(flip>1) flip=0;
|
||||||
|
switch(flip)
|
||||||
|
{
|
||||||
|
case 0 :
|
||||||
|
outp(0x3d4,0x0c);
|
||||||
|
outp(0x3d5,0x80);
|
||||||
|
frame+=waitb();
|
||||||
|
docopy(0xa000+5*startrise);
|
||||||
|
break;
|
||||||
|
case 1 :
|
||||||
|
outp(0x3d4,0x0c);
|
||||||
|
outp(0x3d5,0x00);
|
||||||
|
frame+=waitb();
|
||||||
|
docopy(0xa800+5*startrise);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
unsigned int u,v,uc;
|
||||||
|
int a,b,x,y,xa,ya,j,k,xw,yw;
|
||||||
|
int rot=0,rsin,rcos,xwav=0,ywav=0;
|
||||||
|
dis_partstart();
|
||||||
|
_asm mov ax,13h
|
||||||
|
_asm int 10h
|
||||||
|
if(!dis_indemo()) printf("\nShaded 3D sinusfield < Lanscape?\n");
|
||||||
|
for(a=0;a<256;a++)
|
||||||
|
{
|
||||||
|
uc=(223-a*22/26)*3;
|
||||||
|
b=(230-a)/4;
|
||||||
|
if(b<0) b=0;
|
||||||
|
if(b>63) b=63;
|
||||||
|
palette[uc+1]=b;
|
||||||
|
b=(255-a)/4;
|
||||||
|
if(b>63) b=63;
|
||||||
|
palette[uc+2]=b;
|
||||||
|
palette[uc+0]=0;
|
||||||
|
vram[a+640]=a;
|
||||||
|
}
|
||||||
|
for(a=0;a<32;a++)
|
||||||
|
{
|
||||||
|
uc=(255-a)*3;
|
||||||
|
palette[uc+0]=a;
|
||||||
|
palette[uc+1]=0;
|
||||||
|
palette[uc+2]=0;
|
||||||
|
}
|
||||||
|
palette[0]=0;
|
||||||
|
palette[1]=0;
|
||||||
|
palette[2]=0;
|
||||||
|
wave1=halloc(16384,4);
|
||||||
|
wave2=halloc(16384,4);
|
||||||
|
vbuf=halloc(16384,4);
|
||||||
|
setpalarea(palette,0,256);
|
||||||
|
for(b=u=v=0;b<256;b++)
|
||||||
|
{
|
||||||
|
for(a=0;a<256;a++)
|
||||||
|
{
|
||||||
|
k=((long)u*1024L*7L)/65536L;
|
||||||
|
j=wavesin[k&1023]/8;
|
||||||
|
k=((long)u*1024L*3L)/65536L;
|
||||||
|
j+=wavesin[k&1023]/7;
|
||||||
|
wave1[u]=(j/3)+120/2;
|
||||||
|
k=((long)u*1024L*5L)/65536L;
|
||||||
|
j=wavesin[k&1023]/6;
|
||||||
|
k=((long)u*1024L*2L)/65536L;
|
||||||
|
j+=wavesin[k&1023]/5;
|
||||||
|
wave2[u]=(j/3)+120/2;
|
||||||
|
u++;
|
||||||
|
}
|
||||||
|
if(!dis_indemo()) vram[b]=127;
|
||||||
|
}
|
||||||
|
inittwk();
|
||||||
|
memset(vram,0,64000);
|
||||||
|
setpalarea(palette,0,256);
|
||||||
|
|
||||||
|
doit();
|
||||||
|
if(kbhit()) getch();
|
||||||
|
|
||||||
|
if(!dis_indemo())
|
||||||
|
{
|
||||||
|
_asm mov ax,3h
|
||||||
|
_asm int 10h
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
24
COMAN/MAKEFILE
Normal file
24
COMAN/MAKEFILE
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
all : doloop.exe c.exe
|
||||||
|
|
||||||
|
objs=main.obj asm.obj theloop.obj ..\dis\disc.obj
|
||||||
|
dobjs=_w1dta1.obj _w1dta2.obj _w2dta1.obj _w2dta2.obj
|
||||||
|
|
||||||
|
asm_f = /ML /m2 /s /JJUMPS
|
||||||
|
#c_f = /AL /c /W1 /qc
|
||||||
|
c_f = /AL /c /W1 /Oxaz
|
||||||
|
|
||||||
|
.asm.obj :
|
||||||
|
tasm $(asm_f) $<
|
||||||
|
|
||||||
|
.c.obj :
|
||||||
|
cl $(c_f) $<
|
||||||
|
|
||||||
|
c.exe : $(objs)
|
||||||
|
link /E $(objs)+$(dobjs),c.exe,nul;
|
||||||
|
copy c.exe ..\main\data\3dsinfld.exe
|
||||||
|
|
||||||
|
doloop.exe : doloop.c
|
||||||
|
mkc doloop
|
||||||
|
doloop
|
||||||
|
|
||||||
|
theloop.asm : theloop.inc
|
||||||
33
COMAN/SIN1024.INC
Normal file
33
COMAN/SIN1024.INC
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
_sin1024 LABEL WORD
|
||||||
|
dw 0,1,3,4,6,7,9,10,12,14,15,17,18,20,21,23,25,26,28,29,31,32,34,36,37,39,40,42,43,45,46,48
|
||||||
|
dw 49,51,53,54,56,57,59,60,62,63,65,66,68,69,71,72,74,75,77,78,80,81,83,84,86,87,89,90,92,93,95,96
|
||||||
|
dw 97,99,100,102,103,105,106,108,109,110,112,113,115,116,117,119,120,122,123,124,126,127,128,130,131,132,134,135,136,138,139,140
|
||||||
|
dw 142,143,144,146,147,148,149,151,152,153,155,156,157,158,159,161,162,163,164,166,167,168,169,170,171,173,174,175,176,177,178,179
|
||||||
|
dw 181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,211
|
||||||
|
dw 212,213,214,215,216,217,217,218,219,220,221,221,222,223,224,225,225,226,227,227,228,229,230,230,231,232,232,233,234,234,235,235
|
||||||
|
dw 236,237,237,238,238,239,239,240,241,241,242,242,243,243,244,244,244,245,245,246,246,247,247,247,248,248,249,249,249,250,250,250
|
||||||
|
dw 251,251,251,251,252,252,252,252,253,253,253,253,254,254,254,254,254,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255
|
||||||
|
dw 256,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,254,254,254,254,254,253,253,253,253,252,252,252,252,251,251,251
|
||||||
|
dw 251,250,250,250,249,249,249,248,248,247,247,247,246,246,245,245,244,244,244,243,243,242,242,241,241,240,239,239,238,238,237,237
|
||||||
|
dw 236,235,235,234,234,233,232,232,231,230,230,229,228,227,227,226,225,225,224,223,222,221,221,220,219,218,217,217,216,215,214,213
|
||||||
|
dw 212,211,211,210,209,208,207,206,205,204,203,202,201,200,199,198,197,196,195,194,193,192,191,190,189,188,187,186,185,184,183,182
|
||||||
|
dw 181,179,178,177,176,175,174,173,171,170,169,168,167,166,164,163,162,161,159,158,157,156,155,153,152,151,149,148,147,146,144,143
|
||||||
|
dw 142,140,139,138,136,135,134,132,131,130,128,127,126,124,123,122,120,119,117,116,115,113,112,110,109,108,106,105,103,102,100,99
|
||||||
|
dw 97,96,95,93,92,90,89,87,86,84,83,81,80,78,77,75,74,72,71,69,68,66,65,63,62,60,59,57,56,54,53,51
|
||||||
|
dw 49,48,46,45,43,42,40,39,37,36,34,32,31,29,28,26,25,23,21,20,18,17,15,14,12,10,9,7,6,4,3,1
|
||||||
|
dw 0,-1,-3,-4,-6,-7,-9,-10,-12,-14,-15,-17,-18,-20,-21,-23,-25,-26,-28,-29,-31,-32,-34,-36,-37,-39,-40,-42,-43,-45,-46,-48
|
||||||
|
dw -49,-51,-53,-54,-56,-57,-59,-60,-62,-63,-65,-66,-68,-69,-71,-72,-74,-75,-77,-78,-80,-81,-83,-84,-86,-87,-89,-90,-92,-93,-95,-96
|
||||||
|
dw -97,-99,-100,-102,-103,-105,-106,-108,-109,-110,-112,-113,-115,-116,-117,-119,-120,-122,-123,-124,-126,-127,-128,-130,-131,-132,-134,-135,-136,-138,-139,-140
|
||||||
|
dw -142,-143,-144,-146,-147,-148,-149,-151,-152,-153,-155,-156,-157,-158,-159,-161,-162,-163,-164,-166,-167,-168,-169,-170,-171,-173,-174,-175,-176,-177,-178,-179
|
||||||
|
dw -181,-182,-183,-184,-185,-186,-187,-188,-189,-190,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-205,-206,-207,-208,-209,-210,-211,-211
|
||||||
|
dw -212,-213,-214,-215,-216,-217,-217,-218,-219,-220,-221,-221,-222,-223,-224,-225,-225,-226,-227,-227,-228,-229,-230,-230,-231,-232,-232,-233,-234,-234,-235,-235
|
||||||
|
dw -236,-237,-237,-238,-238,-239,-239,-240,-241,-241,-242,-242,-243,-243,-244,-244,-244,-245,-245,-246,-246,-247,-247,-247,-248,-248,-249,-249,-249,-250,-250,-250
|
||||||
|
dw -251,-251,-251,-251,-252,-252,-252,-252,-253,-253,-253,-253,-254,-254,-254,-254,-254,-254,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255
|
||||||
|
dw -256,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-255,-254,-254,-254,-254,-254,-254,-253,-253,-253,-253,-252,-252,-252,-252,-251,-251,-251
|
||||||
|
dw -251,-250,-250,-250,-249,-249,-249,-248,-248,-247,-247,-247,-246,-246,-245,-245,-244,-244,-244,-243,-243,-242,-242,-241,-241,-240,-239,-239,-238,-238,-237,-237
|
||||||
|
dw -236,-235,-235,-234,-234,-233,-232,-232,-231,-230,-230,-229,-228,-227,-227,-226,-225,-225,-224,-223,-222,-221,-221,-220,-219,-218,-217,-217,-216,-215,-214,-213
|
||||||
|
dw -212,-211,-211,-210,-209,-208,-207,-206,-205,-204,-203,-202,-201,-200,-199,-198,-197,-196,-195,-194,-193,-192,-191,-190,-189,-188,-187,-186,-185,-184,-183,-182
|
||||||
|
dw -181,-179,-178,-177,-176,-175,-174,-173,-171,-170,-169,-168,-167,-166,-164,-163,-162,-161,-159,-158,-157,-156,-155,-153,-152,-151,-149,-148,-147,-146,-144,-143
|
||||||
|
dw -142,-140,-139,-138,-136,-135,-134,-132,-131,-130,-128,-127,-126,-124,-123,-122,-120,-119,-117,-116,-115,-113,-112,-110,-109,-108,-106,-105,-103,-102,-100,-99
|
||||||
|
dw -97,-96,-95,-93,-92,-90,-89,-87,-86,-84,-83,-81,-80,-78,-77,-75,-74,-72,-71,-69,-68,-66,-65,-63,-62,-60,-59,-57,-56,-54,-53,-51
|
||||||
|
dw -49,-48,-46,-45,-43,-42,-40,-39,-37,-36,-34,-32,-31,-29,-28,-26,-25,-23,-21,-20,-18,-17,-15,-14,-12,-10,-9,-7,-6,-4,-3,-1
|
||||||
11
COMAN/THELOOP.ASM
Normal file
11
COMAN/THELOOP.ASM
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
thecode SEGMENT para public 'CODE'
|
||||||
|
ASSUME cs:thecode
|
||||||
|
.386
|
||||||
|
LOCALS
|
||||||
|
NOJUMPS
|
||||||
|
|
||||||
|
PUBLIC theloop
|
||||||
|
include theloop.inc
|
||||||
|
|
||||||
|
thecode ENDS
|
||||||
|
END
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue