Subversion Repositories Kolibri OS

Rev

Rev 8719 | Rev 9454 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8719 Rev 9237
Line 1... Line 1...
1
; DATA AREA  ************************************
1
; DATA AREA  ************************************
-
 
2
      if Ext > SSE2
-
 
3
        isSSE3          db      1
2
 
4
      end if
3
        i3              dw      3
5
        i3              dw      3
4
        i6              dd      6
6
        i6              dd      6
5
        i12             dd      12
7
        i12             dd      12
6
        i36             dd      36
8
        i36             dd      36
7
        i256            dw      256
9
        i256            dw      256
8
        i255d           dd      255
10
        i255d           dd      255
-
 
11
        f1:
9
        dot_max         dd      1.0      ; dot product max and min
12
        dot_max         dd      1.0      ; dot product max and min
10
        dot_min         dd      0.0
13
        dot_min         dd      0.0
11
        env_const       dd      1.05
14
        env_const       dd      1.05
12
        correct_tex     dw      255
15
        correct_tex     dw      255
13
        tex_x_div2      dw      TEX_X  / 2
16
        tex_x_div2      dw      TEX_X  / 2
Line 23... Line 26...
23
        const6        dw 6,6,6,6
26
        const6        dw 6,6,6,6
24
        x_offset      dw SIZE_X / 2
27
        x_offset      dw SIZE_X / 2
25
        y_offset      dw SIZE_Y / 2
28
        y_offset      dw SIZE_Y / 2
26
        z_offset      dw 0
29
        z_offset      dw 0
27
        rsscale       dd 175.0           ; next real scale
30
        rsscale       dd 175.0           ; next real scale
28
        vect_x        dw SIZE_X / 2
31
        vect_x:        dw SIZE_X / 2
29
        vect_y        dw SIZE_Y / 2
32
        vect_y        dw SIZE_Y / 2
30
        vect_z        dw 0
33
        vect_z        dw 0
31
                size_y_var:
34
                size_y_var:
32
        yres_var                dw SIZE_Y
35
        yres_var                dw SIZE_Y
Line 108... Line 111...
108
               db 255
111
               db 255
109
               db ?
112
               db ?
110
               dd ?
113
               dd ?
Line 111... Line 114...
111
 
114
 
112
               db 7
115
               db 7
113
               db 'catmull   '
116
               db 'ray shadow'
114
               db 2
117
               db 2
115
catmull_flag   db 1
118
ray_shd_flag   db 0
Line 116... Line 119...
116
               dd onoff_f
119
               dd onoff_f
117
 
120
 
118
               db 8
121
               db 8
Line 163... Line 166...
163
emboss_flag    db 0
166
emboss_flag    db 0
164
               dd onoff_f
167
               dd onoff_f
Line 165... Line 168...
165
 
168
 
166
               db 16
169
               db 16
167
               db 'fire      '
170
               db 'fire      '
168
               db 3
171
               db 2
169
fire_flag      db 0
172
fire_flag      db 0
Line 170... Line 173...
170
               dd blur_f
173
               dd blur_f
171
 
174
 
Line 348... Line 351...
348
        db   ' (SSE2)'
351
        db   ' (SSE2)'
349
      end if
352
      end if
350
      if Ext=SSE3
353
      if Ext=SSE3
351
        db   ' (SSE3)'
354
        db   ' (SSE3)'
352
      end if
355
      end if
353
        db   ' 0.073',0
356
        db   ' 0.074',0
354
    labellen:
357
    labellen:
355
        STRdata db '-1        '
358
        STRdata db '-1        '
356
     lab_vert:
359
     lab_vert:
357
        db 'Vertices count: '
360
        db 'Vertices count: '
358
     lab_vert_end:
361
     lab_vert_end:
Line 423... Line 426...
423
 
426
 
Line 424... Line 427...
424
lightsend:
427
lightsend:
425
 
428
 
-
 
429
 
-
 
430
 
-
 
431
;if Ext >= SSE3
-
 
432
align 16
-
 
433
   point_light_coords:
-
 
434
              dd 50.0
-
 
435
              dd 50.0
-
 
436
              dd -215.0
-
 
437
              dd 0.0
-
 
438
 
-
 
439
 
-
 
440
              dd 815.0
-
 
441
              dd 815.0
-
 
442
              dd -215.0
-
 
443
              dd 0.0
-
 
444
 
-
 
445
              dd 1500.0
-
 
446
              dd 1500.0
-
 
447
              dd -215.0
-
 
448
              dd 0.0
-
 
449
if 0
-
 
450
    aabb1:
-
 
451
        .0              dd 1.0,1.0,1.0,0
-
 
452
        .1              dd -1.0,1.0,1.0,0
-
 
453
        .2              dd 1.0,-1.0,1.0,0
-
 
454
        .3              dd -1.0,-1.0,1.0,0
-
 
455
        .4              dd 1.0,1.0,-1.0,0
-
 
456
        .5              dd -1.0,1.0,-1.0,0
-
 
457
        .6              dd 1.0,-1.0,-1.0,0
-
 
458
        .7              dd -1.0,-1.0,-1.0,0
-
 
459
 
-
 
460
end if
-
 
461
 
-
 
462
    sign_mask:
-
 
463
              times 4 dd 0x80000000
426
 
464
    f05xz:    dd 0, 0,   - 1.0  ,0
427
 
465
 
428
 
466
    sign_z:
429
align 16
467
              dd -1,-1,0x7fffffff,0
430
    abs_mask:
468
    abs_mask:
Line 440... Line 478...
440
           times 4 dd 0.0
478
           times 4 dd 0.0
441
    tex_m2:
479
    tex_m2:
442
           times 4 dd 510.0
480
           times 4 dd 510.0
443
    the_one:
481
    the_one:
