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
|
2015-02-21 13:12:22 +00:00
|
|
|
add ax, offset _pi_slot_headers
|
2014-11-18 16:56:13 +00:00
|
|
|
push ds
|
|
|
|
push ax
|
|
|
|
mov bx, si
|
|
|
|
shl bx, 2
|
2015-02-21 13:12: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
|
2015-02-21 13:12:22 +00:00
|
|
|
add ax, offset _pi_slot_headers
|
2014-11-18 16:56:13 +00:00
|
|
|
push ds
|
|
|
|
push ax
|
|
|
|
mov ax, si
|
|
|
|
shl ax, 2
|
2015-02-21 13:12:22 +00:00
|
|
|
add ax, offset _pi_slot_buffers
|
2014-11-18 16:56:13 +00:00
|
|
|
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
|
2015-02-21 13:12:22 +00:00
|
|
|
endp_defconv
|