Subversion Repositories Kolibri OS

Rev

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

Rev 9472 Rev 9541
Line 72... Line 72...
72
  include '../../../macros.inc'
72
  include '../../../macros.inc'
73
  include '../../../proc32.inc'
73
  include '../../../proc32.inc'
74
  include '../../../KOSfuncs.inc'
74
  include '../../../KOSfuncs.inc'
75
  include '../../../dll.inc'
75
  include '../../../dll.inc'
Line -... Line 76...
-
 
76
 
-
 
77
  include 'draw_sliders.inc'
-
 
78
  include 'draw_utils.inc'
-
 
79
  include 'draw_palitra.inc'
-
 
80
 
-
 
81
 
76
 
82
 
77
  WIN_W  = 394            ; è¨à¨­  ®ª­ 
83
  WIN_W  = 394            ; è¨à¨­  ®ª­ 
78
  WIN_H  = 251            ; ¢ëá®â  ®ª­ 
84
  WIN_H  = 251            ; ¢ëá®â  ®ª­ 
79
  WIN_X  = 250            ; ª®®à¤¨­ â  å ®ª­ 
85
  WIN_X  = 250            ; ª®®à¤¨­ â  å ®ª­ 
Line -... Line 86...
-
 
86
  WIN_Y  = 190            ; ª®®à¤¨­ â  ã ®ª­ 
80
  WIN_Y  = 190            ; ª®®à¤¨­ â  ã ®ª­ 
87
 
81
  
88
  Left_Border=4
-
 
89
  SliderPanel_W = 110
-
 
90
  DRAWY  = 9
-
 
91
 
82
  CELLW  = 8              ; not used yet, but has to be :)
92
  CELLW  = 11; 11            ; not used yet, but has to be :)
83
  DRAWY  = 9
93
 
Line -... Line 94...
-
 
94
  ICONX  = WIN_W - 35
-
 
95
  SLIDEW = 25
-
 
96
 
-
 
97
  palitra_x = Left_Border+SliderPanel_W+12
-
 
98
  palitra_w = CELLW*(8)+8+1
84
  ICONX  = WIN_W - 35
99
  palitra_xw = palitra_x shl 16 + palitra_w
85
  SLIDEW = 25
100
  palitra_yw = DRAWY shl 16 + palitra_w
86
 
101
 
87
START:
102
START:
88
    mcall   SF_SYS_MISC,SSF_HEAP_INIT ; ¨­¨æ¨ «¨§ æ¨ï ªãç¨
103
    mcall   SF_SYS_MISC,SSF_HEAP_INIT ; ¨­¨æ¨ «¨§ æ¨ï ªãç¨
Line 270... Line 285...
270
 
285
 
271
 
286
 
Line 272... Line 287...
272
    call    draw_palitra                  ; ˆ‘“…Œ €‹ˆ’“
287
    call    draw_palitra                  ; ˆ‘“…Œ €‹ˆ’“
Line 273... Line 288...
273
    call    draw_result                   ; ˆ‘“…Œ …‡“‹œ’€’
288
    call    draw_result                   ; ˆ‘“…Œ …‡“‹œ’€’
274
 
289
 
275
    mcall   SF_DEFINE_BUTTON, <110,147>, , 0x07+BT_HIDE
290
    mcall   SF_DEFINE_BUTTON,  , , 0x07+BT_HIDE ; palitra
276
 
291
 
Line 294... Line 309...
294
 
309
 
295
    ; äã­ªæ¨ï 12: ®§­ ç ¥â, çâ® ¡ã¤¥â à¨á®¢ âìáï ®ª­®
310
    ; äã­ªæ¨ï 12: ®§­ ç ¥â, çâ® ¡ã¤¥â à¨á®¢ âìáï ®ª­®
296
    mcall SF_REDRAW,SSF_END_DRAW
311
    mcall SF_REDRAW,SSF_END_DRAW
Line 297... Line -...
297
    ret
-
 
298
 
-
 
299
proc DrawRectangle3D, _x:word, _w:word, _y:word, _h:word, color1:dword, color2:dword
-
 
300
    mov ebx,[_w]
-
 
301
    add ebx,[_x] ;âãâ â®ç­® ª ª ï-â® ¤¨çì... ­ã¦­® ¯¥à¥¯¨á âì :)
