Subversion Repositories Kolibri OS

Rev

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

Rev 8047 Rev 8232
Line 11... Line 11...
11
        tex_x_div2      dw      TEX_X  / 2
11
        tex_x_div2      dw      TEX_X  / 2
12
        tex_y_div2      dw      TEX_Y  / 2
12
        tex_y_div2      dw      TEX_Y  / 2
13
        xobs            dw      0 ;SIZE_X / 2 ;200 ;observer  = camera
13
        xobs            dw      0 ;SIZE_X / 2 ;200 ;observer  = camera
14
        yobs            dw      0 ;SIZE_Y / 2 ;200 ;coordinates
14
        yobs            dw      0 ;SIZE_Y / 2 ;200 ;coordinates
15
        zobs            dw      -1000
15
        zobs            dw      -1000
16
     ;   size_x          dw      SIZE_X
-
 
17
     ;   size_y          dw      SIZE_Y
-
 
Line 18... Line 16...
18
 
16
 
19
        re_alloc_flag db 0
17
        re_alloc_flag db 0
20
        angle_counter dw 0
18
        angle_counter dw 0
21
        piD180        dd 0.017453292519943295769236907684886
19
        piD180        dd 0.017453292519943295769236907684886
Line 54... Line 52...
54
        screen_ptr              dd 0
52
        screen_ptr              dd 0
55
        Zbuffer_ptr             dd 0
53
        Zbuffer_ptr             dd 0
56
        vertices_index_ptr      dd 0
54
        vertices_index_ptr      dd 0
Line 57... Line -...
57
 
-
 
58
 
55
 
59
     ;   draw_win_at_first db 1
56
 
60
        vertex_edit_no    dw 0
57
        vertex_edit_no    dw 0
61
        edit_start_x:
58
        edit_start_x:
62
                          dw 0
59
                          dw 0
Line 74... Line 71...
74
               dd axl_f            ; offset to flags description
71
               dd axl_f            ; offset to flags description
Line 75... Line 72...
75
 
72
 
76
               db 3
73
               db 3
77
               db 'shd. model'
74
               db 'shd. model'
78
            if Ext >= SSE3
75
            if Ext >= SSE3
79
               db 13
76
               db 14
80
            else
77
            else
81
               db 12
78
               db 12
82
            end if
79
            end if
83
 dr_flag       db 0  ;  6 - dots
80
 dr_flag       db 0  ;  6 - dots
Line 267... Line 264...
267
    db '2tex'
264
    db '2tex'
268
    db 'btex'
265
    db 'btex'
269
    db 'cenv'
266
    db 'cenv'
270
    db 'grdl'
267
    db 'grdl'
271
    db 'rphg'
268
    db 'rphg'
-
 
269
    db 'glas'
272
 spd_f:
270
 spd_f:
273
    db 'idle'
271
    db 'idle'
274
    db 'full'
272
    db 'full'
275
 axl_f:
273
 axl_f:
276
    db ' y  '
274
    db ' y  '
277
    db 'x+y '
275
    db 'x+y '
278
    db ' x  '
276
    db ' x  '
279
 onoff_f:
277
 onoff_f:
280
    db 'off '
278
    db 'off '
281
    db 'on  '
279
    db 'on  '
282
; light_component_f:
-
 
283
;    db 'norm '                ; diffuse   |
-
 
284
;    db 'min'                  ; specular  |  or sth. like this
-
 
285
;    db 'max '                 ; emmisive  |
-
 
286
 
-
 
287
;; color_component_f:
-
 
288
;;    db ' r  '
-
 
289
;;    db ' g  '
-
 
290
;;    db ' b  '
-
 
Line 291... Line 280...
291
 
280
 
292
          blur_f:              ; blur, fire
281
          blur_f:              ; blur, fire
293
            db 'off '
282
            db 'off '
294
bumps_d_f:  db ' 1  '
283
bumps_d_f:  db ' 1  '
Line 332... Line 321...
332
    labelzminusend:
321
    labelzminusend:
333
    labelyplus:
322
    labelyplus:
334
        db   'y +'
323
        db   'y +'
335
    labelyplusend:
324
    labelyplusend:
Line 336... Line -...
336
 
-
 
337
;navigation_size = $ - labelvector
-
 
338
;        db   'set color '
-
 
339
;        db   'r -'
-
 
340
;        db   'g +'
-
 
341
;        db   'b -'
-
 
