Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 31 → Rev 37

/programs/free3d04/trunk/wall.inc
File deleted
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/free3d04/trunk/wall2.inc
File deleted
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/free3d04/trunk/wall3.inc
File deleted
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/free3d04/trunk/wall4.inc
File deleted
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/free3d04/trunk/wall5.inc
File deleted
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/free3d04/trunk/wall6.inc
File deleted
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/free3d04/trunk/wall7.inc
File deleted
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/free3d04/trunk/ceil.inc
File deleted
Property changes:
Deleted: svn:eol-style
-native
\ No newline at end of property
/programs/free3d04/trunk/free3d04.asm
6,7 → 6,21
;
; Compile with FASM for Menuet (requires .INC files - see DATA Section)
;
; Willow - greatly srinked code size by using GIF texture and FPU to calculate sine table
;
; !!!! Don't use GIF.INC in your apps - it's modified for FREE3D !!!!
TEX_SIZE equ 64*64*4
ceil = sinus+16*1024
wall = ceil+TEX_SIZE*1
wall2 = ceil+TEX_SIZE*2
wall3 = ceil+TEX_SIZE*3
wall4 = ceil+TEX_SIZE*4
wall5 = ceil+TEX_SIZE*5
wall6 = ceil+TEX_SIZE*6
wall7 = ceil+TEX_SIZE*7
APP_MEM equ 0x200000
 
