Subversion Repositories Kolibri OS

Rev

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

Rev 2704 Rev 5824
Line 91... Line 91...
91
  left:
91
  left:
92
    cmp  [picks],edx               ; changed left color yet?
92
    cmp  [picks],edx               ; changed left color yet?
93
    jne  l1                        ; no, do it
93
    jne  l1                        ; no, do it
94
    jmp  still
94
    jmp  still
95
l1: mov  [picks],edx               ; update left pick color
95
l1: mov  [picks],edx               ; update left pick color
96
    call clear                     ; erase old text
-
 
97
    call draw_picks                ; redraw colors and text
96
    call draw_picks                ; redraw colors and text
98
    jmp  still
97
    jmp  still
99
  right:
98
  right:
100
    cmp  [picks+4],edx             ; changed right color yet?
99
    cmp  [picks+4],edx             ; changed right color yet?
101
    jne  r1                        ; no, do it
100
    jne  r1                        ; no, do it
102
    jmp  still
101
    jmp  still
103
r1: mov  [picks+4],edx             ; update right pick color
102
r1: mov  [picks+4],edx             ; update right pick color
104
    call clear                     ; erase old text
-
 
105
    call draw_picks                ; redraw colors and text
103
    call draw_picks                ; redraw colors and text
106
    jmp  still
104
    jmp  still
Line 107... Line 105...
107
 
105
 
108
  red:                             ; redraw
106
  red:                             ; redraw
Line 143... Line 141...
143
draw_window:
141
draw_window:
Line 144... Line 142...
144
 
142
 
Line 145... Line 143...
145
    mcall 12,1
143
    mcall 12,1
146
 
144
 
147
    mov  eax,0                     ; DRAW WINDOW
145
    mov  eax,0                     ; DRAW WINDOW
148
    mov  ebx,1*65536+200           ; [x start] *65536 + [x size]
146
    mov  ebx,1*65536+(200-1)       ; [x start] *65536 + [x size]
149
    mov  ecx,200*65536+240         ; [y start] *65536 + [y size]
147
    mov  ecx,200*65536+240         ; [y start] *65536 + [y size]
150
    mov  edx,0x14000000            ; work area color (type II)
148
    mov  edx,0x14000000            ; work area color (type II)
Line 225... Line 223...
225
    mov  edi,colors                ; color table
223
    mov  edi,colors                ; color table
226
    add  edi,eax                   ; add offset
224
    add  edi,eax                   ; add offset
227
    mov  ecx,[edi]                 ; save color 1
225
    mov  ecx,[edi]                 ; save color 1
228
    mov  ebx,0x60100               ; print 6 hex digits
226
    mov  ebx,0x60100               ; print 6 hex digits
229
    mov  edx,esi                   ; copy color
227
    mov  edx,esi                   ; copy color
230
    mov  esi,0xe1e1e1              ; use white
228
    mov  esi,0x40e1e1e1            ; use white
-
 
229
    xor  edi, edi
231
    mov  eax,47                    ; print number function
230
    mov  eax,47                    ; print number function
232
    mcall
231
    mcall
Line 233... Line 232...
233
 
232
 
Line 250... Line 249...
250
    dec  eax                       ; use 0 base
249
    dec  eax                       ; use 0 base
251
    mov  ecx,15                    ; string length
250
    mov  ecx,15                    ; string length
252
    mul  ecx                       ; calc pointer
251
    mul  ecx                       ; calc pointer
253
    mov  edx,names                 ; color table
252
    mov  edx,names                 ; color table
254
    add  edx,eax                   ; add offset
253
    add  edx,eax                   ; add offset
255
    mov  ecx,0xe1e1e1              ; color
254
    mov  ecx,0x40e1e1e1            ; color
256
    mov  esi,15
255
    mov  esi,15
-
 
256
    xor  edi, edi
257
    mov  eax,4                     ; print text function
257
    mov  eax,4                     ; print text function
258
    mcall
258
    mcall
Line 259... Line 259...
259
 
259
 
Line 260... Line -...
260
    ret
-
 
261
 
-
 
262
clear:
-
 
263
    mov  ebx,22*65536+36           ; x and width
-
 
264
    mov  ecx,196*65536+26          ; y and depth
-
 
265
    mov  edx,0x000000              ; color
-
 
266
    mov  eax,13                    ; draw bar funx
-
 
267
    mcall
-
 
268
    mov  ebx,96*65536+90           ; x and width
-
 
269
    mov  ecx,196*65536+26          ; y and depth
-
 
270
    mov  edx,0x000000              ; color
-
 
271
    mov  eax,13                    ; draw bar funx
-
 
272
    mcall
-
 
Line 273... Line 260...
273
 
260
    ret
274
    ret
261
 
275
 
262
 
276
help:
263
help:
277
	mcall 48,4
264
	mcall 48,4
278
	mov ecx, eax
265
	mov ecx, eax
Line 279... Line 266...
279
	shl ecx, 16
266
	shl ecx, 16
280
	add ecx, 236
267
	add ecx, 236
281
	sub ecx, eax
268
	sub ecx, eax
282
 
269
 
283
	
270
	
284
    mov  ebx,5*65536+191           ; x and width
271
    mov  ebx,5*65536+190           ; x and width