code clip
	mov edi,[xy]
	mov ecx,edi
	test cx,cx
	jns .1
	xor ecx,ecx
.1	and ecx,0xffff
	imul ecx,dword [hp]		;320*2 for 16-bit gfx
	sar edi,16
	jns .2
	xor edi,edi
.2	lea edi,[edi+ecx]	;edi*2 for 16-bit
      add edi,dword [frame]
next
