Subversion Repositories Kolibri OS

Rev

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

Rev 115 Rev 283
Line 707... Line 707...
707
        ret
707
        ret
Line 708... Line 708...
708
 
708
 
-
 
709
 
-
 
710
 
-
 
711
vesa12_putimage:
-
 
712
; ebx = pointer to image
-
 
713
; ecx = size [x|y]
-
 
714
; edx = coordinates [x|y]
Line 709... Line 715...
709
 
715
; ebp = pointer to 'get' function
710
 
716
; esi = pointer to 'init' function
711
vesa12_putimage:
717
; edi = parameter for 'get' function
Line 728... Line 734...
728
    mov   ecx,[0x3010]
734
    mov   ecx,[0x3010]
729
    add   eax,[ecx-twdw+WDATA.box.left]
735
    add   eax,[ecx-twdw+WDATA.box.left]
730
    add   ebx,[ecx-twdw+WDATA.box.top]
736
    add   ebx,[ecx-twdw+WDATA.box.top]
731
    push  eax
737
    push  eax
732
    mov   eax,ebx         ; y
738
    mov   eax,ebx         ; y
733
    mov   ebx,[0xfe08]
739
    mul   dword [0xfe08]
734
    mul   ebx
-
 
735
    pop   ecx
740
    pop   ecx
736
    add   eax,ecx         ; x
741
    add   eax,ecx         ; x
737
    add   eax,ecx
742
    add   eax,ecx
738
    add   eax,ecx
743
    add   eax,ecx
739
    cmp  [0xfbf1],byte 24     ; 24 or 32 bpp ? - x start
744
    cmp  [0xfbf1],byte 24     ; 24 or 32 bpp ? - x start
Line 745... Line 750...
745
    add  eax,[0xfe80]
750
    add  eax,[0xfe80]
746
    mov  edi,eax
751
    mov  edi,eax
Line 747... Line 752...
747
 
752
 
Line 748... Line 753...
748
    ; x size
753
    ; x size
749
 
-
 
750
    movzx eax,word [esp+6]
-
 
751
    mov   ecx,eax
-
 
752
    add   ecx,eax
-
 
753
    add   ecx,eax
-
 
754
    cmp   [0xfbf1],byte 24     ; 24 or 32 bpp ? - x size
-
 
755
    jz    pi24312
-
 
756
    add   ecx,eax
-
 
Line 757... Line 754...
757
 
754
 
758
  pi24312:
755
    movzx ecx,word [esp+6]
Line 759... Line 756...
759
 
756
 
Line 760... Line -...
760
    mov   esi,[esp+8]
-
 
761
    movzx ebx,word [esp+4]
757
    mov   esi,[esp+8]
762
 
758
    movzx ebx,word [esp+4]
763
    ; check limits while draw ?
759
 
764
 
-
 
765
    push  eax
760
    ; check limits while draw ?
766
    push  ecx
761
 
767
    mov  eax,[0x3010]
-
 
768
    mov  ecx,[eax+draw_data-0x3000+RECT.left]
762
    push  ecx
769
    cmp  ecx,0
763
    mov  eax,[0x3010]
770
    jnz  dbcblimitlset212
764
    cmp  dword [eax+draw_data-0x3000+RECT.left], 0
771
    mov  ecx,[eax+draw_data-0x3000+RECT.top]
765
    jnz  dbcblimitlset212
772
    cmp  ecx,0
766
    cmp  dword [eax+draw_data-0x3000+RECT.top], 0
773
    jnz  dbcblimitlset212
767
    jnz  dbcblimitlset212
774
    mov  ecx,[eax+draw_data-0x3000+RECT.right]
768
    mov  ecx,[eax+draw_data-0x3000+RECT.right]
775
    cmp  ecx,[0xfe00]
769
    cmp  ecx,[0xfe00]
776
    jnz  dbcblimitlset212
-
 
777
    mov  ecx,[eax+draw_data-0x3000+RECT.bottom]