use32
org 0x0
15,13 → 29,31
dd 0x01 ; header version
dd START ; start of code
dd I_END ; size of image
dd 0x300000 ; memory for app
dd 0x7fff0 ; esp
dd APP_MEM;0x300000 ; memory for app
dd APP_MEM;0x300000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
include 'lang.inc'
include 'macros.inc'
COLOR_ORDER equ OTHER
include 'gif.inc'
include 'lang.inc'
START: ; start of execution
mov esi,textures
mov edi,ceil
mov eax,sinus
call ReadGIF
mov esi,sinus
mov ecx,360*10
fninit
fld [sindegree]
.sinlp:
fst st1
fsin
fmul [sindiv]
fistp dword[esi]
add esi,4
fadd [sininc]
loop .sinlp
call draw_window ; at first, draw the window
call draw_stuff
942,486 → 974,106
db 1,4,1,4,1,4,1,4,1,4,1,3,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1
db 2,1,2,1,2,1,2,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
vpx:
dd 0x0001FFFF ; initial player position * 0xFFFF
vpy:
dd 0x0001FFFF
sinus:
dd 0,11,23,34,46,57,69,80,92,103
dd 114,126,137,149,160,172,183,194,206,217
dd 229,240,252,263,274,286,297,309,320,332
dd 343,354,366,377,389,400,411,423,434,446
dd 457,469,480,491,503,514,526,537,548,560
dd 571,583,594,605,617,628,640,651,662,674
dd 685,696,708,719,731,742,753,765,776,787
dd 799,810,821,833,844,855,867,878,889,901
dd 912,923,935,946,957,969,980,991,1003,1014
dd 1025,1036,1048,1059,1070,1082,1093,1104,1115,1127
dd 1138,1149,1161,1172,1183,1194,1206,1217,1228,1239
dd 1250,1262,1273,1284,1295,1307,1318,1329,1340,1351
dd 1363,1374,1385,1396,1407,1418,1430,1441,1452,1463
dd 1474,1485,1496,1508,1519,1530,1541,1552,1563,1574
dd 1585,1597,1608,1619,1630,1641,1652,1663,1674,1685
dd 1696,1707,1718,1729,1740,1751,1762,1773,1784,1795
dd 1806,1817,1828,1839,1850,1861,1872,1883,1894,1905
dd 1916,1927,1938,1949,1960,1971,1982,1992,2003,2014
dd 2025,2036,2047,2058,2069,2079,2090,2101,2112,2123
dd 2134,2144,2155,2166,2177,2188,2198,2209,2220,2231
dd 2241,2252,2263,2274,2284,2295,2306,2316,2327,2338
dd 2349,2359,2370,2381,2391,2402,2413,2423,2434,2444
dd 2455,2466,2476,2487,2497,2508,2518,2529,2540,2550
dd 2561,2571,2582,2592,2603,2613,2624,2634,2645,2655
dd 2666,2676,2686,2697,2707,2718,2728,2738,2749,2759
dd 2770,2780,2790,2801,2811,2821,2832,2842,2852,2863
dd 2873,2883,2893,2904,2914,2924,2934,2945,2955,2965
dd 2975,2985,2996,3006,3016,3026,3036,3046,3056,3067
dd 3077,3087,3097,3107,3117,3127,3137,3147,3157,3167
dd 3177,3187,3197,3207,3217,3227,3237,3247,3257,3267
dd 3277,3287,3297,3306,3316,3326,3336,3346,3356,3365
dd 3375,3385,3395,3405,3414,3424,3434,3444,3453,3463
dd 3473,3483,3492,3502,3512,3521,3531,3540,3550,3560
dd 3569,3579,3588,3598,3608,3617,3627,3636,3646,3655
dd 3665,3674,3684,3693,3703,3712,3721,3731,3740,3750
dd 3759,3768,3778,3787,3796,3806,3815,3824,3834,3843
dd 3852,3861,3871,3880,3889,3898,3907,3917,3926,3935
dd 3944,3953,3962,3971,3980,3990,3999,4008,4017,4026
dd 4035,4044,4053,4062,4071,4080,4089,4098,4106,4115
dd 4124,4133,4142,4151,4160,4169,4177,4186,4195,4204
dd 4213,4221,4230,4239,4247,4256,4265,4274,4282,4291
dd 4299,4308,4317,4325,4334,4342,4351,4360,4368,4377
dd 4385,4394,4402,4411,4419,4427,4436,4444,4453,4461
dd 4469,4478,4486,4495,4503,4511,4519,4528,4536,4544
dd 4552,4561,4569,4577,4585,4593,4602,4610,4618,4626
dd 4634,4642,4650,4658,4666,4674,4682,4690,4698,4706
dd 4714,4722,4730,4738,4746,4754,4762,4769,4777,4785
dd 4793,4801,4808,4816,4824,4832,4839,4847,4855,4863
dd 4870,4878,4885,4893,4901,4908,4916,4923,4931,4938
dd 4946,4953,4961,4968,4976,4983,4991,4998,5006,5013
dd 5020,5028,5035,5042,5050,5057,5064,5071,5079,5086
dd 5093,5100,5107,5115,5122,5129,5136,5143,5150,5157
dd 5164,5171,5178,5185,5192,5199,5206,5213,5220,5227
dd 5234,5241,5248,5254,5261,5268,5275,5282,5288,5295
dd 5302,5309,5315,5322,5329,5335,5342,5349,5355,5362
dd 5368,5375,5381,5388,5394,5401,5407,5414,5420,5427
dd 5433,5439,5446,5452,5459,5465,5471,5477,5484,5490
dd 5496,5502,5509,5515,5521,5527,5533,5539,5546,5552
dd 5558,5564,5570,5576,5582,5588,5594,5600,5606,5612
dd 5617,5623,5629,5635,5641,5647,5652,5658,5664,5670
dd 5675,5681,5687,5693,5698,5704,5709,5715,5721,5726
dd 5732,5737,5743,5748,5754,5759,5765,5770,5776,5781
dd 5786,5792,5797,5802,5808,5813,5818,5824,5829,5834
dd 5839,5844,5850,5855,5860,5865,5870,5875,5880,5885
dd 5890,5895,5900,5905,5910,5915,5920,5925,5930,5935
dd 5939,5944,5949,5954,5959,5963,5968,5973,5978,5982
dd 5987,5992,5996,6001,6005,6010,6015,6019,6024,6028
dd 6033,6037,6041,6046,6050,6055,6059,6063,6068,6072
dd 6076,6081,6085,6089,6093,6097,6102,6106,6110,6114
dd 6118,6122,6126,6130,6134,6138,6142,6146,6150,6154
dd 6158,6162,6166,6170,6174,6178,6181,6185,6189,6193
dd 6196,6200,6204,6208,6211,6215,6218,6222,6226,6229
dd 6233,6236,6240,6243,6247,6250,6254,6257,6260,6264
dd 6267,6270,6274,6277,6280,6284,6287,6290,6293,6296
dd 6300,6303,6306,6309,6312,6315,6318,6321,6324,6327
dd 6330,6333,6336,6339,6342,6345,6348,6350,6353,6356
dd 6359,6362,6364,6367,6370,6372,6375,6378,6380,6383
dd 6386,6388,6391,6393,6396,6398,6401,6403,6405,6408
dd 6410,6413,6415,6417,6420,6422,6424,6426,6429,6431
dd 6433,6435,6437,6440,6442,6444,6446,6448,6450,6452
dd 6454,6456,6458,6460,6462,6464,6466,6467,6469,6471
dd 6473,6475,6476,6478,6480,6482,6483,6485,6486,6488
dd 6490,6491,6493,6494,6496,6497,6499,6500,6502,6503
dd 6505,6506,6507,6509,6510,6511,6513,6514,6515,6516
dd 6518,6519,6520,6521,6522,6523,6524,6525,6527,6528
dd 6529,6530,6531,6531,6532,6533,6534,6535,6536,6537
dd 6538,6538,6539,6540,6541,6541,6542,6543,6543,6544
dd 6545,6545,6546,6546,6547,6547,6548,6548,6549,6549
dd 6550,6550,6550,6551,6551,6551,6552,6552,6552,6552
dd 6553,6553,6553,6553,6553,6553,6553,6553,6553,6553
dd 6554,6553,6553,6553,6553,6553,6553,6553,6553,6553
dd 6553,6552,6552,6552,6552,6551,6551,6551,6550,6550
dd 6550,6549,6549,6548,6548,6547,6547,6546,6546,6545
dd 6545,6544,6543,6543,6542,6541,6541,6540,6539,6538
dd 6538,6537,6536,6535,6534,6533,6532,6531,6531,6530
dd 6529,6528,6527,6525,6524,6523,6522,6521,6520,6519
dd 6518,6516,6515,6514,6513,6511,6510,6509,6507,6506
dd 6505,6503,6502,6500,6499,6497,6496,6494,6493,6491
dd 6490,6488,6486,6485,6483,6482,6480,6478,6476,6475
dd 6473,6471,6469,6467,6466,6464,6462,6460,6458,6456
dd 6454,6452,6450,6448,6446,6444,6442,6440,6437,6435
dd 6433,6431,6429,6426,6424,6422,6420,6417,6415,6413
dd 6410,6408,6405,6403,6401,6398,6396,6393,6391,6388
dd 6386,6383,6380,6378,6375,6372,6370,6367,6364,6362
dd 6359,6356,6353,6350,6348,6345,6342,6339,6336,6333
dd 6330,6327,6324,6321,6318,6315,6312,6309,6306,6303
dd 6300,6296,6293,6290,6287,6284,6280,6277,6274,6270
dd 6267,6264,6260,6257,6254,6250,6247,6243,6240,6236
dd 6233,6229,6226,6222,6218,6215,6211,6208,6204,6200
dd 6196,6193,6189,6185,6181,6178,6174,6170,6166,6162
dd 6158,6154,6150,6146,6142,6138,6134,6130,6126,6122
dd 6118,6114,6110,6106,6102,6097,6093,6089,6085,6081
dd 6076,6072,6068,6063,6059,6055,6050,6046,6041,6037
dd 6033,6028,6024,6019,6015,6010,6005,6001,5996,5992
dd 5987,5982,5978,5973,5968,5963,5959,5954,5949,5944
dd 5939,5935,5930,5925,5920,5915,5910,5905,5900,5895
dd 5890,5885,5880,5875,5870,5865,5860,5855,5850,5844
dd 5839,5834,5829,5824,5818,5813,5808,5802,5797,5792
dd 5786,5781,5776,5770,5765,5759,5754,5748,5743,5737
dd 5732,5726,5721,5715,5709,5704,5698,5693,5687,5681
dd 5675,5670,5664,5658,5652,5647,5641,5635,5629,5623
dd 5617,5612,5606,5600,5594,5588,5582,5576,5570,5564
dd 5558,5552,5546,5539,5533,5527,5521,5515,5509,5502
dd 5496,5490,5484,5477,5471,5465,5459,5452,5446,5439
dd 5433,5427,5420,5414,5407,5401,5394,5388,5381,5375
dd 5368,5362,5355,5349,5342,5335,5329,5322,5315,5309
dd 5302,5295,5288,5282,5275,5268,5261,5254,5248,5241
dd 5234,5227,5220,5213,5206,5199,5192,5185,5178,5171
dd 5164,5157,5150,5143,5136,5129,5122,5115,5107,5100
dd 5093,5086,5079,5071,5064,5057,5050,5042,5035,5028
dd 5020,5013,5006,4998,4991,4983,4976,4968,4961,4953
dd 4946,4938,4931,4923,4916,4908,4901,4893,4885,4878
dd 4870,4863,4855,4847,4839,4832,4824,4816,4808,4801
dd 4793,4785,4777,4769,4762,4754,4746,4738,4730,4722
dd 4714,4706,4698,4690,4682,4674,4666,4658,4650,4642
dd 4634,4626,4618,4610,4602,4593,4585,4577,4569,4561
dd 4552,4544,4536,4528,4519,4511,4503,4495,4486,4478
dd 4469,4461,4453,4444,4436,4427,4419,4411,4402,4394
dd 4385,4377,4368,4360,4351,4342,4334,4325,4317,4308
dd 4299,4291,4282,4274,4265,4256,4247,4239,4230,4221
dd 4213,4204,4195,4186,4177,4169,4160,4151,4142,4133
dd 4124,4115,4106,4098,4089,4080,4071,4062,4053,4044
dd 4035,4026,4017,4008,3999,3990,3980,3971,3962,3953
dd 3944,3935,3926,3917,3907,3898,3889,3880,3871,3861
dd 3852,3843,3834,3824,3815,3806,3796,3787,3778,3768
dd 3759,3750,3740,3731,3721,3712,3703,3693,3684,3674
dd 3665,3655,3646,3636,3627,3617,3608,3598,3588,3579
dd 3569,3560,3550,3540,3531,3521,3512,3502,3492,3483
dd 3473,3463,3453,3444,3434,3424,3414,3405,3395,3385
dd 3375,3365,3356,3346,3336,3326,3316,3306,3297,3287
dd 3277,3267,3257,3247,3237,3227,3217,3207,3197,3187
dd 3177,3167,3157,3147,3137,3127,3117,3107,3097,3087
dd 3077,3067,3056,3046,3036,3026,3016,3006,2996,2985
dd 2975,2965,2955,2945,2934,2924,2914,2904,2893,2883
dd 2873,2863,2852,2842,2832,2821,2811,2801,2790,2780
dd 2770,2759,2749,2738,2728,2718,2707,2697,2686,2676
dd 2666,2655,2645,2634,2624,2613,2603,2592,2582,2571
dd 2561,2550,2540,2529,2518,2508,2497,2487,2476,2466
dd 2455,2444,2434,2423,2413,2402,2391,2381,2370,2359
dd 2349,2338,2327,2316,2306,2295,2284,2274,2263,2252
dd 2241,2231,2220,2209,2198,2188,2177,2166,2155,2144
dd 2134,2123,2112,2101,2090,2079,2069,2058,2047,2036
dd 2025,2014,2003,1992,1982,1971,1960,1949,1938,1927
dd 1916,1905,1894,1883,1872,1861,1850,1839,1828,1817
dd 1806,1795,1784,1773,1762,1751,1740,1729,1718,1707
dd 1696,1685,1674,1663,1652,1641,1630,1619,1608,1597
dd 1585,1574,1563,1552,1541,1530,1519,1508,1496,1485
dd 1474,1463,1452,1441,1430,1418,1407,1396,1385,1374
dd 1363,1351,1340,1329,1318,1307,1295,1284,1273,1262
dd 1250,1239,1228,1217,1206,1194,1183,1172,1161,1149
dd 1138,1127,1115,1104,1093,1082,1070,1059,1048,1036
dd 1025,1014,1003,991,980,969,957,946,935,923
dd 912,901,889,878,867,855,844,833,821,810
dd 799,787,776,765,753,742,731,719,708,696
dd 685,674,662,651,640,628,617,605,594,583
dd 571,560,548,537,526,514,503,491,480,469
dd 457,446,434,423,411,400,389,377,366,354
dd 343,332,320,309,297,286,274,263,252,240
dd 229,217,206,194,183,172,160,149,137,126
dd 114,103,92,80,69,57,46,34,23,11
dd 0,-11,-23,-34,-46,-57,-69,-80,-92,-103
dd -114,-126,-137,-149,-160,-172,-183,-194,-206,-217
dd -229,-240,-252,-263,-274,-286,-297,-309,-320,-332
dd -343,-354,-366,-377,-389,-400,-411,-423,-434,-446
dd -457,-469,-480,-491,-503,-514,-526,-537,-548,-560
dd -571,-583,-594,-605,-617,-628,-640,-651,-662,-674
dd -685,-696,-708,-719,-731,-742,-753,-765,-776,-787
dd -799,-810,-821,-833,-844,-855,-867,-878,-889,-901
dd -912,-923,-935,-946,-957,-969,-980,-991,-1003,-1014
dd -1025,-1036,-1048,-1059,-1070,-1082,-1093,-1104,-1115,-1127
dd -1138,-1149,-1161,-1172,-1183,-1194,-1206,-1217,-1228,-1239
dd -1250,-1262,-1273,-1284,-1295,-1307,-1318,-1329,-1340,-1351
dd -1363,-1374,-1385,-1396,-1407,-1418,-1430,-1441,-1452,-1463
dd -1474,-1485,-1496,-1508,-1519,-1530,-1541,-1552,-1563,-1574
dd -1585,-1597,-1608,-1619,-1630,-1641,-1652,-1663,-1674,-1685
dd -1696,-1707,-1718,-1729,-1740,-1751,-1762,-1773,-1784,-1795
dd -1806,-1817,-1828,-1839,-1850,-1861,-1872,-1883,-1894,-1905
dd -1916,-1927,-1938,-1949,-1960,-1971,-1982,-1992,-2003,-2014
dd -2025,-2036,-2047,-2058,-2069,-2079,-2090,-2101,-2112,-2123
dd -2134,-2144,-2155,-2166,-2177,-2188,-2198,-2209,-2220,-2231
dd -2241,-2252,-2263,-2274,-2284,-2295,-2306,-2316,-2327,-2338
dd -2349,-2359,-2370,-2381,-2391,-2402,-2413,-2423,-2434,-2444
dd -2455,-2466,-2476,-2487,-2497,-2508,-2518,-2529,-2540,-2550
dd -2561,-2571,-2582,-2592,-2603,-2613,-2624,-2634,-2645,-2655
dd -2666,-2676,-2686,-2697,-2707,-2718,-2728,-2738,-2749,-2759
dd -2770,-2780,-2790,-2801,-2811,-2821,-2832,-2842,-2852,-2863
dd -2873,-2883,-2893,-2904,-2914,-2924,-2934,-2945,-2955,-2965
dd -2975,-2985,-2996,-3006,-3016,-3026,-3036,-3046,-3056,-3067
dd -3077,-3087,-3097,-3107,-3117,-3127,-3137,-3147,-3157,-3167
dd -3177,-3187,-3197,-3207,-3217,-3227,-3237,-3247,-3257,-3267
dd -3277,-3287,-3297,-3306,-3316,-3326,-3336,-3346,-3356,-3365
dd -3375,-3385,-3395,-3405,-3414,-3424,-3434,-3444,-3453,-3463
dd -3473,-3483,-3492,-3502,-3512,-3521,-3531,-3540,-3550,-3560
dd -3569,-3579,-3588,-3598,-3608,-3617,-3627,-3636,-3646,-3655
dd -3665,-3674,-3684,-3693,-3703,-3712,-3721,-3731,-3740,-3750
dd -3759,-3768,-3778,-3787,-3796,-3806,-3815,-3824,-3834,-3843
dd -3852,-3861,-3871,-3880,-3889,-3898,-3907,-3917,-3926,-3935
dd -3944,-3953,-3962,-3971,-3980,-3990,-3999,-4008,-4017,-4026
dd -4035,-4044,-4053,-4062,-4071,-4080,-4089,-4098,-4106,-4115
dd -4124,-4133,-4142,-4151,-4160,-4169,-4177,-4186,-4195,-4204
dd -4213,-4221,-4230,-4239,-4247,-4256,-4265,-4274,-4282,-4291
dd -4299,-4308,-4317,-4325,-4334,-4342,-4351,-4360,-4368,-4377
dd -4385,-4394,-4402,-4411,-4419,-4427,-4436,-4444,-4453,-4461
dd -4469,-4478,-4486,-4495,-4503,-4511,-4519,-4528,-4536,-4544
dd -4552,-4561,-4569,-4577,-4585,-4593,-4602,-4610,-4618,-4626
dd -4634,-4642,-4650,-4658,-4666,-4674,-4682,-4690,-4698,-4706
dd -4714,-4722,-4730,-4738,-4746,-4754,-4762,-4769,-4777,-4785
dd -4793,-4801,-4808,-4816,-4824,-4832,-4839,-4847,-4855,-4863
dd -4870,-4878,-4885,-4893,-4901,-4908,-4916,-4923,-4931,-4938
dd -4946,-4953,-4961,-4968,-4976,-4983,-4991,-4998,-5006,-5013
dd -5020,-5028,-5035,-5042,-5050,-5057,-5064,-5071,-5079,-5086
dd -5093,-5100,-5107,-5115,-5122,-5129,-5136,-5143,-5150,-5157
dd -5164,-5171,-5178,-5185,-5192,-5199,-5206,-5213,-5220,-5227
dd -5234,-5241,-5248,-5254,-5261,-5268,-5275,-5282,-5288,-5295
dd -5302,-5309,-5315,-5322,-5329,-5335,-5342,-5349,-5355,-5362
dd -5368,-5375,-5381,-5388,-5394,-5401,-5407,-5414,-5420,-5427
dd -5433,-5439,-5446,-5452,-5459,-5465,-5471,-5477,-5484,-5490
dd -5496,-5502,-5509,-5515,-5521,-5527,-5533,-5539,-5546,-5552
dd -5558,-5564,-5570,-5576,-5582,-5588,-5594,-5600,-5606,-5612
dd -5617,-5623,-5629,-5635,-5641,-5647,-5652,-5658,-5664,-5670
dd -5675,-5681,-5687,-5693,-5698,-5704,-5709,-5715,-5721,-5726
dd -5732,-5737,-5743,-5748,-5754,-5759,-5765,-5770,-5776,-5781
dd -5786,-5792,-5797,-5802,-5808,-5813,-5818,-5824,-5829,-5834
dd -5839,-5844,-5850,-5855,-5860,-5865,-5870,-5875,-5880,-5885
dd -5890,-5895,-5900,-5905,-5910,-5915,-5920,-5925,-5930,-5935
dd -5939,-5944,-5949,-5954,-5959,-5963,-5968,-5973,-5978,-5982
dd -5987,-5992,-5996,-6001,-6005,-6010,-6015,-6019,-6024,-6028
dd -6033,-6037,-6041,-6046,-6050,-6055,-6059,-6063,-6068,-6072
dd -6076,-6081,-6085,-6089,-6093,-6097,-6102,-6106,-6110,-6114
dd -6118,-6122,-6126,-6130,-6134,-6138,-6142,-6146,-6150,-6154
dd -6158,-6162,-6166,-6170,-6174,-6178,-6181,-6185,-6189,-6193
dd -6196,-6200,-6204,-6208,-6211,-6215,-6218,-6222,-6226,-6229
dd -6233,-6236,-6240,-6243,-6247,-6250,-6254,-6257,-6260,-6264
dd -6267,-6270,-6274,-6277,-6280,-6284,-6287,-6290,-6293,-6296
dd -6300,-6303,-6306,-6309,-6312,-6315,-6318,-6321,-6324,-6327
dd -6330,-6333,-6336,-6339,-6342,-6345,-6348,-6350,-6353,-6356
dd -6359,-6362,-6364,-6367,-6370,-6372,-6375,-6378,-6380,-6383
dd -6386,-6388,-6391,-6393,-6396,-6398,-6401,-6403,-6405,-6408
dd -6410,-6413,-6415,-6417,-6420,-6422,-6424,-6426,-6429,-6431
dd -6433,-6435,-6437,-6440,-6442,-6444,-6446,-6448,-6450,-6452
dd -6454,-6456,-6458,-6460,-6462,-6464,-6466,-6467,-6469,-6471
dd -6473,-6475,-6476,-6478,-6480,-6482,-6483,-6485,-6486,-6488
dd -6490,-6491,-6493,-6494,-6496,-6497,-6499,-6500,-6502,-6503
dd -6505,-6506,-6507,-6509,-6510,-6511,-6513,-6514,-6515,-6516
dd -6518,-6519,-6520,-6521,-6522,-6523,-6524,-6525,-6527,-6528
dd -6529,-6530,-6531,-6531,-6532,-6533,-6534,-6535,-6536,-6537
dd -6538,-6538,-6539,-6540,-6541,-6541,-6542,-6543,-6543,-6544
dd -6545,-6545,-6546,-6546,-6547,-6547,-6548,-6548,-6549,-6549
dd -6550,-6550,-6550,-6551,-6551,-6551,-6552,-6552,-6552,-6552
dd -6553,-6553,-6553,-6553,-6553,-6553,-6553,-6553,-6553,-6553
dd -6554,-6553,-6553,-6553,-6553,-6553,-6553,-6553,-6553,-6553
dd -6553,-6552,-6552,-6552,-6552,-6551,-6551,-6551,-6550,-6550
dd -6550,-6549,-6549,-6548,-6548,-6547,-6547,-6546,-6546,-6545
dd -6545,-6544,-6543,-6543,-6542,-6541,-6541,-6540,-6539,-6538
dd -6538,-6537,-6536,-6535,-6534,-6533,-6532,-6531,-6531,-6530
dd -6529,-6528,-6527,-6525,-6524,-6523,-6522,-6521,-6520,-6519
dd -6518,-6516,-6515,-6514,-6513,-6511,-6510,-6509,-6507,-6506
dd -6505,-6503,-6502,-6500,-6499,-6497,-6496,-6494,-6493,-6491
dd -6490,-6488,-6486,-6485,-6483,-6482,-6480,-6478,-6476,-6475
dd -6473,-6471,-6469,-6467,-6466,-6464,-6462,-6460,-6458,-6456
dd -6454,-6452,-6450,-6448,-6446,-6444,-6442,-6440,-6437,-6435
dd -6433,-6431,-6429,-6426,-6424,-6422,-6420,-6417,-6415,-6413
dd -6410,-6408,-6405,-6403,-6401,-6398,-6396,-6393,-6391,-6388
dd -6386,-6383,-6380,-6378,-6375,-6372,-6370,-6367,-6364,-6362
dd -6359,-6356,-6353,-6350,-6348,-6345,-6342,-6339,-6336,-6333
dd -6330,-6327,-6324,-6321,-6318,-6315,-6312,-6309,-6306,-6303
dd -6300,-6296,-6293,-6290,-6287,-6284,-6280,-6277,-6274,-6270
dd -6267,-6264,-6260,-6257,-6254,-6250,-6247,-6243,-6240,-6236
dd -6233,-6229,-6226,-6222,-6218,-6215,-6211,-6208,-6204,-6200
dd -6196,-6193,-6189,-6185,-6181,-6178,-6174,-6170,-6166,-6162
dd -6158,-6154,-6150,-6146,-6142,-6138,-6134,-6130,-6126,-6122
dd -6118,-6114,-6110,-6106,-6102,-6097,-6093,-6089,-6085,-6081
dd -6076,-6072,-6068,-6063,-6059,-6055,-6050,-6046,-6041,-6037
dd -6033,-6028,-6024,-6019,-6015,-6010,-6005,-6001,-5996,-5992
dd -5987,-5982,-5978,-5973,-5968,-5963,-5959,-5954,-5949,-5944
dd -5939,-5935,-5930,-5925,-5920,-5915,-5910,-5905,-5900,-5895
dd -5890,-5885,-5880,-5875,-5870,-5865,-5860,-5855,-5850,-5844
dd -5839,-5834,-5829,-5824,-5818,-5813,-5808,-5802,-5797,-5792
dd -5786,-5781,-5776,-5770,-5765,-5759,-5754,-5748,-5743,-5737
dd -5732,-5726,-5721,-5715,-5709,-5704,-5698,-5693,-5687,-5681
dd -5675,-5670,-5664,-5658,-5652,-5647,-5641,-5635,-5629,-5623
dd -5617,-5612,-5606,-5600,-5594,-5588,-5582,-5576,-5570,-5564
dd -5558,-5552,-5546,-5539,-5533,-5527,-5521,-5515,-5509,-5502
dd -5496,-5490,-5484,-5477,-5471,-5465,-5459,-5452,-5446,-5439
dd -5433,-5427,-5420,-5414,-5407,-5401,-5394,-5388,-5381,-5375
dd -5368,-5362,-5355,-5349,-5342,-5335,-5329,-5322,-5315,-5309
dd -5302,-5295,-5288,-5282,-5275,-5268,-5261,-5254,-5248,-5241
dd -5234,-5227,-5220,-5213,-5206,-5199,-5192,-5185,-5178,-5171
dd -5164,-5157,-5150,-5143,-5136,-5129,-5122,-5115,-5107,-5100
dd -5093,-5086,-5079,-5071,-5064,-5057,-5050,-5042,-5035,-5028
dd -5020,-5013,-5006,-4998,-4991,-4983,-4976,-4968,-4961,-4953
dd -4946,-4938,-4931,-4923,-4916,-4908,-4901,-4893,-4885,-4878
dd -4870,-4863,-4855,-4847,-4839,-4832,-4824,-4816,-4808,-4801
dd -4793,-4785,-4777,-4769,-4762,-4754,-4746,-4738,-4730,-4722
dd -4714,-4706,-4698,-4690,-4682,-4674,-4666,-4658,-4650,-4642
dd -4634,-4626,-4618,-4610,-4602,-4593,-4585,-4577,-4569,-4561
dd -4552,-4544,-4536,-4528,-4519,-4511,-4503,-4495,-4486,-4478
dd -4469,-4461,-4453,-4444,-4436,-4427,-4419,-4411,-4402,-4394
dd -4385,-4377,-4368,-4360,-4351,-4342,-4334,-4325,-4317,-4308
dd -4299,-4291,-4282,-4274,-4265,-4256,-4247,-4239,-4230,-4221
dd -4213,-4204,-4195,-4186,-4177,-4169,-4160,-4151,-4142,-4133
dd -4124,-4115,-4106,-4098,-4089,-4080,-4071,-4062,-4053,-4044
dd -4035,-4026,-4017,-4008,-3999,-3990,-3980,-3971,-3962,-3953
dd -3944,-3935,-3926,-3917,-3907,-3898,-3889,-3880,-3871,-3861
dd -3852,-3843,-3834,-3824,-3815,-3806,-3796,-3787,-3778,-3768
dd -3759,-3750,-3740,-3731,-3721,-3712,-3703,-3693,-3684,-3674
dd -3665,-3655,-3646,-3636,-3627,-3617,-3608,-3598,-3588,-3579
dd -3569,-3560,-3550,-3540,-3531,-3521,-3512,-3502,-3492,-3483
dd -3473,-3463,-3453,-3444,-3434,-3424,-3414,-3405,-3395,-3385
dd -3375,-3365,-3356,-3346,-3336,-3326,-3316,-3306,-3297,-3287
dd -3277,-3267,-3257,-3247,-3237,-3227,-3217,-3207,-3197,-3187
dd -3177,-3167,-3157,-3147,-3137,-3127,-3117,-3107,-3097,-3087
dd -3077,-3067,-3056,-3046,-3036,-3026,-3016,-3006,-2996,-2985
dd -2975,-2965,-2955,-2945,-2934,-2924,-2914,-2904,-2893,-2883
dd -2873,-2863,-2852,-2842,-2832,-2821,-2811,-2801,-2790,-2780
dd -2770,-2759,-2749,-2738,-2728,-2718,-2707,-2697,-2686,-2676
dd -2666,-2655,-2645,-2634,-2624,-2613,-2603,-2592,-2582,-2571
dd -2561,-2550,-2540,-2529,-2518,-2508,-2497,-2487,-2476,-2466
dd -2455,-2444,-2434,-2423,-2413,-2402,-2391,-2381,-2370,-2359
dd -2349,-2338,-2327,-2316,-2306,-2295,-2284,-2274,-2263,-2252
dd -2241,-2231,-2220,-2209,-2198,-2188,-2177,-2166,-2155,-2144
dd -2134,-2123,-2112,-2101,-2090,-2079,-2069,-2058,-2047,-2036
dd -2025,-2014,-2003,-1992,-1982,-1971,-1960,-1949,-1938,-1927
dd -1916,-1905,-1894,-1883,-1872,-1861,-1850,-1839,-1828,-1817
dd -1806,-1795,-1784,-1773,-1762,-1751,-1740,-1729,-1718,-1707
dd -1696,-1685,-1674,-1663,-1652,-1641,-1630,-1619,-1608,-1597
dd -1585,-1574,-1563,-1552,-1541,-1530,-1519,-1508,-1496,-1485
dd -1474,-1463,-1452,-1441,-1430,-1418,-1407,-1396,-1385,-1374
dd -1363,-1351,-1340,-1329,-1318,-1307,-1295,-1284,-1273,-1262
dd -1250,-1239,-1228,-1217,-1206,-1194,-1183,-1172,-1161,-1149
dd -1138,-1127,-1115,-1104,-1093,-1082,-1070,-1059,-1048,-1036
dd -1025,-1014,-1003,-991,-980,-969,-957,-946,-935,-923
dd -912,-901,-889,-878,-867,-855,-844,-833,-821,-810
dd -799,-787,-776,-765,-753,-742,-731,-719,-708,-696
dd -685,-674,-662,-651,-640,-628,-617,-605,-594,-583
dd -571,-560,-548,-537,-526,-514,-503,-491,-480,-469
dd -457,-446,-434,-423,-411,-400,-389,-377,-366,-354
dd -343,-332,-320,-309,-297,-286,-274,-263,-252,-240
dd -229,-217,-206,-194,-183,-172,-160,-149,-137,-126
dd -114,-103,-92,-80,-69,-57,-46,-34,-23,-11
labelt:
db 'FISHEYE RAYCASTING ENGINE ETC. FREE3D'
eosinus:
labellen:
sindegree dd 0.0
sininc dd 0.0017453292519943295769236907684886
sindiv dd 6553.5
textures:
file 'texture.gif'
I_END:
col1:
dd 0
dd ?;-
; misc raycaster vars:
vxx:
dd 0
dd ?;-
vyy:
dd 0
dd ?;-
vl:
dd 0
vpx:
dd 0x0001FFFF ; initial player position * 0xFFFF
vpy:
dd 0x0001FFFF
dd ?;-
vstepx:
dd 0
dd ?;-
vstepy:
dd 0
dd ?;-
vxxint:
dd 0
dd ?;-
vyyint:
dd 0
dd ?;-
vk:
dd 0
dd ?;-
va:
dd 0
dd ?;-
va2:
dd 0
dd ?;-
vdd:
dd 0
dd ?;-
vx1:
dd 0
dd ?;-
vx1b:
dd 0
dd ?;-
vh:
dd 0
dd ?;-
vdt:
dd 0
dd ?;-
vheading: ; initial heading: 0 to 3599
dd 0
dd ?;-
vacompare:
dd 0
dd ?;-
vpxi:
dd 0
dd ?;-
vpyi:
dd 0
dd ?;-
wtolong:
dw 0,0
dw ?,?;-,?;-
xtemp:
dd 0
dd ?;-
ytemp:
dd 0
dd ?;-
xfrac:
dd 0
dd ?;-
yfrac:
dd 0
dd ?;-
h_old:
dd 0
dd ?;-
vbottom:
dd 0
dd ?;-
mouseya:
dd 0
dd ?;-
remeax:
dd 0
dd ?;-
remebx:
dd 0
dd ?;-
remecx:
dd 0
dd ?;-
remedx:
dd 0
dd ?;-
remedi:
dd 0
dd ?;-
remesi:
dd 0
dd ?;-
red:
dd 0
dd ?;-
green:
dd 0
dd ?;-
blue:
dd 0
dd ?;-
pseudo:
dd 0
dd ?;-
step1:
dd 0
dd ?;-
step64:
dd 0
dd ?;-
lasty:
dd 0
ceil:
include "ceil.inc"
wall:
include "wall.inc"
wall2:
include "wall2.inc"
wall3:
include "wall3.inc"
wall4:
include "wall4.inc"
wall5:
include "wall5.inc"
wall6:
include "wall6.inc"
wall7:
include "wall7.inc"
dd ?;-
labelt:
db 'FISHEYE RAYCASTING ENGINE ETC. FREE3D'
labellen:
I_END:
sinus rd 360*10
eosinus:
/programs/free3d04/trunk/gif.inc
0,0 → 1,302
; GIF LITE v2.0 by Willow
; Written in pure assembler by Ivushkin Andrey aka Willow
;
; This include file will contain functions to handle GIF image format
;
; Created: August 15, 2004
; Last changed: September 9, 2004
 
