0 Members and 2 Guests are viewing this topic.
ld a, (_ty) inc a ld (_ty), a ld c, a ld a, (y2) ld h, a ld a, c ld c, h cp c jp nz, QuadDrawLoop1
ld hl, _ty inc (hl) ld a, (y2) cp (hl) jp nz, QuadDrawLoop1
Now that is one of the scariest pieces of code I have ever seen.
But, as to why it's not actually working. Your loop should theoretically work as long as you are giving it valid numbers. (It will actually finish no matter what you give it though) So that leads me to believe that the problem is with your pixel plotting. Most likely, you are trying to plot pixels that are off screen and that is what is causing all of your problems. You end up plotting pixels in your program code, which causes crashes. If you are really unlucky, you might even be plotting pixels at _ty.
Edit: I just noticed i tripple posted, but there is more than 6 hours between those posts, so it's ok, right?
AxesOffClrDraw[[1,1,1,1,1,1,1,1][1,0,1,0,1,0,1,1][1,1,0,1,0,1,0,1][1,0,1,0,1,0,1,1][1,1,0,1,0,1,0,1][1,0,1,0,1,0,1,1][1,1,0,1,0,1,0,1][1,1,1,1,1,1,1,1->[A]4->dim(LDX4->dim(LDU4->dim(LDV2->dim(LTX2->dim(LTY2->dim(LTU2->dim(LTV{50,40,80,10->LX{10,11,60,61->LY{1,8,1,8->LU{1,1,8,8->LV(LX(2)-LX(1))/(LY(2)-LY(1->LDX(1(LX(3)-LX(1))/(LY(3)-LY(1->LDX(2(LX(4)-LX(2))/(LY(4)-LY(2->LDX(3(LX(4)-LX(3))/(LY(4)-LY(3->LDX(4(LU(2)-LU(1))/(LY(2)-LY(1->LDU(1(LV(2)-LV(1))/(LY(2)-LY(1->LDV(1(LU(3)-LU(1))/(LY(3)-LY(1->LDU(2(LV(3)-LV(1))/(LY(3)-LY(1->LDV(2(LU(4)-LU(2))/(LY(4)-LY(2->LDU(3(LV(4)-LV(2))/(LY(4)-LY(2->LDV(3(LU(4)-LU(3))/(LY(4)-LY(3->LDU(4(LV(4)-LV(3))/(LY(4)-LY(3->LDV(4LX(1->LTX(1LX(1->LTX(2LU(1->LTU(1LV(1->LTV(1LU(1->LTU(2LV(1->LTV(2LY(1->YIf [A](LU(1),LV(1ThenPxl-On(Y,LX(1ElsePxl-Off(Y,LX(1EndFor(Y,LY(1)+1,LY(2LTX(1)+LDX(1->LTX(1LTU(1)+LDU(1->LTU(1LTV(1)+LDV(1->LTV(1LTX(2)+LDX(2->LTX(2LTU(2)+LDU(2->LTU(2LTV(2)+LDV(2->LTV(2For(X,LTX(1),LTX(2(X-LTX(1))/(LTX(2)-LTX(1->Tround((1-T)*LTU(1)+T*LTU(2),0)->Uround((1-T)*LTV(1)+T*LTV(2),0)->VIf [A](U,V)ThenPxl-On(Y,round(X,0ElsePxl-Off(Y,round(X,0EndEndEndFor(Y,LY(2)+1,LY(3LTX(1)+LDX(3->LTX(1LTX(2)+LDX(2->LTX(2LTU(1)+LDU(3->LTU(1LTV(1)+LDV(3->LTV(1LTU(2)+LDU(2->LTU(2LTV(2)+LDV(2->LTV(2For(X,LTX(1),LTX(2(X-LTX(1))/(LTX(2)-LTX(1->Tround((1-T)*LTU(1)+T*LTU(2),0->Uround((1-T)*LTV(1)+T*LTV(2),0->VIf [A](U,VThenPxl-On(Y,round(X,0ElsePxl-Off(Y,round(X,0EndEndEndFor(Y,LY(3)+1,LY(4)-1LTX(1)+LDX(3->LTX(1LTU(1)+LDU(3->LTU(1LTV(1)+LDV(3->LTV(1LTX(2)+LDX(4->LTX(2LTU(2)+LDU(4->LTU(2LTV(2)+LDV(4->LTV(2For(X,LTX(1),LTX(2(X-LTX(1))/(LTX(2)-LTX(1->Tround((1-T)*LTU(1)+T*LTU(2),0->Uround((1-T)*LTV(1)+T*LTV(2),0->VIf [A](U,VThenPxl-On(Y,round(X,0ElsePxl-Off(Y,round(X,0EndEndEndIf [A](LU(4),LV(4ThenPxl-On(LY(4),LX(4ElsePxl-Off(LY(4),LX(4EndDelVar LXDelVar LYDelVar LUDelVar LVDelVar [A]DelVar LDUDelVar LDVDelVar LDXDelVar LTUDelVar LTVDelVar LTXDelVar LTY