444
           times 4 dd 1.0
482
           times 4 dd 1.0
-
 
483
 
-
 
484
     eps:  times 4 dd 0.00000
-
 
485
     epsone      dd 1.0001
445
     aprox  dd 0.0001
486
     aprox       dd 0.0001
-
 
487
     epsminus    dd -0.0001
Line 446... Line 488...
446
 
488
 
447
 
489
 
448
        file_info:
490
        file_info:
Line 461... Line 503...
461
I_END:
503
I_END:
462
SourceFile:
504
SourceFile:
463
workarea   rb 180
505
workarea   rb 180
464
EndFile   dd ?
506
EndFile   dd ?
465
align 8
507
align 8
466
        sinbeta dd      ?;+32
508
        sinbeta dd      ?;
467
        cosbeta dd      ?
509
        cosbeta dd      ?
Line 468... Line 510...
468
 
510
 
469
        xsub    dw      ?
511
        xsub    dw      ?
470
        zsub    dw      ?;+40
512
        zsub    dw      ?
Line 471... Line -...
471
        ysub    dw      ?
-
 
472
 
-
 
473
        xx1     dw      ?
-
 
474
        yy1     dw      ?
-
 
475
        zz1     dw      ?;+48    xx1 + 4
-
 
476
        xx2     dw      ?
-
 
477
        yy2     dw      ?
-
 
478
        zz2     dw      ?      ; xx1 + 10
-
 
479
        xx3     dw      ?;+56
-
 
480
        yy3     dw      ?
513
        ysub    dw      ?
481
        zz3     dw      ?      ; xx1 + 16
514
 
482
        col1    dd      ?
515
        col1    dd      ?
483
        col2    dd      ?
516
        col2    dd      ?
Line 484... Line 517...
484
        col3    dd      ?
517
        col3    dd      ?
485
        scale   dd      ? ; help scale variable
518
        scale   dd      ? ; help scale variable
486
 
519
 
-
 
520
        points_count_var        dd ?  ;
Line 487... Line -...
487
        points_count_var        dd ?  ;
-
 
488
        triangles_count_var     dd ?  ; dont change order
-
 
489
        edges_count             dd ?  ;
-
 
490
 
521
        triangles_count_var     dd ?  ; dont change order
491
        point_index1        dd ?   ;-\
-
 
492
        point_index2        dd ?   ;  }  don't change order
-
 
493
        point_index3        dd ?   ;-/
522
        edges_count             dd ?  ;
494
        temp_col            dw ?
523
        tex_points_ptr          dd ?
495
        temp1               dd ?   ; > dont change
524
 
496
        temp2               dd ?   ; >  order
525
        temp_col            dw ?
497
        high                dd ?
526
        high                dd ?
Line 508... Line 537...
508
;        Zbuffer_ptr     dd     ?
537
;        Zbuffer_ptr     dd     ?
Line 509... Line 538...
509
 
538
 
510
        matrix  rb 36
539
        matrix  rb 36
511
        cos_tab rd 360
540
        cos_tab rd 360
512
        sin_tab rd 360
-
 
513
 
541
        sin_tab rd 360
-
 
542
align 16
-
 
543
       lights_aligned:
-
 
544
       lights_aligned_end = $ + 16 * 12
Line 514... Line -...
514
align 16
-
 
515
 
-
 
516
 
-
 
517
    points_count = 180000/6*3
-
 
518
    triangles_count = 180000 / 6  ;($-triangles)/6
-
 
519
align 16
-
 
520
        label trizdd dword
-
 
521
        label trizdq qword
545
                        rb 16 * 12
522
        triangles_with_z rw triangles_count*4 + 2 ; triangles triple dw + z position
546
 
-
 
547
align 16
523
align 16
548
        vectors rb 24
524
        vectors rb 24
549
 
525
align 16
550
align 16
526
        bumpmap         rb      TEXTURE_SIZE + 1
551
        bumpmap         rb      TEXTURE_SIZE + 1
527
align 16
552
align 16
Line 533... Line 558...
533
align 16
558
align 16
534
        texmap          rb      (TEXTURE_SIZE +1) * 3
559
        texmap          rb      (TEXTURE_SIZE +1) * 3
535
align 16
560
align 16
536
        color_map       rb      (TEXTURE_SIZE +100) * 3
561
        color_map       rb      (TEXTURE_SIZE +100) * 3
537
align 16
562
align 16
538
        tex_points      rb      points_count * 4  ; bump_map  and texture coords
563
 ;       tex_points      rb      points_count * 4  ; bump_map  and texture coords
539
                                ; each point word x, word y
564
 ;                               ; each point word x, word y
540
align 16
565
;align 16
541
       lights_aligned:
566
;       lights_aligned:
542
       lights_aligned_end = $ + 16 * 12
567
;       lights_aligned_end = $ + 16 * 12
543
                        rb 16 * 12
568
;                        rb 16 * 12
Line 544... Line 569...
544
 
569
 
545
 
570
 
546
if Ext >= SSE2
571
if Ext >= SSE2
547
        sse_repository  rb      1024
-
 
548
end if
-
 
549
  ;      SourceFile:             ; source file temporally in screen area
-
 
550
  ;      workarea        dd      ?
-
 
551
 
-
 
552
    ;    screen          rb      SIZE_X * SIZE_Y * 3   ; screen buffer
-
 
553
;align 16
572
        sse_repository  rb      1024
554
     ;   Z_buffer        rb      SIZE_X * SIZE_Y * 4
573
end if
555
        procinfo:
574
        procinfo:
556
                        rb     1024 ; process info
575
                        rb     2048 ; process info
557
        I_Param         rb      256
576
        I_Param         rb      256
558
        memStack:
577
        memStack:
559
        rb 2000
578
        rb 2000