; Change COLOR_ORDER in your program
; if colors are displayed improperly
 
if ~ (COLOR_ORDER in <MENUETOS,OTHER>)
; This message may not appear under MenuetOS, so watch...
display 'Please define COLOR_ORDER: MENUETOS or OTHER',13,10
end if
 
; virtual structure, used internally
 
struc GIF_list
{
.NextImg rd 1
.Left rw 1
.Top rw 1
.Width rw 1
.Height rw 1
}
 
struc GIF_info
{
.Left rw 1
.Top rw 1
.Width rw 1
.Height rw 1
}
 
_null fix 0x1000
 
 
; ****************************************
; FUNCTION ReadGIF - unpacks GIF image
; ****************************************
; in:
; esi - pointer to GIF file in memory
; edi - pointer to output image list
; eax - pointer to work area (MIN 16 KB!)
 
; out:
; eax - 0, all OK;
; eax - 1, invalid signature;
; eax >=8, unsupported image attributes
;
; ecx - number of images
 
ReadGIF:
push esi edi
mov [.table_ptr],eax
mov [.cur_info],edi
xor eax,eax
mov [.globalColor],eax
mov [.img_count],eax
inc eax
cmp dword[esi],'GIF8'
jne .er ; signature
mov ecx,[esi+0xa]
inc eax
add esi,0xd
mov edi,esi
bt ecx,7
jnc .nextblock
mov [.globalColor],esi
call .Gif_skipmap
.nextblock:
cmp byte[edi],0x21
jne .noextblock
inc edi
cmp byte[edi],0xf9 ; Graphic Control Ext
jne .no_gc
add edi,7
jmp .nextblock
.no_gc:
cmp byte[edi],0xfe ; Comment Ext
jne .no_comm
inc edi
.block_skip:
movzx eax,byte[edi]
lea edi,[edi+eax+1]
cmp byte[edi],0
jnz .block_skip
inc edi
jmp .nextblock
.no_comm:
cmp byte[edi],0xff ; Application Ext
jne .nextblock
add edi,13
jmp .block_skip
.noextblock:
cmp byte[edi],0x2c ; image beginning
jne .er
inc [.img_count]
inc edi
mov esi,[.cur_info]
add esi,4
xchg esi,edi
movsd
movsd
push edi
movzx ecx,word[esi]
inc esi
bt ecx,7
jc .uselocal
push [.globalColor]
mov edi,esi
jmp .setPal
.uselocal:
call .Gif_skipmap
push esi
.setPal:
movzx ecx,byte[edi]
inc ecx
mov [.codesize],ecx
dec ecx
pop [.Palette]
lea esi,[edi+1]
mov edi,[.table_ptr]
xor eax,eax
cld
lodsb ; eax - block_count
add eax,esi
mov [.block_ofs],eax
mov [.bit_count],8
mov eax,1
shl eax,cl
mov [.CC],eax
inc eax
mov [.EOI],eax
lea ecx,[eax-1]
mov eax, _null shl 16
.filltable:
stosd
inc eax
loop .filltable
pop edi
mov [.img_start],edi
.reinit:
mov edx,[.EOI]
inc edx
push [.codesize]
pop [.compsize]
call .Gif_get_sym
cmp eax,[.CC]
je .reinit
call .Gif_output
.cycle:
movzx ebx,ax
call .Gif_get_sym
cmp eax,edx
jae .notintable
cmp eax,[.CC]
je .reinit
cmp eax,[.EOI]
je .end
call .Gif_output
.add:
push eax
mov eax,[.table_ptr]
mov [eax+edx*4],ebx
pop eax
cmp edx,0xFFF
jae .cycle
inc edx
bsr ebx,edx
cmp ebx,[.compsize]
jne .noinc
inc [.compsize]
.noinc:
jmp .cycle
.notintable:
push eax
mov eax,ebx
call .Gif_output
push ebx
movzx eax,bx
call .Gif_output
pop ebx eax
jmp .add
.er:
pop edi
jmp .ex
.end:
mov eax,[.cur_info]
mov [eax],edi
mov [.cur_info],edi
add esi,2
xchg esi,edi
.nxt:
cmp byte[edi],0
jnz .continue
inc edi
jmp .nxt
.continue:
cmp byte[edi],0x3b
jne .nextblock
xor eax,eax
stosd
mov ecx,[.img_count]
.ex:
pop edi esi
ret
 
