include	clib.inc
include	conio.inc

PPROC	rsreload, robj:dword, dobj:dword
	les	bx,dobj
	mov	ax,es:[bx]
	and	ax,_D_DOPEN
	jz	rsreload_end
	invoke	dlhide, dobj
	push	ax
	pushm	es:[bx.dl_wp]
	mov	ah,00h
	mov	al,es:[bx.dl_count]
	inc	ax
	shl	ax,3
	add	ax,2
	add	ax,word ptr robj
	push	word ptr robj+2
	push	ax
	mov	al,es:[bx.dl_rect.rc_col]
	mul	es:[bx.dl_rect.rc_row]
	test	es:[bx.dl_flag],_D_RESAT
	jz	@F
	or	ax,8000h
    @@:
	push	ax
	call	wcunzip
	invoke	dlinit, dobj
	pop	ax
	test	ax,ax
	jz	rsreload_end
	invoke	dlshow, dobj
    rsreload_end:
	ret
PEND	rsreload

	END
