Subversion Repositories Kolibri OS

Rev

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

Rev 2430 Rev 2435
Line 15... Line 15...
15
;;                                                              ;;
15
;;                                                              ;;
16
;;  See file COPYING for details                                ;;
16
;;  See file COPYING for details                                ;;
17
;;                                                              ;;
17
;;                                                              ;;
18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 19... Line 19...
19
 
19
 
Line 20... Line 20...
20
$Revision: 2430 $
20
$Revision: 2435 $
21
 
21
 
Line 241... Line 241...
241
;--------------------------------------
241
;--------------------------------------
242
; get process number
242
; get process number
243
        mov     ebx, [CURRENT_TASK]
243
        mov     ebx, [CURRENT_TASK]
244
        cmp     byte [ScreenBPP], 32
244
        cmp     byte [ScreenBPP], 32
245
        je      put_image_end_32
245
        je      put_image_end_32
-
 
246
;--------------------------------------
246
;put_image_end_24:
247
put_image_end_24:
247
        mov     edi, [putimg.real_sy]
248
        mov     edi, [putimg.real_sy]
-
 
249
        cmp     [_display.select_cursor], 0
-
 
250
        jne     put_image_end_24_new
248
;--------------------------------------
251
;--------------------------------------
249
align 4
252
align 4
250
.new_line:
253
.new_line:
251
        mov     ecx, [putimg.real_sx]
254
        mov     ecx, [putimg.real_sx]
252
;     push    ebp edx
-
 
253
;--------------------------------------
255
;--------------------------------------
254
align 4
256
align 4
255
.new_x:
257
.new_x:
256
        push    [putimg.edi]
258
        push    [putimg.edi]
257
        mov     eax, [putimg.ebp+4]
259
        mov     eax, [putimg.ebp+4]
Line 266... Line 268...
266
        shl     ecx, 16
268
        shl     ecx, 16
267
        add     ecx, [putimg.real_sy_and_abs_cy + 4]
269
        add     ecx, [putimg.real_sy_and_abs_cy + 4]
268
        sub     ecx, edi
270
        sub     ecx, edi
Line 269... Line 271...
269
 
271
 
270
; check mouse area for putpixel
272
; check mouse area for putpixel
271
        call    [_display.check_mouse]
273
        call    check_mouse_area_for_putpixel
272
        pop     ecx
274
        pop     ecx
273
; store to real LFB
275
; store to real LFB
274
        mov     [LFB_BASE+edx], ax
276
        mov     [LFB_BASE+edx], ax
275
        shr     eax, 16
277
        shr     eax, 16
276
        mov     [LFB_BASE+edx+2], al
278
        mov     [LFB_BASE+edx+2], al
277
;--------------------------------------
279
;--------------------------------------
278
align 4
280
align 4
279
.skip:
-
 
280
;     add     esi, 3 ;[putimg.source_bpp]
281
.skip:
281
        add     edx, 3
282
        add     edx, 3
282
        inc     ebp
283
        inc     ebp
283
        dec     ecx
284
        dec     ecx
284
        jnz     .new_x
-
 
-
 
285
        jnz     .new_x
285
;     pop     edx ebp
286
 
286
        add     esi, [putimg.line_increment]
287
        add     esi, [putimg.line_increment]
287
        add     edx, [putimg.screen_newline];[BytesPerScanLine]
288
        add     edx, [putimg.screen_newline];[BytesPerScanLine]
288
        add     ebp, [putimg.winmap_newline];[Screen_Max_X]
-
 
-
 
289
        add     ebp, [putimg.winmap_newline];[Screen_Max_X]
289
;     inc     ebp
290
 
290
        cmp     [putimg.ebp], putimage_get1bpp
291
        cmp     [putimg.ebp], putimage_get1bpp
291
        jz      .correct
292
        jz      .correct
292
        cmp     [putimg.ebp], putimage_get2bpp
293
        cmp     [putimg.ebp], putimage_get2bpp
293
        jz      .correct
294
        jz      .correct
Line 307... Line 308...
307
align 4
308
align 4
308
.finish:
309
.finish:
309
        add     esp, putimg.stack_data
310
        add     esp, putimg.stack_data
310
        popad
311
        popad
311
        ret
312
        ret
-
 
313
;--------------------------------------
-
 
314
align 4
-
 
315
put_image_end_24_new:
-
 
316
;--------------------------------------
-
 
317
align 4
-
 
318
.new_line:
-
 
319
        mov     ecx, [putimg.real_sx]
-
 
320
;--------------------------------------
-
 
321
align 4
-
 
322
.new_x:
-
 
323
        push    [putimg.edi]
-
 
324
        mov     eax, [putimg.ebp+4]
-
 
325
        call    eax
-
 
326
        cmp     [ebp], bl
-
 
327
        jne     .skip
-
 
328
;--------------------------------------
-
 