.Gif_skipmap:
; in: ecx - image descriptor, esi - pointer to colormap
; out: edi - pointer to area after colormap
 
and ecx,111b
inc ecx ; color map size
mov ebx,1
shl ebx,cl
lea ebx,[ebx*2+ebx]
lea edi,[esi+ebx]
ret
 
.Gif_get_sym:
mov ecx,[.compsize]
push ecx
xor eax,eax
.shift:
ror byte[esi],1
rcr eax,1
dec [.bit_count]
jnz .loop1
inc esi
cmp esi,[.block_ofs]
jb .noblock
push eax
xor eax,eax
lodsb
test eax,eax
jnz .nextbl
mov eax,[.EOI]
sub esi,2
add esp,8
jmp .exx
.nextbl:
add eax,esi
mov [.block_ofs],eax
pop eax
.noblock:
mov [.bit_count],8
.loop1:
loop .shift
pop ecx
rol eax,cl
.exx:
xor ecx,ecx
ret
 
.Gif_output:
push esi eax edx
mov edx,[.table_ptr]
.next:
push word[edx+eax*4]
mov ax,word[edx+eax*4+2]
inc ecx
cmp ax,_null
jnz .next
shl ebx,16
mov bx,[esp]
.loop2:
pop ax
 
lea esi,[eax+eax*2]
add esi,[.Palette]
 
