2014-12-16 04:53:56 +00:00
|
|
|
; int DEFCONV pi_slot_load(int slot, char *fn)
|
|
|
|
proc_defconv pi_slot_load
|
|
|
|
arg @@slot:word, @@fn:dword
|
|
|
|
local @@ret
|
2014-11-18 16:56:13 +00:00
|
|
|
|
|
|
|
push si
|
2014-12-16 04:53:56 +00:00
|
|
|
mov si, @@slot
|
2014-11-18 16:56:13 +00:00
|
|
|
if GAME ge 3
|
|
|
|
mov ax, si
|
|
|
|
imul ax, size PiHeader
|
|
|
|
add ax, offset pi_slot_headers
|
|
|
|
push ds
|
|
|
|
push ax
|
|
|
|
mov bx, si
|
|
|
|
shl bx, 2
|
2014-11-19 11:09:22 +00:00
|
|
|
pushd pi_slot_buffers[bx]
|
2014-11-18 16:56:13 +00:00
|
|
|
call graph_pi_free
|
|
|
|
endif
|
2014-12-16 04:53:56 +00:00
|
|
|
pushd @@fn
|
2014-11-18 16:56:13 +00:00
|
|
|
mov ax, si
|
|
|
|
imul ax, size PiHeader
|
|
|
|
add ax, offset pi_slot_headers
|
|
|
|
push ds
|
|
|
|
push ax
|
|
|
|
mov ax, si
|
|
|
|
shl ax, 2
|
|
|
|
add ax, offset pi_slot_buffers
|
|
|
|
push ds
|
|
|
|
push ax
|
|
|
|
call graph_pi_load_pack
|
2014-12-16 04:53:56 +00:00
|
|
|
mov @@ret, ax
|
2014-11-18 16:56:13 +00:00
|
|
|
pop si
|
|
|
|
ret
|
|
|
|
pi_slot_load endp
|