770
    jnz  dbcblimitlset212
778
    cmp  ecx,[0xfe04]
771
    mov  ecx,[eax+draw_data-0x3000+RECT.bottom]
Line 779... Line 772...
779
    jnz  dbcblimitlset212
772
    cmp  ecx,[0xfe04]
Line 780... Line 773...
780
    pop  ecx
773
    jnz  dbcblimitlset212
781
    pop  eax
-
 
782
    push dword 0
774
    pop  ecx
Line 783... Line 775...
783
    jmp  dbcblimitlno212
775
    push 0
Line 784... Line 776...
784
 
776
    jmp  dbcblimitlno212
785
  dbcblimitlset212:
-
 
786
 
777
 
Line 787... Line 778...
787
    pop  ecx
778
  dbcblimitlset212:
Line 788... Line -...
788
    pop  eax
-
 
789
    push dword 1
-
 
790
 
-
 
791
  dbcblimitlno212:
-
 
792
 
-
 
793
    cmp  [0xfbf1],byte 24     ; 24 or 32 bpp ?
-
 
794
    jz   pi24bit12
-
 
795
    jmp  pi32bit12
-
 
796
 
-
 
797
  pi24bit12:
-
 
798
 
-
 
799
    cld
-
 
800
    push  eax
-
 
801
    push  ebx
779
 
Line 802... Line 780...
802
    push  edx
780
    pop  ecx
803
    xor   edx,edx
-
 
804
    mov   eax,ecx
781
    push 1
805
    mov   ebx,3
782
 
Line 806... Line -...
806
    div   ebx
-
 
807
    mov   ecx,eax
783
  dbcblimitlno212:
808
    pop   edx
784
 
809
    pop   ebx
785
    cmp  [0xfbf1],byte 24     ; 24 or 32 bpp ?
810
    pop   eax
786
    jnz  pi32bit12
811
 
787
 
812
  newpi12:
788
  pi24bit12:
813
 
789
 
Line 814... Line 790...
814
    push edi
790
  newpi12:
Line 815... Line 791...
815
    push esi
791
 
816
    push ecx
792
    push edi
817
    push ebx
793
    push ecx
-
 
794
    push ebx
-
 
795
 
818
 
796
      mov  edx,edi
819
      xor  edx,edx
797
      sub  edx,[0xfe80]
820
      mov  eax,edi
798
      mov  ebx,3
821
      sub  eax,[0xfe80]
799
      div  ebx
Line 822... Line 800...
822
      mov  ebx,3
800
      add  edx,WinMapAddress
Line 823... Line -...
823
      div  ebx
-
 
824
      add  eax,WinMapAddress
801
      mov  ebx,[0x3000]
-
 
802
      mov  bh,[esp+4*3]
825
      mov  ebx,[0x3000]
803
 
826
      mov  bh,[esp+4*4]
804
      np2412:
827
 
805
 
828
      np2412:
806
        cmp  bl,[edx]
-
 
807
        jnz  imp24no12
829
 
808
;        mov  eax,[esi]
830
        cmp  bl,[eax]
809
        push    dword [esp+4*3+20]
831
        jnz  imp24no12
810
        call    ebp
832
        mov  edx,[esi]
811
;        cmp  bh,0
833
        cmp  bh,0
812
;        jz   imp24yes12
834
        jz   imp24yes12
-
 
835
;        call dbcplimit
813
;        call dbcplimit
836
;        jnz  imp24no12
-
 
Line 837... Line 814...
837
 
814
;        jnz  imp24no12
Line 838... Line 815...
838
     imp24yes12:
815
 
839
 
816
     imp24yes12:
840
        push eax
817
 
841
        push edi
818
        push edi
842
        mov  eax,edi
819
        push eax
Line 843... Line 820...
843
        sub  eax,[0xfe80]
820
        mov  eax,edi
Line 844... Line 821...
844
        shr  eax,16
821
        sub  eax,[0xfe80]
845
        call set_bank
822
        shr  eax,16
846
        and  edi,0xffff
-
 
847
        add  edi,0xa0000
823
        call set_bank
Line 848... Line 824...
848
        mov  [edi],edx
824
        pop  eax
849
        shr  edx,2
-
 
850
        mov  [edi+2],dl
-
 
851
        sti
-
 
852
        pop  edi
-
 
853
        pop  eax
825
        and  edi,0xffff
854
 
-
 
855
     imp24no12:
826
        add  edi,0xa0000
Line 856... Line 827...
856
 
827
        mov  [edi],ax
Line 857... Line 828...
857
        inc  eax
828
        shr  eax,16
858
        add  esi,3
829
        mov  [edi+2],al
859
        add  edi,3
830
        pop  edi
Line 860... Line 831...
860
        dec  ecx
831
 
Line 861... Line -...
861
        jnz  np2412
-
 
862
 
-
 
863
      np24d12:
-
 
864
 
832
     imp24no12:
Line 865... Line 833...
865
     pop  ebx
833
 
866
     pop  ecx
-
 
867
     pop  esi
834
        inc  edx
868
     pop  edi
835
;        add  esi,3
Line 869... Line 836...
869
 
836
        add  edi,3
870
    add  edi,[0xfe08]
837
        dec  ecx
871
    xor  eax,eax
838
        jnz  np2412
872
    mov  ax,[esp+4+2+4]
839
 
873
    lea  eax,[eax+eax*2]
840
      np24d12:
874
    add  esi,eax
841
 
Line 875... Line 842...
875
    dec  ebx
842
     pop  ebx
Line 876... Line 843...
876
    jz   nonewpi12
843
     pop  ecx
877
    jmp  newpi12
844
     pop  edi
878
 
845
 
-
 
846
    add  edi,[0xfe08]
-
 
847
    dec  ebx
879
  nonewpi12:
848
    jnz  newpi12
880
 
849
 
881
    add  esp,7*4
850
  nonewpi12:
882
    mov  eax,0
851
 
Line 883... Line 852...
883
    ret
852
        pop     eax edx ecx ebx eax edi esi
Line 884... Line -...
884
 
-
 
885
 
853
        xor     eax, eax
-
 
854
        ret
886
  pi32bit12:
855
 
887
 
856
 
888
    cld
857
  pi32bit12:
889
    shr  ecx,2
858
 
-
 
859
   newpi3212:
890
 
860
 
891
   newpi3212:
-
 
892
 
861
    push edi
893
    push edi
-
 
894
    push esi
862
    push ecx
895
    push ecx
-
 
Line 896... Line 863...
896
    push ebx
863
    push ebx
Line 897... Line 864...
897
 
864
 
898
      mov  eax,edi
865
      mov  edx,edi
899
      sub  eax,[0xfe80]
866
      sub  edx,[0xfe80]
900
      shr  eax,2
867
      shr  edx,2
901
      add  eax,WinMapAddress
868
      add  edx,WinMapAddress
Line 902... Line 869...
902
      mov   ebx,[0x3000]
869
      mov   ebx,[0x3000]
Line 903... Line 870...
903
      mov   bh,[esp+4*4]
870
      mov   bh,[esp+4*3]
904
 
871
 
905
      np3212:
-
 
906
 
872
      np3212:
Line 907... Line 873...
907
        cmp  bl,[eax]
873
 
908
        jnz  imp32no12
-
 
909
        mov  edx,[esi]
-
 
910
        cmp  bh,0
-
 
911
        jz   imp32yes12
874
        cmp  bl,[edx]
912
;        call dbcplimit
-
 
913
;        jnz  imp32no12
875
        jnz  imp32no12
Line 914... Line 876...
914
 
876
;        mov  eax,[esi]
Line 915... Line 877...
915
      imp32yes12:
877
        push    dword [esp+4*3+20]
916
 
878
        call    ebp
917
        push eax
879
;        cmp  bh,0
Line 918... Line 880...
918
        push edi
880
;        jz   imp32yes12