if COLOR_ORDER eq MENUETOS
mov esi,[esi]
bswap esi
shr esi,8
mov [edi],esi
add edi,3
else
movsw
movsb
and byte[edi],0
inc edi
end if
 
loop .loop2
pop edx eax esi
ret
 
.globalColor rd 1
.img_count rd 1
.cur_info rd 1 ; image table pointer
.img_start rd 1
.codesize rd 1
.compsize rd 1
.bit_count rd 1
.CC rd 1
.EOI rd 1
.Palette rd 1
.block_ofs rd 1
.table_ptr rd 1
/programs/free3d04/trunk/macros.inc
0,0 → 1,267
; new application structure
macro meos_app_start
{
use32
org 0x0
 
db 'MENUET01'
dd 0x01
dd __start
dd __end
dd __memory
dd __stack
 
if used __params & ~defined __params
dd __params
else
dd 0x0
end if
 
dd 0x0
}
MEOS_APP_START fix meos_app_start
 
macro code
{
__start:
}
CODE fix code
 
macro data
{
__data:
}
DATA fix data
 
macro udata
{
if used __params & ~defined __params
__params:
db 0
__end:
rb 255
else
__end:
end if
__udata:
}
UDATA fix udata
 
macro meos_app_end
{
align 32
rb 2048
__stack:
__memory:
}
MEOS_APP_END fix meos_app_end
 
 
; macro for defining multiline text data
struc mstr [sstring]
{
forward
local ssize
virtual at 0
db sstring
ssize = $
end virtual
dd ssize
db sstring
common
dd -1
}
 
 
; strings
macro sz name,[data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if used name
db data
end if
common
if used name
.size = $-name
end if
}
 
