fix: correction de bogue temporaire
This commit is contained in:
parent
dd7a8c05ee
commit
7c0c00a696
11
lib/bmp.asm
11
lib/bmp.asm
|
@ -35,28 +35,29 @@ PROC showbmp FAR
|
||||||
cmp [word ptr (bmp_file si).bmp_filetype],"MB"
|
cmp [word ptr (bmp_file si).bmp_filetype],"MB"
|
||||||
jne @@errorshowing
|
jne @@errorshowing
|
||||||
mov edi,[(bmp_file si).bmp_bitmapoffset]
|
mov edi,[(bmp_file si).bmp_bitmapoffset]
|
||||||
|
add di,400h
|
||||||
add di,si
|
add di,si
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov ecx,[(bmp_file si).bmp_height]
|
mov ecx,[(bmp_file si).bmp_height]
|
||||||
mov edx,[(bmp_file si).bmp_width]
|
mov edx,[(bmp_file si).bmp_width]
|
||||||
and dx,11111100b
|
;and dx,11111100b
|
||||||
cmp edx,[(bmp_file si).bmp_width]
|
cmp edx,[(bmp_file si).bmp_width]
|
||||||
jae @@noadjust
|
;jae @@noadjust
|
||||||
add dx,4
|
;add dx,4
|
||||||
@@noadjust:
|
@@noadjust:
|
||||||
sub edx,[(bmp_file si).bmp_width]
|
sub edx,[(bmp_file si).bmp_width]
|
||||||
@@bouclette:
|
@@bouclette:
|
||||||
push bx cx
|
push bx cx
|
||||||
add bx,[@x]
|
add bx,[@x]
|
||||||
add cx,[@y]
|
add cx,[@y]
|
||||||
call [showpixel],bx,cx,[word ptr di]
|
call [cs:showpixel],bx,cx,[word ptr di]
|
||||||
pop cx bx
|
pop cx bx
|
||||||
inc bx
|
inc bx
|
||||||
inc di
|
inc di
|
||||||
cmp ebx,[(bmp_file si).bmp_width]
|
cmp ebx,[(bmp_file si).bmp_width]
|
||||||
jb @@bouclette
|
jb @@bouclette
|
||||||
xor bx,bx
|
xor bx,bx
|
||||||
add di,dx
|
;add di,dx
|
||||||
dec cx
|
dec cx
|
||||||
cmp cx,0
|
cmp cx,0
|
||||||
jne @@bouclette
|
jne @@bouclette
|
||||||
|
|
Loading…
Reference in New Issue