Subversion Repositories Kolibri OS

Rev

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

Rev 205 Rev 451
Line 13... Line 13...
13
 
13
 
14
  include 'lang.inc'
14
  include 'lang.inc'
Line 15... Line 15...
15
  include 'macros.inc'
15
  include 'macros.inc'
-
 
16
 
-
 
17
START:
-
 
18
    mov  eax,48
-
 
19
    mov  ebx,3
-
 
20
    mov  ecx,sc
Line 16... Line 21...
16
 
21
    mov  edx,sizeof.system_colors
17
START:
22
    mcall
Line 18... Line 23...
18
 
23
 
19
    call check_parameters
24
    call check_parameters
Line -... Line 25...
-
 
25
    call draw_window
20
    call draw_window
26
 
Line 21... Line 27...
21
 
27
    call load_texture
22
    call load_texture
28
    call draw_image
23
    call draw_image
29
 
Line 283... Line 289...
283
  mov ebp,[usearray]
289
  mov ebp,[usearray]
Line 284... Line 290...
284
 
290
 
285
 ylup:
291
 ylup:
Line 286... Line -...
286
    mov ebx,0
-
 
287
 
-
 
288
; call precalcbar
292
    mov ebx,0
289
 
293
 
290
 xlup:
294
 xlup:
291
  push edi
295
  push edi
Line 292... Line 296...
292
  mov edi, 0
296
  mov edi, 0
293
  mov esi, 512000000           ; abnormous initial value :)
297
  mov esi, 512000000           ; abnormous initial value :)
294
 
-
 
295
 pixlup:
298
 
296
   push esi
299
 pixlup:
297
;   add edi,4
300
   push esi
298
   mov eax,ebx                 ; evaluate first distance
301
   mov eax,ebx                 ; evaluate first distance
299
   sub eax, [ebp+edi]          ; x-x1
302
   sub eax, [ebp+edi]          ; x-x1
Line 317... Line 320...
317
   cmp [ebp+edi],dword 777
320
   cmp [ebp+edi],dword 777
318
   jne pixlup
321
   jne pixlup
Line 319... Line 322...
319
 
322
 
Line 320... Line -...
320
   mov eax,esi                 ; now evaluate color...
-
 
321
 
-
 
322
;   cmp eax,255*24
-
 
323
;   jbe ok2
-
 
324
;   imul eax,12
-
 
325
; ok2:
323
   mov eax,esi                 ; now evaluate color...
326
 
324
 
Line 327... Line 325...
327
   mov edi,24            ; 50 = max shaded distance
325
   mov edi,24            ; 50 = max shaded distance
328
   idiv edi
326
   idiv edi
Line 351... Line 349...
351
  neg eax
349
  neg eax
352
  add eax,256
350
  add eax,256
353
  nowrap:
351
  nowrap:
354
  ret
352
  ret
Line 355... Line -...
355
 
-
 
356
;precalcbar:
-
 
357
;  pusha
-
 
358
;  mov eax,1
-
 
359
;  mov ebx,ecx
-
 
360
;  add ebx,18
-
 
361
;  mov ecx,44
-
 
362
;  mov edx,0x00000060
-
 
363
;     bar:
-
 
364
;     add ecx,2
-
 
365
;     add edx,0x00020100
-
 
366
;     int 0x40
-
 
367
;     cmp ecx,298
-
 
368
;     jb bar
-
 
369
;  popa
-
 
370
;  ret
-
 
371
 
353
 
372
; *********************************************
354
; *********************************************
373
; ******* WINDOW DEFINITIONS AND DRAW *********
355
; ******* WINDOW DEFINITIONS AND DRAW *********
Line 374... Line 356...
374
; *********************************************
356
; *********************************************
Line 375... Line 357...
375
 
357
 
376
 
358
 
377
draw_image:
359
draw_image:
378
 
360
 
379
    mov  eax,7
361
    mov  eax,7
Line 380... Line 362...
380
    mov  ebx,0x40000
362
    mov  ebx,0x40000
Line 381... Line 363...
381
    mov  ecx,256*65536+255
363
    mov  ecx,256*65536+255
382
    mov  edx,19*65536+65;55
364
    mov  edx,14*65536+40;55
Line 383... Line 365...
383
    int  0x40
365
    int  0x40
384
 
366
 
Line 385... Line -...
385
    ret
-
 
386
 
-
 
387
 
-
 
388
y_add  equ  44 ; 30
-
 
389
y_s    equ  13
367
    ret
Line 390... Line 368...
390
 
368
 
391
y_add2 equ  340 ;325
369
 
392
set    equ  0 ;15
370
y_add  equ  19 ; 30
Line 393... Line 371...
393
 
371
y_s    equ  13
394
button_color     equ  0A0A0A0h ; 207090 306090h
372
 
395
wnd_color        equ  3B0B0B0h ; 34090B0h
373
y_add2 equ  315 ;325
396
 
374
set    equ  0 ;15
-
 
375
 
-
 
376
draw_window:
397
 
377
 
Line 398... Line 378...
398
draw_window:
378
    mov eax, 12                   ; tell os about draw
Line 399... Line 379...
399
 
379
    mov ebx, 1
400
    mov eax, 12                   ; tell os about draw
380
    int 0x40
401
    mov ebx, 1
381
 
402
    int 0x40
382
    xor eax, eax                    ; define and draw window
403
 
383
    mov ebx, 220*65536+293
404
    mov eax, 0                    ; define and draw window
384
    mov ecx, 50*65536+408
405
    mov ebx, 220*65536+293
385
    mov edx, [sc.work]
406
    mov ecx, 50*65536+408
386
    or  edx, 0x33000000
407
    mov edx, wnd_color
387
    mov edi, header
408
    int 0x40
388
    int 0x40
409
 
389
 
410
    call draw_image
390
    call draw_image
411
 
391
 
412
    mov  eax,8                     ; Blue button
392
    mov  eax,8                     ; Blue button
413
    mov  ebx,(set+195+27)*65536+17
393
    mov  ebx,(set+190+27)*65536+17
414
    mov  ecx,y_add*65536+y_s
394
    mov  ecx,y_add*65536+y_s
Line 415... Line 395...
415
    mov  edx,11
395
    mov  edx,11
416
    mov  esi,0x004444cc
396
    mov  esi,0x005555bb
417
    int  0x40
397
    int  0x40
418
    mov  eax,8                     ; Red button
398
    ;mov  eax,8                     ; Red button
419
    mov  ebx,(set+213+27)*65536+17
399
    mov  ebx,(set+208+27)*65536+17
420
    mov  edx,12
400
    mov  edx,12
Line 421... Line 401...
421
    mov  esi,0x00cc4444
401
    mov  esi,0x00bb5555
422
    int  0x40
402
    int  0x40
423
    mov  eax,8                     ; Green button
403
    ;mov  eax,8                     ; Green button
424
    mov  ebx,(set+258)*65536+17
404
    mov  ebx,(set+253)*65536+17
Line 425... Line -...
425
    mov  edx,13
-
 
426
    mov  esi,0x0044cc44
-
 
427
    int  0x40
-
 
428
 
405
    mov  edx,13
429
    mov  eax, 8                     ; tiled
-
 
430
    mov  ebx, 96*65536+63
-
 
431
    mov  ecx, y_add*65536+y_s
-
 
432
    mov  edx, 101
406
    mov  esi,0x0055bb55
433
    mov  esi, button_color
407
    int  0x40
434
    int  0x40
408
 
435
 
409
    ;mov  eax, 8                     ; tiled
436
    mov  eax, 8                     ; stretch
410
    mov  ebx, 90*65536+63
Line 437... Line 411...
437
    mov  ebx, 160*65536+61
411
    mov  ecx, y_add*65536+y_s
438
    mov  edx, 102