macro lsz name,[lng,data] { ; from MFAR [mike.dld]
common
if used name
label name
end if
forward
if (used name)&(lang eq lng)
db data
end if
common
if used name
.size = $-name
end if
}
 
 
 
; easy system call macro
macro mpack dest, hsrc, lsrc
{
if (hsrc eqtype 0) & (lsrc eqtype 0)
mov dest, (hsrc) shl 16 + lsrc
else
if (hsrc eqtype 0) & (~lsrc eqtype 0)
mov dest, (hsrc) shl 16
add dest, lsrc
else
mov dest, hsrc
shl dest, 16
add dest, lsrc
end if
end if
}
 
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
 
macro mcall a,b,c,d,e,f { ; mike.dld
__mov eax,a
__mov ebx,b
__mov ecx,c
__mov edx,d
__mov esi,e
__mov edi,f
int 0x40
}
 
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
macro add arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
inc arg1
else
add arg1,arg2
end if
else
add arg1,arg2
end if
}
 
macro sub arg1,arg2
{
if (arg2 eqtype 0)
if (arg2) = 1
dec arg1
else
sub arg1,arg2
end if
else
sub arg1,arg2
end if
}
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1
xor arg1,arg1
inc arg1
else if (arg2) = -1
or arg1,-1
else if (arg2) > -128 & (arg2) < 128
push arg2
pop arg1
else
mov arg1,arg2
end if
else
mov arg1,arg2
end if
}
 
 
macro struct name
{
virtual at 0
name name
sizeof.#name = $ - name
end virtual
}
 
