Re: Pixel optim
- Posted by mic _ <stabmaster_ at HOTMAIL.COM> Nov 26, 2000
- 360 views
>From: Alexander <Carnivals at INAME.COM> >Anyway, do anyone know a >optimization for this code?: Just a very basic transcopy routine. doesn't do clipping or much of anything.. procedure transcopy(integer x, integer y, integer width, integer height, integer trans, atom src, atom dest) integer src_offset integer pix src_offset = 0 dest += (y*SCREEN_WIDTH)+x for i = 1 to height do for j = 0 to width - 1 do pix = peek(src + src_offset) if pix!=trans then poke(dest + j, pix) end if src_offset += 1 end for dest += SCREEN_WIDTH end for end procedure but if you really want speed the you might want to do this in assembly, or check out some of the other graphics libraries available. _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com