From a5e714b16520cebe7905893422d7d15190bb8529 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Sun, 15 Dec 2019 15:08:35 +0100 Subject: [PATCH] [Maintenance] [th05] Clarify pi_slot_put() a bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Can't blame WindowsTiger for writing hard-to-review code when he just adapted what I wrote in 2014… --- th05/formats/pi_slot_put.asm | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/th05/formats/pi_slot_put.asm b/th05/formats/pi_slot_put.asm index a98bc23e..77354285 100644 --- a/th05/formats/pi_slot_put.asm +++ b/th05/formats/pi_slot_put.asm @@ -73,32 +73,38 @@ endp_defconv ; --------------------------------------------------------------------------- +; void pascal pi_slot_put_mask_rowloop( +; void far *pi_buf, +; int h, +; int x, int y, int w, size_t stride_packed +; ); pi_slot_put_rowloop proc near -@@stride = word ptr [bp+2] -@@len = word ptr [bp+4] +@@stride_packed = word ptr [bp+2] +@@w = word ptr [bp+4] @@y = word ptr [bp+6] @@x = word ptr [bp+8] +@@h equ di mov bp, sp -@@put: +@@put_row: push es - call graph_pack_put_8_noclip pascal, @@x, @@y, es, si, @@len + call graph_pack_put_8_noclip pascal, @@x, @@y, es, si, @@w pop es inc @@y - cmp @@y, 400 + cmp @@y, RES_Y jb short @@next_row - sub @@y, 400 + sub @@y, RES_Y @@next_row: - add si, @@stride + add si, @@stride_packed mov ax, si shr ax, 4 mov dx, es add dx, ax mov es, dx and si, 0Fh - dec di - jnz short @@put + dec @@h + jnz short @@put_row retn 8 pi_slot_put_rowloop endp