Ignore:
Timestamp:
Jul 3, 2002, 5:44:39 PM (23 years ago)
Author:
sandervl
Message:

MoveRect fixes (src & dest surfaces the same + overlap); fill fixes + optimizations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ddraw/asmutil.asm

    r8825 r8830  
    1 ; $Id: asmutil.asm,v 1.11 2002-07-02 10:38:40 sandervl Exp $
     1; $Id: asmutil.asm,v 1.12 2002-07-03 15:44:38 sandervl Exp $
    22
    33;
     
    20972097_MemFlip   ENDP
    20982098
     2099
     2100        public _ddmemfill16
     2101_ddmemfill16 proc near
     2102
     2103DEST      equ  [ebp+8]
     2104VALUE     equ  [ebp+12]
     2105BUF_LEN   equ  [ebp+16]
     2106
     2107        push   ebp
     2108        mov    ebp,esp
     2109        push   ecx
     2110        push   edi
     2111
     2112        mov    ecx, BUF_LEN
     2113        shr    ecx, 2           ;length in dwords
     2114
     2115        mov    edi, DEST
     2116        mov    eax, VALUE
     2117
     2118        cld
     2119        rep    stosd
     2120
     2121        mov    ecx,BUF_LEN
     2122        and    ecx,03h
     2123        shr    ecx, 1           ;length in words
     2124
     2125        rep    stosw
     2126
     2127        pop    edi
     2128        pop    ecx
     2129        pop    ebp
     2130        ret
     2131_ddmemfill16 endp
     2132
     2133        public _ddmemfill32
     2134_ddmemfill32 proc near
     2135
     2136DEST      equ  [ebp+8]
     2137VALUE     equ  [ebp+12]
     2138BUF_LEN   equ  [ebp+16]
     2139
     2140        push   ebp
     2141        mov    ebp,esp
     2142        push   ecx
     2143        push   edi
     2144
     2145        mov    ecx, BUF_LEN
     2146        shr    ecx, 2           ;length in dwords
     2147
     2148        mov    edi, DEST
     2149        mov    eax, VALUE
     2150
     2151        cld
     2152        rep    stosd
     2153
     2154        pop    edi
     2155        pop    ecx
     2156        pop    ebp
     2157        ret
     2158_ddmemfill32 endp
     2159
    20992160CODE32          ENDS
    21002161
Note: See TracChangeset for help on using the changeset viewer.