-
 
302
    shl ebx,16
-
 
303
    mov bx,1
-
 
304
    mov ecx,[_h]
-
 
305
    inc cx
-
 
306
    mov edx,[_color2]
-
 
307
    mcall SF_DRAW_RECT ; x+w,y,1,h+1,color2
-
 
308
    rol ebx,16
-
 
309
    sub bx,[_w]
-
 
310
    ror ebx,16
-
 
311
    dec cx
-
 
312
    mov edx,[_color1]
-
 
313
    mcall ;SF_DRAW_RECT x,y,1,h,color1
-
 
314
    mov bx,[_h]
-
 
315
    xchg bx,cx
-
 
316
    mcall ;SF_DRAW_RECT x,y,w,1,color1
-
 
317
    rol ecx,16
-
 
318
    add cx,[_h]
-
 
319
    ror ecx,16
-
 
320
    mov edx,[_color2]
-
 
321
    mcall ;SF_DRAW_RECT x,y+h,w,1,color2
312
    ret
Line 322... Line 313...
322
	ret 
313
 
323
endp
314
 
324
 
315
 
325
;#___________________________________________________________________________________________________
316
;#___________________________________________________________________________________________________
Line 331... Line 322...
331
    ;------------------------------------------------------------------------------------------------+
322
    ;------------------------------------------------------------------------------------------------+
332
    draw_left_panel:                      ; Žâà¨á®¢ª  ¡®ª®¢®© ¯ ­¥«¨  SL97:   á ¬®¬ ¤¥«¥ ¯à ¢®©.
323
    draw_left_panel:                      ; Žâà¨á®¢ª  ¡®ª®¢®© ¯ ­¥«¨  SL97:   á ¬®¬ ¤¥«¥ ¯à ¢®©.
333
    ;.................................................................................................
324
    ;.................................................................................................
334
    ; button_next_colorsheme
325
    ; button_next_colorsheme
335
    mcall   SF_DEFINE_BUTTON, , , 12+BT_HIDE
326
    mcall   SF_DEFINE_BUTTON, , , 12+BT_HIDE
-
 
327
 
336
    ; circle diagram
328
    ; palitra button                    ; ID = 14
337
    add     ecx,19 shl 16                 ; move rect
329
    mcall , ,(DRAWY+150) shl 16 + 21, 14+BT_HIDE
-
 
330
 
338
    add     edx,3                         ; ID = 15
331
    ; pipet button                        ; ID = 15
339
    mcall
332
    mcall , , (DRAWY+150) shl 16 + 21, 15+BT_HIDE
Line 340... Line 333...
340
 
333
 
341
    mov     ebx,[icons18bg]
334
    mov     ebx,[icons18bg]
342
    add     ebx,18*18*4*53
335
    add     ebx,18*18*4*53
Line 343... Line 336...
343
    mcall   SF_PUT_IMAGE_EXT, ebx, <18,18>, , 32, 0, 0
336
    mcall   SF_PUT_IMAGE_EXT, ebx, <18,18>, , 32, 0, 0
344
 
337
 
345
    add     ebx,18*18*4*(39-53)
338
    add     ebx,18*18*4*(39-53)
Line 346... Line 339...
346
    mov     edx,ICONX*65536+WIN_H-90
339
    mov     edx,(ICONX+2)*65536+WIN_H-90
347
    mcall
340
    mcall
348
    
341
 
349
    mov     ebx,[icons18]
342
    mov     ebx,[icons18]
Line -... Line 343...
-
 
343
    add     ebx,18*18*4*(53-1)
-
 
344
    sub     edx,40
-
 
345
    mcall
-
 
346
 
-
 
347
    stdcall DrawDeepRectangle, ICONX, DRAWY, 22, 22, [sc.work_light], [sc.work_dark]
-
 
348
 
350
    add     ebx,18*18*4*(52-39)
349
    stdcall DrawDeepRectangle, ICONX, DRAWY+110, 22, 22, [sc.work_light], [sc.work_dark]
Line 351... Line 350...
351
    sub     edx,40
350
 
352
    mcall
351
    stdcall DrawDeepRectangle, ICONX, DRAWY+150, 22, 22, [sc.work_light], [sc.work_dark]
353
    
352
 