342
;        db   'b +'
-
 
343
;        db   'g -'
-
 
Line 344... Line 325...
344
;        db   'r +'
325
 
345
 
326
 
346
    labelt:
327
    labelt:
347
        db   'DEUS CARITAS EST'
328
        db   'DEUS CARITAS EST'
Line 355... Line 336...
355
        db   ' (SSE2)'
336
        db   ' (SSE2)'
356
      end if
337
      end if
357
      if Ext=SSE3
338
      if Ext=SSE3
358
        db   ' (SSE3)'
339
        db   ' (SSE3)'
359
      end if
340
      end if
360
        db   ' 0.070',0
341
        db   ' 0.071',0
361
    labellen:
342
    labellen:
362
        STRdata db '-1        '
343
        STRdata db '-1        '
Line 363... Line 344...
363
 
344
 
Line 364... Line -...
364
    all_lights_size dw lightsend-lights
-
 
Line 365... Line 345...
365
 
345
    all_lights_size dw lightsend-lights
366
if USE_LFN
346
 
367
 
347
 
368
        file_info:
348
        file_info:
369
                dd      0
349
                dd      0
370
                dd      0
350
                dd      0
371
                dd      0
351
                dd      0
372
         fsize  dd      0 ;180000 ; sizeof(workarea)
352
         fsize  dd      0 ;180000 ; sizeof(workarea)
373
         fptr   dd      0 ;workarea
-
 
374
        file_name:
-
 
375
                db      '/rd/1/3d/house.3ds',0
-
 
376
 
-
 
377
else
-
 
378
 
-
 
379
        file_info:
-
 
380
                dd 0
-
 
381
                dd 0
-
 
382
         fsize  dd 1
-
 
383
                dd workarea
353
         fptr   dd      0 ;workarea
384
                dd hash_table
-
 
385
        file_name:
-
 
386
                db   '/rd/1/teapot.3ds',0
-
 
Line 387... Line 354...
387
end if
354
        file_name:
Line 388... Line 355...
388
 
355
                db      '/rd/1/3d/house.3ds',0
389
  ;I_END:
356
         ;      db      '/tmp0/1/ant.3ds',0
Line 446... Line 413...
446
           times 4 dd 255.0
413
           times 4 dd 255.0
447
    the_zero:
414
    the_zero:
448
           times 4 dd 0.0
415
           times 4 dd 0.0
Line 449... Line 416...
449
 
416
 
450
I_END:
-
 
451
if USE_LFN = 0
-
 
452
hash_table rb 4096
-
 
453
SourceFile:
-
 
454
workarea   rb 180000
-
 
455
else
417
I_END:
456
SourceFile:
418
SourceFile:
457
workarea   rb 180
-
 
458
end if
419
workarea   rb 180
459
EndFile   dd ?
420
EndFile   dd ?
460
align 8
421
align 8
461
        sinbeta dd      ?;+32
422
        sinbeta dd      ?;+32
Line 476... Line 437...
476
        zz3     dw      ?      ; xx1 + 16
437
        zz3     dw      ?      ; xx1 + 16
477
        col1    dd      ?
438
        col1    dd      ?
478
        col2    dd      ?
439
        col2    dd      ?
479
        col3    dd      ?
440
        col3    dd      ?
480
        scale   dd      ? ; help scale variable
441
        scale   dd      ? ; help scale variable
481
        edges_counter dd ?
-
 
-
 
442
 
482
   ;==
443
   ;==
483
        triangles_count_var     dd ?
444
        triangles_count_var     dd ?
484
        points_count_var        dd ?
445
        points_count_var        dd ?
485
     ;   triangles_ptr           dd ?
-
 
486
     ;   triangles_w_z_ptr       dd ?
-
 
487
     ;   triangles_normals_ptr   dd ?
-
 
488
     ;   points_normals_ptr      dd ?
-
 
489
     ;   points_normals_rot_ptr  dd ?
-
 
490
     ;   points_ptr              dd ?
-
 
491
     ;   points_rotated_ptr      dd ?
-
 
492
     ;   points_translated_ptr   dd ?
-
 
493
     ;   screen_ptr              dd ?
-
 
494
     ;   Zbuffer_ptr             dd ?
-
 
495
     ;   vertices_index_ptr      dd ?
-
 
496
      ;  edit_start_x:
-
 
-
 
446
 
497
                                dw ?    ; don't change order
-
 
