2014-12-18 13:36:43 +00:00
|
|
|
proc_defconv pi_slot_put_interlace
|
|
|
|
arg @@x:word, @@y:word, @@slot:word
|
|
|
|
local @@row_num:word, @@row_buf:dword
|
|
|
|
|
|
|
|
push si
|
|
|
|
push di
|
|
|
|
mov si, @@y
|
|
|
|
mov di, @@slot
|
|
|
|
mov bx, di
|
|
|
|
shl bx, 2
|
2015-02-21 13:12:22 +00:00
|
|
|
mov ax, word ptr (_pi_slot_buffers+2)[bx]
|
|
|
|
mov dx, word ptr _pi_slot_buffers[bx]
|
2014-12-18 13:36:43 +00:00
|
|
|
mov word ptr @@row_buf+2, ax
|
|
|
|
mov word ptr @@row_buf, dx
|
|
|
|
mov @@row_num, 0
|
|
|
|
jmp short @@check
|
|
|
|
|
|
|
|
@@put:
|
|
|
|
push @@x
|
|
|
|
push si
|
|
|
|
pushd @@row_buf
|
|
|
|
mov bx, di
|
|
|
|
imul bx, size PiHeader
|
2015-02-21 13:12:22 +00:00
|
|
|
push _pi_slot_headers.PiHeader._xsize[bx]
|
2014-12-18 13:36:43 +00:00
|
|
|
call graph_pack_put_8
|
|
|
|
inc si
|
|
|
|
cmp si, 400
|
|
|
|
jl short @@next_row
|
|
|
|
sub si, 400
|
|
|
|
|
|
|
|
@@next_row:
|
|
|
|
mov bx, di
|
|
|
|
imul bx, size PiHeader
|
2015-02-21 13:12:22 +00:00
|
|
|
mov ax, _pi_slot_headers.PiHeader._xsize[bx]
|
2014-12-18 13:36:43 +00:00
|
|
|
add word ptr @@row_buf, ax
|
|
|
|
mov eax, @@row_buf
|
|
|
|
shr eax, 10h
|
|
|
|
mov dx, word ptr @@row_buf
|
|
|
|
shr dx, 4
|
|
|
|
add ax, dx
|
|
|
|
mov dx, word ptr @@row_buf
|
|
|
|
and dx, 0Fh
|
|
|
|
mov word ptr @@row_buf+2, ax
|
|
|
|
mov word ptr @@row_buf, dx
|
|
|
|
add @@row_num, 2
|
|
|
|
|
|
|
|
@@check:
|
|
|
|
mov bx, di
|
|
|
|
imul bx, size PiHeader
|
2015-02-21 13:12:22 +00:00
|
|
|
mov ax, _pi_slot_headers.PiHeader._ysize[bx]
|
2014-12-18 13:36:43 +00:00
|
|
|
cmp ax, @@row_num
|
|
|
|
ja short @@put
|
|
|
|
pop di
|
|
|
|
pop si
|
|
|
|
ret
|
2015-02-21 13:12:22 +00:00
|
|
|
endp_defconv
|