Subversion Repositories Kolibri OS

Rev

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

Rev 109 Rev 485
Line 59... Line 59...
59
    dd     I_END+(SCREEN_X*SCREEN_Y*3+50000)   ; à §¬¥à ¯ ¬ï⨠¤«ï ¯à®££à ¬¬ë
59
    dd     I_END+(SCREEN_X*SCREEN_Y*3+50000)   ; à §¬¥à ¯ ¬ï⨠¤«ï ¯à®££à ¬¬ë
60
    dd     I_END+(SCREEN_X*SCREEN_Y*3+10000)   ; esp
60
    dd     I_END+(SCREEN_X*SCREEN_Y*3+10000)   ; esp
61
    dd     0x0 , 0x0               ; I_Param , I_Icon
61
    dd     0x0 , 0x0               ; I_Param , I_Icon
Line 62... Line 62...
62
 
62
 
-
 
63
include 'lang.inc'
63
include 'lang.inc'
64
include '..\..\..\macros.inc'
64
include 'ascgl.inc'
65
include 'ascgl.inc'
Line 65... Line 66...
65
include 'ascl.inc'
66
include 'ascl.inc'
66
 
67
 
Line 269... Line 270...
269
 
270
 
270
;Initalize keyboard
271
;Initalize keyboard
271
    mov  eax,66
272
    mov  eax,66
272
    mov  ebx,1
273
    mov  ebx,1
273
    mov  ecx,1
274
    mov  ecx,1
Line 274... Line 275...
274
    int  0x40
275
    mcall
275
 
276
 
276
    mov  eax,26
277
    mov  eax,26
277
    mov  ebx,2
278
    mov  ebx,2
278
    mov  ecx,1
279
    mov  ecx,1
Line 279... Line 280...
279
    mov  edx,keymap+100
280
    mov  edx,keymap+100
280
    int  0x40
281
    mcall
281
 
282
 
282
;Build triangle matrix
283
;Build triangle matrix
Line 382... Line 383...
382
 
383
 
383
 
384
 
384
;Main loop
385
;Main loop
385
still:                          ; ®á­®¢­®© 横«
386
still:                          ; ®á­®¢­®© 横«
Line 386... Line 387...
386
    mov  eax,11                 ; ¯à®¢¥àª  á®áâ®ï­¨ï ®ª­ 
387
    mov  eax,11                 ; ¯à®¢¥àª  á®áâ®ï­¨ï ®ª­ 
387
    int  0x40
388
    mcall
388
 
389
 
389
    cmp  eax,1                  ; ®ª­® ᤢ¨­ã«¨ ¥£® ­ã¦­® ¯¥à¥à¨á®¢ âì
390
    cmp  eax,1                  ; ®ª­® ᤢ¨­ã«¨ ¥£® ­ã¦­® ¯¥à¥à¨á®¢ âì
Line 488... Line 489...
488
    mov  eax,4                     ; function 4 : write text to window
489
    mov  eax,4                     ; function 4 : write text to window
489
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
490
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
490
    mov  ecx,0x0000ff00            ; font 1 & color ( 0xF0RRGGBB )
491
    mov  ecx,0x0000ff00            ; font 1 & color ( 0xF0RRGGBB )
491
    mov  edx,keymap                ; pointer to text beginning
492
    mov  edx,keymap                ; pointer to text beginning
492
    mov  esi,100       ; text length
493
    mov  esi,100       ; text length
493
    int  0x40
494
    mcall
494
    add  edx,100
495
    add  edx,100
495
    add  ebx,10
496
    add  ebx,10
496
    mov  esi,60       ; text length
497
    mov  esi,60       ; text length
497
    mov  ecx,0x00dddddd            ; font 1 & color ( 0xF0RRGGBB )
498
    mov  ecx,0x00dddddd            ; font 1 & color ( 0xF0RRGGBB )
498
    int  0x40
499
    mcall
499
    mov  edx,usemap
500
    mov  edx,usemap
500
    mov  esi,60       ; text length
501
    mov  esi,60       ; text length
501
    mov  ecx,0x0000ff00
502
    mov  ecx,0x0000ff00
502
    int  0x40
503
    mcall
503
    jmp rx
504
    jmp rx
504
          ;01234567890123456789012345678901234567890123456789
505
          ;01234567890123456789012345678901234567890123456789
505
usemap db ' E               wer  u   []  asd           zxc   '
506
usemap db ' E               wer  u   []  asd           zxc   '
506
       db '                                                  '
507
       db '                                                  '
507
rx:
508
rx:
Line 719... Line 720...
719
    call draw_window
720
    call draw_window
720
    jmp  still
721
    jmp  still