498
      ;  edit_start_y            dw ?
-
 
499
     ;   edges_ptr               dd ?
-
 
500
        size_y_var:
447
        size_y_var:
501
                                dw ?
448
        yres_var                dw ?
-
 
449
 
502
        size_x_var:
450
        size_x_var:
503
                                dw ?
451
        xres_var                dw ?
504
        x_start:
452
        x_start:
505
                                dw ?
453
                                dw ?
506
        y_start:
454
        y_start:
507
                                dw ?
455
                                dw ?
Line 510... Line 458...
510
 
458
 
511
        point_index1        dd ?   ;-\
459
        point_index1        dd ?   ;-\
512
        point_index2        dd ?   ;  }  don't change order
460
        point_index2        dd ?   ;  }  don't change order
513
        point_index3        dd ?   ;-/
461
        point_index3        dd ?   ;-/
-
 
462
        temp_col            dw ?
-
 
463
        temp1               dd ?
514
        temp_col            dw ?
464
        temp2               dd ?
515
        high                dd ?
465
        high                dd ?
516
        rand_seed           dw ?
466
        rand_seed           dw ?
517
align 8
467
align 8
518
        buffer  dq      ?
468
        buffer  dq      ?
Line 529... Line 479...
529
        cos_tab rd 360
479
        cos_tab rd 360
530
        sin_tab rd 360
480
        sin_tab rd 360
Line 531... Line 481...
531
 
481
 
Line 532... Line -...
532
align 16
-
 
533
 
-
 
534
if USE_LFN = 0
-
 
535
     points:
-
 
536
        rw (EndFile-SourceFile)/12*3
-
 
537
        points_count = ($-points)/6
-
 
538
     triangles:
-
 
539
        rw  (EndFile-SourceFile)/12*3
-
 
540
        triangles_count = ($-triangles)/6
-
 
541
align 16
-
 
542
        real_points rd points_count*3 + 1
-
 
543
align 16
-
 
544
        rotated_points_r rd points_count*3 + 1
-
 
545
align 16
-
 
546
        points_rotated rw points_count*3 + 2 ;means translated
-
 
547
align 16
-
 
548
        triangles_normals rb triangles_count * 12 ;
-
 
549
align 16
-
 
550
        point_normals rb points_count * 12  ;one 3dvector - triple float dword x,y,z
-
 
551
align 16
-
 
552
        point_normals_rotated rb points_count * 12
-
 
Line 553... Line -...
553
align 16
-
 
554
        triangles_normals_rotated rb triangles_count * 12
482
align 16
555
 
483
 
556
else
-
 
557
    points_count = 180000/6*3
484
 
558
    triangles_count = 180000 / 6  ;($-triangles)/6
485
    points_count = 180000/6*3
559
end if
486
    triangles_count = 180000 / 6  ;($-triangles)/6
560
align 16
487
align 16
561
        label trizdd dword
488
        label trizdd dword
562
        label trizdq qword
489
        label trizdq qword
563
        triangles_with_z rw triangles_count*4 + 2 ; triangles triple dw + z position
-
 
564
align 16
-
 
565
        vectors rb 24
-
 
566
;align 16
490
        triangles_with_z rw triangles_count*4 + 2 ; triangles triple dw + z position
567
;        points_color rb 6*points_count    ; each color as word
491
align 16
568
;        sorted_triangles rw triangles_count*3 + 2
492
        vectors rb 24
569
align 16
493
align 16
570
        bumpmap         rb      TEXTURE_SIZE + 1
494
        bumpmap         rb      TEXTURE_SIZE + 1
Line 575... Line 499...
575
align 16
499
align 16
576
        envmap_cub      rb      TEX_X * 3
500
        envmap_cub      rb      TEX_X * 3
577
align 16
501
align 16
578
        texmap          rb      (TEXTURE_SIZE +1) * 3
502
        texmap          rb      (TEXTURE_SIZE +1) * 3
579
align 16
503
align 16
580
        color_map       rb      (TEXTURE_SIZE +1) * 3
504
        color_map       rb      (TEXTURE_SIZE +100) * 3
581
align 16
505
align 16
582
        tex_points      rb      points_count * 4  ; bump_map  and texture coords
506
        tex_points      rb      points_count * 4  ; bump_map  and texture coords
583
                                ; each point word x, word y
507
                                ; each point word x, word y
584
align 16
508
align 16
585
       lights_aligned:
509
       lights_aligned: