2019-09-15 16:23:33 +00:00
|
|
|
; void pascal near bb_playchar_load(void);
|
|
|
|
public BB_PLAYCHAR_LOAD
|
2019-02-28 22:30:34 +00:00
|
|
|
bb_playchar_load proc near
|
|
|
|
push bp
|
|
|
|
mov bp, sp
|
2019-12-30 14:48:17 +00:00
|
|
|
les bx, _resident
|
2019-02-28 22:30:34 +00:00
|
|
|
mov al, es:[bx+12h]
|
|
|
|
les bx, _bb_playchar_bb_fn
|
|
|
|
mov es:[bx+2], al
|
2019-12-30 14:48:17 +00:00
|
|
|
les bx, _resident
|
2019-02-28 22:30:34 +00:00
|
|
|
les bx, _bb_playchar_cdg_fn
|
|
|
|
mov es:[bx+2], al
|
|
|
|
call file_ropen pascal, large [_bb_playchar_bb_fn]
|
|
|
|
call hmem_allocbyte pascal, BB_SIZE
|
|
|
|
mov _bb_playchar_seg, ax
|
|
|
|
call file_read pascal, ax, large BB_SIZE
|
|
|
|
call file_close
|
2019-09-15 14:22:36 +00:00
|
|
|
call cdg_load_single_noalpha pascal, 0, [_bb_playchar_cdg_fn], 0
|
2019-02-28 22:30:34 +00:00
|
|
|
pop bp
|
|
|
|
retn
|
|
|
|
bb_playchar_load endp
|
|
|
|
|
|
|
|
|
2019-09-15 16:23:33 +00:00
|
|
|
; void pascal near bb_playchar_free(void);
|
|
|
|
public BB_PLAYCHAR_FREE
|
2019-02-28 22:30:34 +00:00
|
|
|
bb_playchar_free proc near
|
|
|
|
push bp
|
|
|
|
mov bp, sp
|
|
|
|
cmp _bb_playchar_seg, 0
|
|
|
|
jz short @@ret
|
|
|
|
call hmem_free pascal, _bb_playchar_seg
|
|
|
|
mov _bb_playchar_seg, 0
|
|
|
|
|
|
|
|
@@ret:
|
|
|
|
pop bp
|
|
|
|
retn
|
|
|
|
bb_playchar_free endp
|