329
        push    ecx
-
 
330
        mov     ecx, [putimg.real_sy_and_abs_cy + 4]
-
 
331
        sub     ecx, edi
-
 
332
;--------------------------------------
-
 
333
; check for Y
-
 
334
        cmp     cx, [Y_UNDER_subtraction_CUR_hot_y]
-
 
335
        jb      .no_mouse_area
-
 
336
 
-
 
337
        cmp     cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
-
 
338
        jae     .no_mouse_area
-
 
339
 
-
 
340
        rol     ecx, 16
-
 
341
        add     ecx, [putimg.real_sx_and_abs_cx + 4]
-
 
342
        sub     ecx, [esp]
-
 
343
;--------------------------------------
-
 
344
; check for X
-
 
345
        cmp     cx, [X_UNDER_subtraction_CUR_hot_x]
-
 
346
        jb      .no_mouse_area
-
 
347
 
-
 
348
        cmp     cx, [X_UNDER_sub_CUR_hot_x_add_curh]
-
 
349
        jae     .no_mouse_area
-
 
350
;--------------------------------------
-
 
351
; check mouse area for putpixel
-
 
352
        call    check_mouse_area_for_putpixel_new.1
-
 
353
;--------------------------------------
-
 
354
align 4
-
 
355
.no_mouse_area:
-
 
356
        pop     ecx
-
 
357
; store to real LFB
-
 
358
        mov     [LFB_BASE+edx], ax
-
 
359
        shr     eax, 16
-
 
360
        mov     [LFB_BASE+edx+2], al
-
 
361
;--------------------------------------
-
 
362
align 4
-
 
363
.skip:
-
 
364
        add     edx, 3
-
 
365
        inc     ebp
-
 
366
        dec     ecx
-
 
367
        jnz     .new_x
-
 
368
 
-
 
369
        add     esi, [putimg.line_increment]
-
 
370
        add     edx, [putimg.screen_newline];[BytesPerScanLine]
-
 
371
        add     ebp, [putimg.winmap_newline];[Screen_Max_X]
-
 
372
 
-
 
373
        cmp     [putimg.ebp], putimage_get1bpp
-
 
374
        jz      .correct
-
 
375
        cmp     [putimg.ebp], putimage_get2bpp
-
 
376
        jz      .correct
-
 
377
        cmp     [putimg.ebp], putimage_get4bpp
-
 
378
        jnz     @f
-
 
379
;--------------------------------------
-
 
380
align 4
-
 
381
.correct:
-
 
382
        mov     eax, [putimg.edi]
-
 
383
        mov     byte [eax], 80h
-
 
384
;--------------------------------------
-
 
385
align 4
-
 
386
@@:
-
 
387
        dec     edi
-
 
388
        jnz     .new_line
-
 
389
        jmp     put_image_end_24.finish
312
;------------------------------------------------------------------------------
390
;------------------------------------------------------------------------------
313
align 4
391
align 4
314
put_image_end_32:
392
put_image_end_32:
315
        mov     edi, [putimg.real_sy]
393
        mov     edi, [putimg.real_sy]
-
 
394
        cmp     [_display.select_cursor], 0
-
 
395
        jne     put_image_end_32_new
316
;--------------------------------------
396
;--------------------------------------
317
align 4
397
align 4
318
.new_line:
398
.new_line:
319
        mov     ecx, [putimg.real_sx]
399
        mov     ecx, [putimg.real_sx]
320
;     push    ebp edx
-
 
321
;--------------------------------------
400
;--------------------------------------
322
align 4
401
align 4
323
.new_x:
402
.new_x:
324
        push    [putimg.edi]
403
        push    [putimg.edi]
325
        mov     eax, [putimg.ebp+4]
404
        mov     eax, [putimg.ebp+4]
Line 334... Line 413...
334
        shl     ecx, 16
413
        shl     ecx, 16
335
        add     ecx, [putimg.real_sy_and_abs_cy + 4]
414
        add     ecx, [putimg.real_sy_and_abs_cy + 4]
336
        sub     ecx, edi
415
        sub     ecx, edi
Line 337... Line 416...
337
 
416
 
338
; check mouse area for putpixel
417
; check mouse area for putpixel
339
        call    [_display.check_mouse]
418
        call    check_mouse_area_for_putpixel
340
        pop     ecx
419
        pop     ecx
341
; store to real LFB
420
; store to real LFB
342
        mov     [LFB_BASE+edx], eax
421
        mov     [LFB_BASE+edx], eax
343
;--------------------------------------
422
;--------------------------------------
344
align 4
423
align 4
345
.skip:
-
 
346
;     add     esi, [putimg.source_bpp]
424
.skip:
347
        add     edx, 4
425
        add     edx, 4
348
        inc     ebp
426
        inc     ebp
349
        dec     ecx
427
        dec     ecx
350
        jnz     .new_x