; structures used in MeOS
struc process_information
{
.cpu_usage dd ? ; +0
.window_stack_position dw ? ; +4
.window_stack_value dw ? ; +6
.not_used1 dw ? ; +8
.process_name rb 12 ; +10
.memory_start dd ? ; +22
.used_memory dd ? ; +26
.PID dd ? ; +30
.x_start dd ? ; +34
.y_start dd ? ; +38
.x_size dd ? ; +42
.y_size dd ? ; +46
.slot_state dw ? ; +50
rb (1024-52)
}
struct process_information
 
struc system_colors
{
.frame dd ?
.grab dd ?
.grab_button dd ?
.grab_button_text dd ?
.grab_text dd ?
.work dd ?
.work_button dd ?
.work_button_text dd ?
.work_text dd ?
.work_graph dd ?
}
struct system_colors
 
 
; constants
 
; events
EV_IDLE = 0
EV_TIMER = 0
EV_REDRAW = 1
EV_KEY = 2
EV_BUTTON = 3
EV_EXIT = 4
EV_BACKGROUND = 5
EV_MOUSE = 6
EV_IPC = 7
EV_STACK = 8
 
; event mask bits for function 40
EVM_REDRAW = 1b
EVM_KEY = 10b
EVM_BUTTON = 100b
EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b
EVM_IPC = 1000000b
EVM_STACK = 10000000b
/programs/free3d04/trunk/texture.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property