2020-09-19 16:41:48 +00:00
|
|
|
public CDG_PUT_HFLIP_8
|
|
|
|
cdg_put_hflip_8 proc
|
2017-01-15 20:34:32 +00:00
|
|
|
|
|
|
|
@@slot = word ptr 6
|
2020-08-20 19:59:45 +00:00
|
|
|
@@top = word ptr 8
|
|
|
|
@@left = word ptr 10
|
2017-01-15 20:34:32 +00:00
|
|
|
|
|
|
|
push bp
|
|
|
|
mov bp, sp
|
|
|
|
push si
|
|
|
|
push di
|
|
|
|
call grcg_setcolor pascal, (GC_RMW shl 16) + 0
|
|
|
|
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-15 20:34:32 +00:00
|
|
|
sar ax, 3
|
2020-09-05 14:09:18 +00:00
|
|
|
add ax, [si+cdg_t.offset_at_bottom_left]
|
|
|
|
mov bx, [si+cdg_t.vram_dword_w]
|
2017-01-15 20:34:32 +00:00
|
|
|
shl bx, 2
|
|
|
|
add ax, bx
|
|
|
|
dec ax
|
|
|
|
mov di, ax
|
|
|
|
mov word ptr cs:@@last_x_alpha+1, ax
|
|
|
|
mov word ptr cs:@@last_x_colors+1, ax
|
|
|
|
mov word ptr cs:@@width_bytes_alpha+1, bx
|
|
|
|
mov word ptr cs:@@width_bytes_colors+1, bx
|
|
|
|
mov ax, (640 / 8)
|
|
|
|
sub ax, bx
|
|
|
|
mov word ptr cs:@@stride_alpha+1, ax
|
|
|
|
mov word ptr cs:@@stride_colors+1, ax
|
|
|
|
jmp short $+2
|
2020-08-20 19:59:45 +00:00
|
|
|
mov ax, [bp+@@top]
|
2017-01-15 20:34:32 +00:00
|
|
|
mov bx, ax
|
|
|
|
shl ax, 2
|
|
|
|
add ax, bx
|
|
|
|
add ax, 0A800h
|
|
|
|
mov es, ax
|
|
|
|
assume es:nothing
|
2020-09-05 17:03:48 +00:00
|
|
|
mov bx, offset _hflip_lut
|
2020-09-05 14:09:18 +00:00
|
|
|
mov fs, [si+cdg_t.seg_alpha]
|
2017-01-15 20:34:32 +00:00
|
|
|
xor si, si
|
|
|
|
|
|
|
|
@@stride_alpha:
|
|
|
|
mov dx, 1234h
|
|
|
|
nop
|
|
|
|
|
|
|
|
@@width_bytes_alpha:
|
|
|
|
mov cx, 1234h
|
|
|
|
|
|
|
|
@@blit_hflip_alpha:
|
|
|
|
mov al, fs:[si]
|
|
|
|
xlat
|
|
|
|
mov es:[di], al
|
|
|
|
inc si
|
|
|
|
dec di
|
|
|
|
loop @@blit_hflip_alpha
|
|
|
|
sub di, dx
|
|
|
|
jns short @@width_bytes_alpha
|
|
|
|
xor al, al
|
|
|
|
out 7Ch, al
|
|
|
|
|
|
|
|
@@last_x_alpha:
|
|
|
|
mov di, 1234h
|
|
|
|
mov si, [bp+@@slot]
|
|
|
|
shl si, 4
|
|
|
|
add si, offset _cdg_slots
|
2020-09-05 14:09:18 +00:00
|
|
|
mov fs, [si+cdg_t.seg_colors]
|
2017-01-15 20:34:32 +00:00
|
|
|
xor si, si
|
|
|
|
|
|
|
|
@@stride_colors:
|
|
|
|
mov dx, 1234h
|
|
|
|
nop
|
|
|
|
|
2020-09-06 22:21:38 +00:00
|
|
|
@@row_loop:
|
2017-01-15 20:34:32 +00:00
|
|
|
@@width_bytes_colors:
|
|
|
|
mov cx, 1234
|
|
|
|
|
|
|
|
@@blit_hflip_colors:
|
|
|
|
mov al, fs:[si]
|
|
|
|
xlat
|
|
|
|
or es:[di], al
|
|
|
|
inc si
|
|
|
|
dec di
|
|
|
|
loop @@blit_hflip_colors
|
|
|
|
sub di, dx
|
2020-09-06 22:21:38 +00:00
|
|
|
jns short @@row_loop
|
2017-01-15 20:34:32 +00:00
|
|
|
|
|
|
|
@@last_x_colors:
|
|
|
|
mov di, 1234h
|
2020-09-06 22:21:38 +00:00
|
|
|
vram_plane_next es, @@row_loop
|
2017-01-15 20:34:32 +00:00
|
|
|
|
|
|
|
@@ret:
|
|
|
|
pop di
|
|
|
|
pop si
|
|
|
|
pop bp
|
|
|
|
retf 6
|
2020-09-19 16:41:48 +00:00
|
|
|
cdg_put_hflip_8 endp
|
2017-01-15 20:34:32 +00:00
|
|
|
align 2
|