2017-01-22 21:23:15 +00:00
|
|
|
; Displays the CDG image in the given [slot] at (⌊x/8⌋*8, y), disregarding its
|
|
|
|
; alpha plane.
|
|
|
|
|
2019-09-15 14:22:36 +00:00
|
|
|
; void pascal cdg_put_noalpha(int x, int y, 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-22 21:23:15 +00:00
|
|
|
|
|
|
|
@@slot = word ptr 6
|
|
|
|
@@y = word ptr 8
|
|
|
|
@@x = word ptr 10
|
|
|
|
|
|
|
|
push bp
|
|
|
|
mov bp, sp
|
|
|
|
push si
|
|
|
|
push di
|
|
|
|
push ds
|
|
|
|
mov ax, [bp+@@y]
|
|
|
|
mov bx, ax
|
|
|
|
shl ax, 2
|
|
|
|
add ax, bx
|
|
|
|
add ax, 0A800h
|
|
|
|
mov es, ax
|
|
|
|
add ax, 3800h
|
|
|
|
push ax
|
|
|
|
sub ax, 2800h
|
|
|
|
push ax
|
|
|
|
sub ax, 800h
|
|
|
|
push ax
|
|
|
|
mov si, [bp+@@slot]
|
|
|
|
shl si, 4
|
|
|
|
add si, offset _cdg_slots
|
|
|
|
mov bx, [bp+@@x]
|
|
|
|
sar bx, 3
|
|
|
|
add bx, [si+CDGSlot.vram_byte_at_bottom_left]
|
|
|
|
mov ax, [si+CDGSlot.width_divided_by_32]
|
|
|
|
mov bp, ax
|
|
|
|
shl ax, 2
|
|
|
|
add ax, (640 / 8)
|
|
|
|
mov dx, ax
|
|
|
|
mov ax, [si+CDGSlot.sgm_colors]
|
|
|
|
mov ds, ax
|
|
|
|
xor si, si
|
|
|
|
mov al, 4
|
|
|
|
cld
|
|
|
|
nop
|
|
|
|
|
|
|
|
@@plane:
|
|
|
|
mov di, bx
|
|
|
|
|
|
|
|
@@row:
|
|
|
|
mov cx, bp
|
|
|
|
rep movsd
|
|
|
|
sub di, dx
|
|
|
|
jns short @@row
|
|
|
|
dec al
|
|
|
|
jz short @@ret
|
|
|
|
pop es
|
|
|
|
jmp short @@plane
|
|
|
|
|
|
|
|
@@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-22 21:23:15 +00:00
|
|
|
align 2
|