2020-08-20 19:59:45 +00:00
|
|
|
; Displays the CDG image in the given [slot] at (⌊left/8⌋*8, top),
|
|
|
|
; disregarding its alpha plane.
|
2017-01-14 12:24:49 +00:00
|
|
|
|
2020-08-20 19:59:45 +00:00
|
|
|
; void pascal cdg_put_noalpha(screen_x_t left, vram_y_t top, int slot);
|
2019-09-15 16:23:33 +00:00
|
|
|
public CDG_PUT_NOALPHA
|
2019-09-15 14:22:36 +00:00
|
|
|
cdg_put_noalpha proc far
|
2017-01-14 12:24:49 +00:00
|
|
|
|
|
|
|
@@slot = word ptr 6
|
2020-08-20 19:59:45 +00:00
|
|
|
@@top = word ptr 8
|
|
|
|
@@left = word ptr 10
|
2017-01-14 12:24:49 +00:00
|
|
|
|
|
|
|
push bp
|
|
|
|
mov bp, sp
|
|
|
|
push si
|
|
|
|
push di
|
|
|
|
mov si, [bp+@@slot]
|
|
|
|
shl si, 4
|
|
|
|
add si, offset _cdg_slots
|
2020-08-20 19:59:45 +00:00
|
|
|
mov ax, [bp+@@left]
|
2017-01-14 12:24:49 +00:00
|
|
|
sar ax, 3
|
2020-09-05 14:09:18 +00:00
|
|
|
add ax, [si+cdg_t.offset_at_bottom_left]
|
2017-01-14 12:24:49 +00:00
|
|
|
mov di, ax
|
2020-09-05 14:09:18 +00:00
|
|
|
mov ax, [si+cdg_t.vram_dword_w]
|
2017-01-14 12:24:49 +00:00
|
|
|
mov word ptr cs:@@width+1, ax
|
|
|
|
jmp short $+2
|
|
|
|
shl ax, 2
|
|
|
|
add ax, (640 / 8)
|
|
|
|
mov dx, ax
|
2020-08-20 19:59:45 +00:00
|
|
|
mov ax, [bp+@@top]
|
2017-01-14 12:24:49 +00:00
|
|
|
mov bx, ax
|
|
|
|
shl ax, 2
|
|
|
|
add ax, bx
|
|
|
|
add ax, 0A800h
|
|
|
|
mov es, ax
|
|
|
|
push ds
|
2020-09-05 14:09:18 +00:00
|
|
|
mov ax, [si+cdg_t.seg_colors]
|
2017-01-14 12:24:49 +00:00
|
|
|
mov ds, ax
|
|
|
|
xor si, si
|
|
|
|
mov bx, di
|
|
|
|
cld
|
|
|
|
nop
|
|
|
|
|
|
|
|
@@width:
|
|
|
|
mov cx, 1234h
|
|
|
|
rep movsd
|
|
|
|
sub di, dx
|
|
|
|
jns short @@width
|
|
|
|
mov di, bx
|
|
|
|
mov ax, es
|
|
|
|
add ax, 800h
|
|
|
|
mov es, ax
|
|
|
|
assume es:nothing
|
|
|
|
cmp ax, 0C000h
|
|
|
|
jb short @@width
|
|
|
|
cmp ax, 0C800h
|
|
|
|
jnb short @@ret
|
|
|
|
add ax, 2000h
|
|
|
|
mov es, ax
|
|
|
|
assume es:nothing
|
|
|
|
jmp short @@width
|
|
|
|
|
|
|
|
@@ret:
|
|
|
|
pop ds
|
|
|
|
pop di
|
|
|
|
pop si
|
|
|
|
pop bp
|
|
|
|
retf 6
|
2019-09-15 14:22:36 +00:00
|
|
|
cdg_put_noalpha endp
|
2017-01-14 12:24:49 +00:00
|
|
|
align 2
|