| |
|
|
| Gepunktete Horiz Linie mit kleinen Einstellungen in Assembler
{$cleq}
$U thread.Pcu = thread.
proc hDottedLine
parameters hDC&,x&,y&,xx&,hop&,mtr&,c1&,c2&
AsmStart hDottedLine
Parameters hDC&,x&,y&,xx&,hop&,mtr&,c1&,c2&
.data
vx dd 0
hop dd 0
mtr dd 0
.code
mov esi,para4
cmp esi,0
jle eop
mov esi,para5
mov hop,esi
mov esi,para6
inc esi
mov mtr,esi
mov esi,para4
.while vx<esi
inc vx
inc hop
mov eax,mtr
cmp hop,eax
je eob
jg eoa
mov ebx,vx
add ebx,para2
invoke SetPixel,para1,ebx,para3,para7
jmp cnt
eoa:
mov hop,0
eob:
mov ebx,vx
add ebx,para2
invoke SetPixel,para1,ebx,para3,para8
cnt:
.endw
eop:
ASMEND
endproc
declare c&,dlgdc&,dlg&
dlg&:=createwindow(0,"",0,0,640,480)
dlgdc&:=external("user32","GetWindowDC",dlg&)
while 1
thread.start;waitinput;thread.stop
wend
end
proc thread.do
hDottedLine dlgDC&,0,0,width(dlg&),c&,10,rgb(255,0,0),rgb(255,255,255)
c&+:case c&==12:c&:=0
endproc
Viel Divertimento damit!
Salve, iF. |
|
|
| |
|
|