; "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman ; Ken Silverman's official web site: "http://www.advsys.net/ken" ; See the included license file "BUILDLIC.TXT" for license info. ; This file has been modified from Ken Silverman's original release SECTION .data %ifndef M_TARGET_LINUX %define ylookup _ylookup %define vplce _vplce %define vince _vince %define palookupoffse _palookupoffse %define bufplce _bufplce %define dc_iscale _dc_iscale %define dc_colormap _dc_colormap %define dc_count _dc_count %define dc_dest _dc_dest %define dc_source _dc_source %define dc_texturefrac _dc_texturefrac %define setupvlineasm _setupvlineasm %define prevlineasm1 _prevlineasm1 %define vlineasm1 _vlineasm1 %define vlineasm4 _vlineasm4 %endif EXTERN ylookup ; near EXTERN vplce ; near EXTERN vince ; near EXTERN palookupoffse ; near EXTERN bufplce ; near EXTERN dc_iscale EXTERN dc_colormap EXTERN dc_count EXTERN dc_dest EXTERN dc_source EXTERN dc_texturefrac SECTION .text ALIGN 16 GLOBAL setvlinebpl_ setvlinebpl_: mov dword [fixchain1a+2], eax mov dword [fixchain1b+2], eax mov dword [fixchain2a+2], eax ret ; pass it log2(texheight) ALIGN 16 GLOBAL setupvlineasm setupvlineasm: mov ecx, [esp+4] ;First 2 lines for VLINEASM1, rest for VLINEASM4 mov byte [premach3a+2], cl mov byte [mach3a+2], cl mov byte [machvsh1+2], cl ;32-shy mov byte [machvsh3+2], cl ;32-shy mov byte [machvsh5+2], cl ;32-shy mov byte [machvsh6+2], cl ;32-shy mov ch, cl sub ch, 16 mov byte [machvsh8+2], ch ;16-shy neg cl mov byte [machvsh7+2], cl ;shy mov byte [machvsh9+2], cl ;shy mov byte [machvsh10+2], cl ;shy mov byte [machvsh11+2], cl ;shy mov byte [machvsh12+2], cl ;shy mov eax, 1 shl eax, cl dec eax mov dword [machvsh2+2], eax ;(1<>sh) ;vplc3 = (ebp<<(32-sh))+((edx&65535)<<(16-sh)) machvsh5: shl esi, 88h ;32-sh mov eax, edx machvsh6: shl ebp, 88h ;32-sh and edx, 0000ffffh machvsh7: shr eax, 88h ;sh add esi, eax machvsh8: shl edx, 88h ;16-sh add ebp, edx mov dword [vplce+12], esi mov dword [vplce+4], ebp pop edi pop esi pop ebx pop ebp ret