Line 721... Line 722...
721
 
722
 
722
  key:                          ; key
723
  key:                          ; key
723
    mov  eax,2                  ; just read it and ignore
724
    mov  eax,2                  ; just read it and ignore
Line 724... Line 725...
724
    int  0x40
725
    mcall
725
 
726
 
726
    shr eax,8
727
    shr eax,8
Line 745... Line 746...
745
 
746
 
Line 746... Line 747...
746
    jmp still ; cycle
747
    jmp still ; cycle
747
 
748
 
748
  button:                       ; button
749
  button:                       ; button
749
    mov  eax,17                 ; get id
750
    mov  eax,17                 ; get id
750
    int  0x40
751
    mcall
751
    cmp ah,1
752
    cmp ah,1
Line 752... Line 753...
752
    jz exit
753
    jz exit
753
    jmp  cycle
754
    jmp  cycle
754
 
755
 
Line 755... Line 756...
755
exit:
756
exit:
756
    mov eax,-1
757
    or eax,-1
757
    int 0x40
758
    mcall
Line 758... Line 759...
758
 
759
 
759
;   *********************************************
760
;   *********************************************
760
;   *******  WINDOW DEFINITIONS AND DRAW ********
761
;   *******  WINDOW DEFINITIONS AND DRAW ********
761
;   *********************************************
762
;   *********************************************
762
 
763
 
763
draw_window:
764
draw_window:
764
    mov  eax,12                    ; function 12:tell os about windowdraw
765
    mov  eax,12                    ; function 12:tell os about windowdraw
765
    mov  ebx,1                     ; 1, start of draw
766
    mov  ebx,1                     ; 1, start of draw
766
    int  0x40
767
    mcall
767
                                   ; DRAW WINDOW
768
                                   ; DRAW WINDOW
768
    mov  eax,0                     ; function 0 : define and draw window
769
    mov  eax,0                     ; function 0 : define and draw window
769
    mov  ebx,0*65536+SCREEN_X-1         ; [x start] *65536 + [x size]
770
    mov  ebx,0*65536+SCREEN_X-1         ; [x start] *65536 + [x size]
770
    mov  ecx,0*65536+SCREEN_Y-1         ; [y start] *65536 + [y size]
771
    mov  ecx,0*65536+SCREEN_Y-1         ; [y start] *65536 + [y size]
771
    mov  edx,0x03ffffff            ; color of work area RRGGBB,8->color gl
772
    mov  edx,0x03ffffff            ; color of work area RRGGBB,8->color gl
772
    mov  esi,0x005080d0            ; color of grab bar  RRGGBB,8->color gl
773
    mov  esi,0x005080d0            ; color of grab bar  RRGGBB,8->color gl
773
    mov  edi,0x005080d0            ; color of frames    RRGGBB
774
    mov  edi,0x005080d0            ; color of frames    RRGGBB
774
    int  0x40
775
    mcall
775
                                   ; WINDOW LABEL
776
                                   ; WINDOW LABEL
776
    mov  eax,4                     ; function 4 : write text to window
777
    mov  eax,4                     ; function 4 : write text to window
Line 777... Line 778...
777
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
778
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
778
    mov  ecx,0x10ddeeff            ; font 1 & color ( 0xF0RRGGBB )
779
    mov  ecx,0x10ddeeff            ; font 1 & color ( 0xF0RRGGBB )
779
    mov  edx,labelt                ; pointer to text beginning
780
    mov  edx,labelt                ; pointer to text beginning
780
    mov  esi,labellen-labelt       ; text length
781
    mov  esi,labellen-labelt       ; text length
Line 781... Line 782...
781
    int  0x40
782
    mcall
782
 
783
 
783
    mov eax,12
784
    mov eax,12
784
    mov ebx,2
785
    mov ebx,2
785
    int 0x40
786
    mcall
786
    ret
787
    ret
787
 
788
 
Line 788... Line 789...
788
dispimg:
789
dispimg:
789
    mov eax,7
790
    mov eax,7
790
    mov ebx,I_END ;zbuffer
791
    mov ebx,I_END ;zbuffer
791
    mov ecx,SCREEN_X*65536+SCREEN_Y
792
    mov ecx,SCREEN_X*65536+SCREEN_Y
792
    xor edx,edx  ;0*65536+0
793
    xor edx,edx  ;0*65536+0
793
    int 0x40
794
    mcall
794
;    ret
795
;    ret
Line 795... Line 796...
795
 
796
 
796
    mov eax,8
797
    mov eax,8
797
    mov ebx,(SCREEN_X-30)*65536+20
798
    mov ebx,(SCREEN_X-30)*65536+20