-
 
-
 
428
        jnz     .new_x
351
;     pop     edx ebp
429
 
352
        add     esi, [putimg.line_increment]
430
        add     esi, [putimg.line_increment]
353
        add     edx, [putimg.screen_newline];[BytesPerScanLine]
431
        add     edx, [putimg.screen_newline];[BytesPerScanLine]
354
        add     ebp, [putimg.winmap_newline];[Screen_Max_X]
-
 
-
 
432
        add     ebp, [putimg.winmap_newline];[Screen_Max_X]
355
;     inc     ebp
433
 
356
        cmp     [putimg.ebp], putimage_get1bpp
434
        cmp     [putimg.ebp], putimage_get1bpp
357
        jz      .correct
435
        jz      .correct
358
        cmp     [putimg.ebp], putimage_get2bpp
436
        cmp     [putimg.ebp], putimage_get2bpp
359
        jz      .correct
437
        jz      .correct
Line 375... Line 453...
375
        add     esp, putimg.stack_data
453
        add     esp, putimg.stack_data
376
        popad
454
        popad
377
        call    VGA__putimage
455
        call    VGA__putimage
378
        mov     [EGA_counter], 1
456
        mov     [EGA_counter], 1
379
        ret
457
        ret
-
 
458
;--------------------------------------
-
 
459
align 4
-
 
460
put_image_end_32_new:
-
 
461
;--------------------------------------
-
 
462
align 4
-
 
463
.new_line:
-
 
464
        mov     ecx, [putimg.real_sx]
-
 
465
;--------------------------------------
-
 
466
align 4
-
 
467
.new_x:
-
 
468
        push    [putimg.edi]
-
 
469
        mov     eax, [putimg.ebp+4]
-
 
470
        call    eax
-
 
471
        cmp     [ebp], bl
-
 
472
        jne     .skip
-
 
473
;--------------------------------------
-
 
474
        push    ecx
-
 
475
        mov     ecx, [putimg.real_sy_and_abs_cy + 4]
-
 
476
        sub     ecx, edi
-
 
477
;--------------------------------------
-
 
478
; check for Y
-
 
479
        cmp     cx, [Y_UNDER_subtraction_CUR_hot_y]
-
 
480
        jb      .no_mouse_area
-
 
481
 
-
 
482
        cmp     cx, [Y_UNDER_sub_CUR_hot_y_add_curh]
-
 
483
        jae     .no_mouse_area
-
 
484
 
-
 
485
        rol     ecx, 16
-
 
486
        add     ecx, [putimg.real_sx_and_abs_cx + 4]
-
 
487
        sub     ecx, [esp]
-
 
488
;--------------------------------------
-
 
489
; check for X
-
 
490
        cmp     cx, [X_UNDER_subtraction_CUR_hot_x]
-
 
491
        jb      .no_mouse_area
-
 
492
 
-
 
493
        cmp     cx, [X_UNDER_sub_CUR_hot_x_add_curh]
-
 
494
        jae     .no_mouse_area
-
 
495
;--------------------------------------
-
 
496
; check mouse area for putpixel
-
 
497
        call    check_mouse_area_for_putpixel_new.1
-
 
498
;--------------------------------------
-
 
499
align 4
-
 
500
.no_mouse_area:
-
 
501
        pop     ecx
-
 
502
; store to real LFB
-
 
503
        mov     [LFB_BASE+edx], eax
-
 
504
;--------------------------------------
-
 
505
align 4
-
 
506
.skip:
-
 
507
        add     edx, 4
-
 
508
        inc     ebp
-
 
509
        dec     ecx
-
 
510
        jnz     .new_x
-
 
511
 
-
 
512
        add     esi, [putimg.line_increment]
-
 
513
        add     edx, [putimg.screen_newline];[BytesPerScanLine]
-
 
514
        add     ebp, [putimg.winmap_newline];[Screen_Max_X]
-
 
515
 
-
 
516
        cmp     [putimg.ebp], putimage_get1bpp
-
 
517
        jz      .correct
-
 
518
        cmp     [putimg.ebp], putimage_get2bpp
-
 
519
        jz      .correct
-
 
520
        cmp     [putimg.ebp], putimage_get4bpp
-
 
521
        jnz     @f
-
 
522
;--------------------------------------
-
 
523
align 4
-
 
524
.correct:
-
 
525
        mov     eax, [putimg.edi]
-
 
526
        mov     byte [eax], 80h
-
 
527
;--------------------------------------
-
 
528
align 4
-
 
529
@@:
-
 
530
        dec     edi
-
 
531
        jnz     .new_line
-
 
532
        jmp     put_image_end_32.finish
380
;------------------------------------------------------------------------------
533
;------------------------------------------------------------------------------
381
align 4
534
align 4
382
__sys_putpixel:
535
__sys_putpixel:
Line 383... Line 536...
383
 
536