354
    ;stdcall DrawRectangle3D ICONX, DRAWY, 22, 22, [sc.work_light], [sc.work_dark]   ;Leency: draw rectangle around the button, buggy now
353
    ;stdcall DrawRectangle3D, ICONX, DRAWY, 22, 22, [sc.work_light], [sc.work_dark]   ;Leency: draw rectangle around the button, buggy now
Line 393... Line 392...
393
 
392
 
394
 
393
 
395
    ;------------------------------------------------------------------------------------------------+
394
    ;------------------------------------------------------------------------------------------------+
396
    draw_bottom_panel:                    ; Žâà¨á®¢ª  ­¨¦­¥© ¯ ­¥«¨
395
    draw_bottom_panel:                    ; Žâà¨á®¢ª  ­¨¦­¥© ¯ ­¥«¨
Line 397... Line 396...
397
    ;.................................................................................................
396
    ;.................................................................................................
398
    mcall   SF_DEFINE_BUTTON, ((60+70) shl 16)+90, (225 shl 16)+16, 14, [sc.work_button]
397
    mcall   SF_DEFINE_BUTTON, ((60+70) shl 16)+90, ((WIN_H-26) shl 16)+16, 14, [sc.work_button]
399
 
398
 
Line 400... Line 399...
400
    add     ebx, 100 shl 16
399
    add     ebx, 100 shl 16
401
    add     edx, 2
400
    add     edx, 2
402
    int     0x40
401
    int     0x40
403
 
402
 
Line 404... Line 403...
404
    ; Write string
403
    ; Write string
405
    mov     ecx,[sc.work_text]            ; RGB
404
    mov     ecx,[sc.work_text]            ; RGB
Line 406... Line 405...
406
    or      ecx, 1 shl 31
405
    or      ecx, 1 shl 31
Line 415... Line 414...
415
 
414
 
416
    add     ebx, 108 shl 16
415
    add     ebx, 108 shl 16
417
    mov     edx, bground2
416
    mov     edx, bground2
Line 418... Line 417...
418
    int     0x40
417
    int     0x40
419
 
418
 
420
    mcall SF_DRAW_LINE, 4 shl 16+(380), (219) shl 16+219, 0x00666666
419
    mcall SF_DRAW_LINE, 4 shl 16+(WIN_W-14), (WIN_H-32) shl 16+(WIN_H-32), 0x00666666
Line 421... Line 420...
421
    ret                                   ; return
420
    ret                                   ; return
422
    ;.................................................................................................
421
    ;.................................................................................................
Line 557... Line 556...
557
      call    draw_result                   ; ‚뢮¤¨¬ १ã«ìâ â
556
      call    draw_result                   ; ‚뢮¤¨¬ १ã«ìâ â
558
    mouse_exit:
557
    mouse_exit:
559
    ret                                   ; ‚®§¢à é ¥¬ ã¯à ¢«¥­¨¥
558
    ret                                   ; ‚®§¢à é ¥¬ ã¯à ¢«¥­¨¥
560
;end_mouse_get----------------------------------------------------------------------------------------
559
;end_mouse_get----------------------------------------------------------------------------------------
Line 561... Line -...
561
 
-
 
562
draw_palitra:
-
 
563
    ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª
-
 
Line 564... Line -...
564
    ;mcall   SF_DRAW_RECT, 110 shl 16+148, 9 shl 16+148, [sc.work]
-
 
565
 
-
 
566
    cmp     [renmode],2
-
 
567
    je      cyrcle_draw
-
 
568
    ;cmp     [renmode],1
-
 
569
    ;je      picker_draw
-
 
570
    cmp     [renmode],0
-
 
Line 571... Line -...
571
    je      sheme_draw
-
 
572
    ret
-
 
573
 
-
 
574
    ;.................................................................................................
-
 
575
    ; Žâà¨á®¢ª  ªà㣮¢®© ¤¨ £à ¬¬ë
-
 
576
    ;.................................................................................................
-
 
577
    cyrcle_draw:
-
 
578
    ;mov     eax,13
-
 
579
    ;mov     edx,0x666666
-
 
580
    ;mov     ebx,108*65536+152
-
 
581
    ;mov     ecx,125*65536+33
-
 
582
    ;mcall
-
 
583
    ;mov     edx,0xF3F3F3
-
 
584
    ;mov     ebx,109*65536+150