412
    mov  edx, 101
439
    int  0x40
413
    mov  esi, [sc.work_button]
440
 
414
    int  0x40
Line 441... Line 415...
441
    mov  eax, 4                    ; window header
415
 
442
    mov  ebx, 8*65536+8
416
    ;mov  eax, 8                     ; stretch
443
    mov  ecx, 0x10ffffff
417
    mov  ebx, 154*65536+61
444
    mov  edx, header
418
    mov  edx, 102
Line 445... Line 419...
445
    mov  esi, header.size
419
    int  0x40
446
    int  0x40
420
 
447
 
421
    mov  eax, 4
448
    mov  ebx, 220*65536+30
422
    mov  ebx, 215*65536+5
449
    mov  ecx, 0
423
    mov  ecx, [sc.work_text]
450
    mov  edx, apply_text
424
    mov  edx, apply_text
451
    mov  esi, apply_text.size
425
    mov  esi, apply_text.size
452
    int  0x40
426
    int  0x40
453
 
427
 
Line 476... Line 450...
476
 
450
 
477
 
451
 
478
    mov  edx, 34+4
452
    mov  edx, 34+4
479
    mov  edi, 4
453
    mov  edi, 4
480
    mov  eax, 8
454
    mov  eax, 8
481
    mov  ebx, 18*65536+18
455
    mov  ebx, 13*65536+18
482
    mov  ecx, y_add*65536+y_s
456
    mov  ecx, y_add*65536+y_s
483
  @@:
457
  @@:
484
    int  0x40
458
    int  0x40
Line 488... Line 462...
488
    jnz  @b
462
    jnz  @b
Line 489... Line 463...
489
 
463
 
490
 
464
 
491
    ;-----------------------
465
    ;-----------------------
492
    mov  edx,14                    ; button number
466
    mov  edx,14                            ; button number
Line 493... Line 467...
493
    mov  ebx,(18)*65536+17         ; button start x & size
467
    mov  ebx,(13)*65536+17                 ; button start x & size
494
    mov  ecx,(y_add2+40)*65536+14          ; button start y & size
468
    mov  ecx,(y_add2+40)*65536+14          ; button start y & size
Line 506... Line 480...
506
    cmp  edx,27
480
    cmp  edx,27
507
    jnz  newcb
481
    jnz  newcb
508
    ;-----------------------
482
    ;-----------------------
Line 509... Line 483...
509
 
483
 
510
    mov  eax, 4
484
    mov  eax, 4
511
    mov  ebx, 8*65536+4+y_add
485
    mov  ebx, 94*65536+4+y_add
512
    mov  ecx, 0
486
    mov  ecx, [sc.work_button_text]
513
    mov  edx, la2
487
    mov  edx, la2
514
    mov  esi, la2.size
488
    mov  esi, la2.size
Line 515... Line 489...
515
    int  0x40
489
    int  0x40
Line 522... Line 496...
522
 
496
 
Line 523... Line 497...
523
 
497
 
524
 
498
 
-
 
499
; DATA SECTION
525
; DATA SECTION
500
 
-
 
501
if lang eq ru
Line 526... Line 502...
526
 
502
    header db 'ƒ¥­¥à â®à ä®­  à ¡®ç¥£® á⮫ ',0
527
lsz header,\
503
else
528
    ru, "ƒ¥­¥à â®à ä®­  à ¡®ç¥£® á⮫ ",\
504
    header db 'Background',0
Line 668... Line 644...
668
 
644
 
Line 669... Line -...
669
 
-
 
670
     dd  0,248,64,128,128,64,196,48,160,160,94,224,240,96,5,5,777
645
 
Line 671... Line 646...
671
 
646
     dd  0,248,64,128,128,64,196,48,160,160,94,224,240,96,5,5,777
Line 672... Line -...
672
 
-
 
673
 
647
 
674
I_Param:
648
 
-
 
649
I_Param:
-
 
650
 
675
 
651
image: