1 ; THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
\r
2 ; SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
\r
3 ; END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
\r
4 ; ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
\r
5 ; IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
\r
6 ; SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
\r
7 ; FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
\r
8 ; CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
\r
9 ; AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
\r
10 ; COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
\r
18 include psmacros.inc
\r
21 assume cs:_TEXT, ds:_DATA
\r
23 _DATA segment dword public USE32 'DATA'
\r
25 rcsid db "$Id: winckpit.asm,v 1.1.1.1 2001-01-19 03:30:15 bradleyb Exp $"
\r
32 _TEXT segment dword public USE32 'CODE'
\r
34 ; gr_winckpit_blt_span
\r
35 ; blts a span region from source to dest buffer given a span
\r
40 ; ESI = bm_data source at start of y
\r
41 ; EDI = bm_data dest
\r
43 PUBLIC gr_winckpit_blt_span
\r
44 gr_winckpit_blt_span:
\r
48 inc ecx ; Better for counting and testing
\r
51 mov al, [esi+ebx] ; else blt odd pixel then check right
\r
62 ; gr_winckpit_blt_span_long
\r
63 ; blts a span region from source to dest buffer given a span
\r
65 ; This uses word optimization, and should be used for spans longer
\r
66 ; than 10 pixels, and can't be used for spans of 3 pixels or less.
\r
70 ; ESI = bm_data source at start of y
\r
71 ; EDI = bm_data dest
\r
73 PUBLIC gr_winckpit_blt_span_long
\r
74 gr_winckpit_blt_span_long:
\r
76 ; EDX = right word boundary
\r
80 inc ecx ; Better for counting and testing
\r
81 mov edx, ecx ; Current right word boundary
\r
83 test ebx, 1 ; is left boundary odd?
\r
84 jz TestRightBound ; if even check right boundary.
\r
86 mov al, [esi+ebx] ; else blt odd pixel then check right
\r
90 ; Assured even left boundary and find right word boundary.
\r
93 test ecx, 1 ; if even, then we have an even bound
\r
95 dec edx ; if odd, force even boundary
\r
99 ; This is a word only blt. No odd pixels.
\r
103 mov [edi+ebx], ax ; straight out blt.
\r
105 cmp ebx, edx ; do up to right word boundary
\r
110 ; Blts word span and odd right byte is needed.
\r
114 mov [edi+ebx], ax ; straight out blt.
\r
116 cmp ebx, edx ; do up to right word boundary
\r
118 mov al, [esi+ebx] ; blt right odd pixel.
\r