-
 
585
    ;mov     ecx,126*65536+31
-
 
586
    ;mcall
-
 
587
 
-
 
588
    ;mov     eax,4                         ; 4 - ¢ë¢¥á⨠áâபã ⥪áâ  ¢ ®ª­®
-
 
589
    ;mov     ebx,115 shl 16+131            ; [ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [ª®®à¤¨­ â  ¯® ®á¨ y]
-
 
590
    ;mov     ecx,0x666666                  ; 0xX0RRGGBB (RR, GG, BB § ¤ îâ 梥â ⥪áâ )
-
 
591
    ;mov     edx,hint                      ; 㪠§ â¥«ì ­  ­ ç «® áâப¨
-
 
592
    ;mov     esi,24                        ; ¢ë¢®¤¨âì esi ᨬ¢®«®¢
-
 
593
    ;mcall
-
 
594
    ;mov     ebx,125 shl 16+144            ; [ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [ª®®à¤¨­ â  ¯® ®á¨ y]
-
 
595
    ;mov     edx,hint2                     ; 㪠§ â¥«ì ­  ­ ç «® áâப¨
-
 
596
    ;mov     esi,21                        ; ¢ë¢®¤¨âì esi ᨬ¢®«®¢
-
 
597
    ;mcall
-
 
598
 
-
 
599
    ;mov     edx,[color]
-
 
600
    ;mov     ebx,109*65536+150
-
 
601
    ;mov     ecx, 10*65536+150
-
 
602
    ;mcall
-
 
603
    call    mouse_local                   ; ¯®«ãç ¥¬ ª®®à¤¨­ âë ¬ëè¨ ®â­®á¨â¥«ì­® ®ª­ 
-
 
604
    mov     ecx, [mouse_x]                ; § ­®á¨¬ ¢ ॣ¨áâà
-
 
605
    mov     edx, [mouse_y]                ; § ­®á¨¬ ¢ ॣ¨áâà
-
 
606
    cmp     ecx, WIN_W-10
-
 
Line 607... Line -...
607
    jg      cyrcle_draw_2
-
 
608
    cmp     edx, WIN_H
-
 
609
    jle     end_cyrcle_draw
-
 
610
 
-
 
611
    cyrcle_draw_2:
-
 
612
        mcall   SF_SLEEP,10
-
 
613
    call    desktop_get
-
 
614
    call    mouse_global
-
 
615
 
-
 
616
    mov     ebx,112*65536+11
-
 
617
    mov     esi,0                         ; counter=8
-
 
618
    circle_loop:
-
 
619
      mov     ecx, 10*65536+11
-
 
620
      mov     edi,0
-
 
621
      circle_loop2:
-
 
622
        call    circle_pixel_read
-
 
623
        mcall   SF_DRAW_RECT
-
 
624
        add     ecx,11 shl 16
-
 
625
        inc     edi
-
 
626
        cmp     edi,13
-
 
627
        jne     circle_loop2
-
 
628
 
-
 
629
      add     ebx,11 shl 16
-
 
630
      inc     esi
-
 
631
      cmp     esi,13
-
 
632
      jne     circle_loop
-
 
633
 
-
 
634
    mcall   SF_DRAW_RECT, 177*65536+13, 76*65536+13, 0
-
 
635
    mov     ecx, [mouse_x]
-
 
636
    mov     edx, [mouse_y]
-
 
637
    inc     ecx
-
 
638
    inc     edx
-
 
639
    mov     ebx, edx
-
 
640
    imul    ebx, [desctop_w]
-
 
641
    add     ebx, ecx
-
 
642
    mcall   SF_GET_PIXEL
-
 
643
    mov     edx,eax
-
 
644
    mcall   SF_DRAW_RECT, 178*65536+11, 77*65536+11
-
 
645
    ret
-
 
646
    end_cyrcle_draw:
-
 
647
    mcall   SF_DRAW_RECT, 111*65536+145, 9*65536+145, 0x666666
-
 
648
    ret
-
 
649
 
-
 
650
    circle_pixel_read:
-
 
651
    push    ecx ebx
-
 
652
    mov     ecx, [mouse_x]
-
 
653
    mov     edx, [mouse_y]
-
 
654
    inc     ecx
-
 
655
    add     ecx, esi
-
 
656
    cmp     ecx, 6
-
 
657
    jl      _cpr_exit
-
 
658
    sub     ecx, 6
-
 
659
    inc     edx
-
 
660
    add     edx, edi
-
 
661
    cmp     edx, 6
-
 
662
    jl      _cpr_exit
-
 
663
    sub     edx, 6
-
 
664
 
-
 
665
    mov     ebx, edx
-
 
666
    imul    ebx, [desctop_w]
-
 
667
    add     ebx, ecx
-
 
668
    mcall   SF_GET_PIXEL
-
 
669
    mov     edx,eax
-
 
670
    pop     ebx ecx
-
 
671
    ret
-
 
672
 
-
 
Line 673... Line -...
673
    _cpr_exit:
-
 
674
    xor     edx,edx
-
 
675
    pop     ebx ecx
-
 
676
    ret
-
 
677
 
-
 
678
    ;picker_draw:
-
 
679
    ;ret
-
 
680
 
-
 
681
    ;.................................................................................................
-
 
682
    ; Žâà¨á®¢ª  ä®­  ¯®¤ ª­®¯ª¨
-
 
683
    ;.................................................................................................
-
 
684
    sheme_draw:
-
 
685
    mov     eax,SF_DRAW_RECT  ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª
-
 
686
    mov     edx,0x222222                  ; 梥â
-
 
687
    mov     ecx,9 shl 16+73               ;  ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
-
 
688
    mov     esi,2                         ; ‘ç¥â稪 «¨­¨© ¯®¤«®¦¥ª
-
 
689
    re_draw:
-
 
690
    mov     ebx,110 shl 16+73             ;  ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à]
-
 
691
    mov     edi,2                         ; ‘ç¥â稪 ª®«¨ç¥á⢠ ¯®¤«®¦¥ª
-
 
692
    for_fon_loop:
-
 
693
      int     0x40                        ; à¥à뢠­¨¥
-
 
694
      add     ebx,75 shl 16               ; ‘¬¥é ¥¬ ¯®«®¦¥­¨¥ «¨­¨¨ ¯® å
-
 
695
      dec     edi                         ; “¬¥­ìè ¥¬ áç¥â稪 ª­®¯®ª
-
 
696
      cmp     edi,0                       ; ‘à ¢­¨¢ ¥¬ á ­ã«¥¬
-
 
697
    jnz     for_fon_loop                  ; …᫨ ­¥ ­®«ì â® ¢ ­ ç «® 横« 
-
 
698
    dec     esi                           ; “¬¥­ìè ¥¬ ¥£®
-
 
699
    cmp     esi,0                         ; ‘à ¢­¨¢ ¥¬ á ­ã«¥¬
-
 
700
    mov     ecx,84 shl 16+73              ;  ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
-
 
701
    jnz     re_draw                       ; …᫨ ­¥ ­®«ì â® ¢ ­ ç «® 横« 
-
 
702
 
-
 
703
    ;.................................................................................................
-
 
704
    ; Žâà¨á®¢ª  ª­®¯®ª ¯® 横«ã
-
 
705
    ;.................................................................................................
-
 
706
    mov     eax,SF_DRAW_RECT  ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª
-
 
707
    mov     edx,0x0FFFFFFF                ; 梥â
-
 
708
    mov     esi,4                         ; ‘ç¥â稪 ª®«¨ç¥á⢠  ¡§ æ¥¢ (#4,8)
-
 
709
    mov     ebx,99 shl 16+8               ;  ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à]
-
 
710
    for_abz:
-
 
711
      ;;push    esi                       ; ‘®å࠭塞 §­ ç¥­¨¥ áç¥â稪  «¨­¨© ¢ á⥪
-
 
712
      cmp     esi,2
-
 
713
      jne     x2_line
-
 
714
      mov     ebx,99 shl 16+8
-
 
715
      x2_line:
-
 
716
      add     ebx,3 shl 16                ; ‘¬¥é ¥¬ ¯®«®¦¥­¨¥ «¨­¨¨ ¯® x
-
 
717
      mov     edi,8                       ; ‘ç¥â稪 ª®«¨ç¥á⢠ ª­®¯®ª ¢ áâப¥
-
 
718
      for_stolbik:
-
 
719
        push    edi                       ; ‘®å࠭塞 §­ ç¥­¨¥ áç¥â稪  «¨­¨© ¢ á⥪
-
 
720
        mov     edi,8                     ; ‘ç¥â稪 ª®«¨ç¥á⢠ ª­®¯®ª ¢ áâப¥
-
 
721
        mov     ecx,  1 shl 16+8          ;  ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
-
 
722
        cmp     esi,2
-
 
723
        jg      y2_line                   ; …᫨ ¡®«ìè¥ 4 â® ¨£­®à¨¬
-
 
724
        mov     ecx,76 shl 16+8
-
 
725
        y2_line:
-
 
726
        add     ebx,9 shl 16              ; ‘¬¥é ¥¬ ¯®«®¦¥­¨¥ «¨­¨¨ ¯® x
-
 
727
        for_loop:
-
 
728
          add     ecx,9 shl 16            ; ‘¬¥é ¥¬ ¯®«®¦¥­¨¥ «¨­¨¨ ¯® y
-
 
729
          int     0x40                    ; à¥à뢠­¨¥
-
 
730
          call    sub_red
-
 
731
          dec     edi                     ; “¬¥­ìè ¥¬ áç¥â稪 ª­®¯®ª
-
 
732
          cmp     edi,0                   ; ‘à ¢­¨¢ ¥¬ á ­ã«¥¬
-
 
733
          jnz     for_loop                ; …᫨ ­¥ ­®«ì â® ¢ ­ ç «® 横« 
-
 
734
      call    sub_green
-
 
735
      pop     edi                         ; ˆ­ ç¥ ¢®ááâ ­ ¢«¨¢ ¥¬ áç¥â稪 «¨­¨©
-
 
736
      dec     edi                         ; “¬¥­ìè ¥¬ ¥£®
-
 
737
      cmp     edi,0                       ; ‘à ¢­¨¢ ¥¬ á ­ã«¥¬
-
 
738
      jnz     for_stolbik                 ; …᫨ ­¥ ­®«ì â® ¢ ­ ç «® 横« 
-
 
739
    call    sub_blue
-
 
740
    ;;pop     esi                         ; ˆ­ ç¥ ¢®ááâ ­ ¢«¨¢ ¥¬ áç¥â稪 «¨­¨©
-
 
741
    dec     esi                           ; “¬¥­ìè ¥¬ ¥£®
-
 
742
    cmp     esi,0                         ; ‘à ¢­¨¢ ¥¬ á ­ã«¥¬
-
 
743
    jnz     for_abz                       ; …᫨ ­¥ ­®«ì â® ¢ ­ ç «® 横« 
-
 
744
    ret                                   ; ‚®§¢à é ¥¬ ã¯à ¢«¥­¨¥
-
 
745
;end_draw_palitra-------------------------------------------------------------------------------------
-
 
746
 
-
 
747
 
-
 
748
sub_red:
-
 
749
    ;.................................................................................................
-
 
750
    ;  áçñâ ᬥ饭¨© ªà á­®£® æ¢¥â  ¢ £¥­¥à æ¨¨ æ¢¥â  ¯ «¨âàë
-
 
751
    ;.................................................................................................
-
 
752
    push    eax
-
 
753
    mov     eax,[pnext]
-
 
754
  ;sub_red_0                              ; palitra
-
 
755
    cmp     al,0
-
 
756
    jne     sub_red_1
-
 
757
    sub     edx,0x40
-
 
758
    jmp     sub_red_e
-
 
759
  sub_red_1:                              ; random
-
 
760
    cmp     al,1
-
 
761
    jne     sub_red_2
-
 
762
    sub     edx,0x20
-
 
763
    jmp     sub_red_e
-
 
764
  sub_red_2:                              ; gree
-
 
765
    cmp     al,2
-
 
766
    jne     sub_red_3
-
 
767
    sub     edx,0x010101
-
 
768
    jmp     sub_red_e
-
 
769
  sub_red_3:                              ; red
-
 
770
    cmp     al,3
-
 
771
    jne     sub_red_4
-
 
772
    sub     edx,0x0101
-
 
773
    jmp     sub_red_e
-
 
774
  sub_red_4:                              ; green
-
 
775
    cmp     al,4
-
 
776
    jne     sub_red_5
-
 
777
    sub     edx,0x010001
-
 
778
    jmp     sub_red_e
-
 
779
  sub_red_5:                              ; blue
-
 
780
    cmp     al,5
-
 
781
    jne     sub_red_e
-
 
782
    sub     edx,0x010100
-
 
783
    jmp     sub_red_e
-
 
784
  sub_red_e:
-
 
785
    pop     eax
-
 
786
    ret                                   ; ‚®§¢à é ¥¬ ã¯à ¢«¥­¨¥
-
 
787
;end_sub_red------------------------------------------------------------------------------------------
-
 
788
 
-
 
789
sub_green:
-
 
790
    ;.................................................................................................
-
 
791
    ;  áçñâ ᬥ饭¨© ªà á­®£® æ¢¥â  ¢ £¥­¥à æ¨¨ æ¢¥â  ¯ «¨âàë
-
 
792
    ;.................................................................................................
-
 
793
    push    eax
-
 
794
    mov     eax,[pnext]
-
 
795
  ;sub_green_0
-
 
796
    cmp     al,0
-
 
797
    jne     sub_green_1
-
 
798
    sub     edx,0x4000
-
 
799
    jmp     sub_green_e
-
 
800
  sub_green_1:
-
 
801
    cmp     al,1
-
 
802
    jne     sub_green_e
-
 
803
    sub     edx,0x2000
-
 
804
    ;jmp     sub_green_e
-
 
805
  sub_green_e:
-
 
806
    pop     eax
-
 
807
    ret                                   ; ‚®§¢à é ¥¬ ã¯à ¢«¥­¨¥
-
 
808
;end_sub_green----------------------------------------------------------------------------------------
-
 
809
 
-
 
810
 
-
 
811
sub_blue:
-
 
812
    ;.................................................................................................
-
 
813
    ;  áçñâ ᬥ饭¨© ªà á­®£® æ¢¥â  ¢ £¥­¥à æ¨¨ æ¢¥â  ¯ «¨âàë
-
 
814
    ;.................................................................................................
-
 
815
    push    eax
-
 
816
    mov     eax,[pnext]
-
 
817
  ;sub_blue_0
-
 
818
    cmp     al,0
-
 
819
    jne     sub_blue_1
-
 
820
    sub     edx,0x600000
-
 
821
    jmp     sub_blue_e
-
 
822
  sub_blue_1:
-
 
823
    cmp     al,1
-
 
824
    jne     sub_blue_e
-
 
825
    sub     edx,0x400000
-
 
826
    ;jmp     sub_blue_e
-
 
827
  sub_blue_e:
-
 
828
    pop     eax
-
 
829
    ret                                   ; ‚®§¢à é ¥¬ ã¯à ¢«¥­¨¥
-
 
830
;end_sub_blue-----------------------------------------------------------------------------------------
-
 
831
 
-
 
832
draw_result:
-
 
833
    ;.................................................................................................
-
 
834
    ; ®«ìè ï à ¬ª  ¢ë¢®¤  १ã«ìâ â 
-
 
835
    ;.................................................................................................
-
 
836
    mcall   SF_DRAW_RECT, <4,110>, <9,219-18>, [sc.work_graph]
-
 
837
    mcall   , <5,110-2>, <10,219-20>, [sc.work_light]
-
 
838
 
-
 
839
    ;.................................................................................................
-
 
840
    ; Žâà¨á®¢ª  १ã«ìâ â  æ¢¥â  ¢ hex color2
-
 
841
    ;.................................................................................................
-
 
842
    mcall   , (16+2) shl 16+15, (16+8) shl 16+15, 0x222222
-
 
843
    ; color 2 - draw color
-
 
844
    mcall   , (17+2) shl 16+13, (17+8) shl 16+13, [color2]
-
 
845
    ; color 1 - draw fringle
-
 
846
    mcall   , (11+2) shl 16+15, (12+8) shl 16+15, 0x222222
-
 
847
    ; color 2 - draw color
-
 
848
    mcall   , (12+2) shl 16+13, (13+8) shl 16+13, [color]
-
 
849
 
-
 
850
    ; value - draw fringle
-
 
851
    mcall   , (34+2) shl 16+72, (16+4) shl 16+15+4, 0x222222
-
 
852
    ; value - draw background
-
 
853
    mcall   , (35+2) shl 16+70, (17+4) shl 16+13+4, 0xFFFFFF
-
 
854
 
-
 
855
    ; ”ã­ªæ¨ï 47 - ¢ë¢®¤ ç¨á«  ¢ ®ª­®
-
 
856
    ;ebx - ¯ à ¬¥âàë ¯à¥®¡à §®¢ ­¨ï ç¨á«  ¢ ⥪áâ (HEX)
-
 
857
    mcall   SF_DRAW_NUMBER, 256+8 shl 16, [color], <40,22>, 0x10000000, 0
-
 
858
 
-
 
859
    ; äã­ªæ¨ï 4: ­ ¯¨á âì ⥪áâ ¢ ®ª­¥
-
 
860
    ; edx - à¨á㥬 '#'
-
 
861
    ; esi - ¤«¨­  ⥪áâ  ¢ ¡ ©â å
-
 
862
    ;mcall   SF_DRAW_TEXT,38*65536+20,0,hex,1
-
 
863
 
-
 
864
    ;.................................................................................................
-
 
865
    ; Žâà¨á®¢ª  r g b §­ ç¥­¨©
-
 
866
    ;.................................................................................................
-
 
867
    call    get_spectr
-
 
868
 
-
 
869
    movzx   eax,[cred]                    ; ªà á­ë©
-
 
870
    mov     ebx,12*65536+196               ; [x ­ ç «ì­ë©] *65536 + [y ­ ç «ì­ë©]
-
 
871
    call    draw_value                    ; ¢ë¢®¤¨¬ १ã«ìâ â
-
 
872
 
-
 
873
    movzx   eax,[cgreen]                  ; §¥«¥­ë©
-
 
874
    mov     ebx,37*65536+196              ; [x ­ ç «ì­ë©] *65536 + [y ­ ç «ì­ë©]
-
 
875
    call    draw_value                    ; ¢ë¢®¤¨¬ १ã«ìâ â
-
 
876
 
-
 
877
    movzx   eax,[cblue]                   ; ᨭ¨©
-
 
878
    mov     ebx,62*65536+196              ; [x ­ ç «ì­ë©] *65536 + [y ­ ç «ì­ë©]
-
 
879
    call    draw_value                    ; ¢ë¢®¤¨¬ १ã«ìâ â
-
 
880
 
-
 
881
    movzx   eax,[calpha]                  ;  «ìä 
-
 
882
    mov     ebx,87*65536+196              ; [x ­ ç «ì­ë©] *65536 + [y ­ ç «ì­ë©]
-
 
883
    call    draw_value                    ; ¢ë¢®¤¨¬ १ã«ìâ â
-
 
884
 
-
 
885
    ;.................................................................................................
-
 
886
    ; ‚뢮¤¨¬ ¡ãª¢ë r g b a
-
 
887
    ;.................................................................................................
-
 
888
    mov     eax,SF_DRAW_TEXT  ; 4 - ¢ë¢¥á⨠áâபã ⥪áâ  ¢ ®ª­®
-
 
889
    mov     ebx,17 shl 16+DRAWY+37              ; [ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [ª®®à¤¨­ â  ¯® ®á¨ y]
-
 
890
    mov     ecx, 0x10000000               ; 0xX0RRGGBB (RR, GG, BB § ¤ îâ 梥â ⥪áâ )
-
 
891
    add     ecx, [sc.work_text]
-
 
892
    mov     edx,cname                     ; 㪠§ â¥«ì ­  ­ ç «® áâப¨
-
 
893
    mov     esi,1                         ; ¢ë¢®¤¨âì esi ᨬ¢®«®¢
-
 
894
    newline:                              ; 横«
-
 
895
      int     0x40                        ; à¥à뢠­¨¥
-
 
896
      add     ebx,25 shl 16               ; „®¡ ¢«ï¥¬
-
 
897
      inc     edx                         ; „®¡ ¢«ï¥¬
-
 
898
      cmp     [edx],byte 'x'              ; ‘à ¢­¥­¨¥ á ¡ ©â®¬ å
-
 
899
    jne    newline                        ; …᫨ ­¥ ­ã«ì ¨«¨ ­¥ à ¢­®
-
 
Line 900... Line 560...
900
 
560
 
901
    ;.................................................................................................
561
 
902
    ; Žâà¨á®¢ª  á« ©¤¥à®¢
562
 
903
    ;.................................................................................................
563