0 Members and 1 Guest are viewing this topic.
.LIGHTFullDiagnosticOffFix 5Fix 9Fix 0ClrDrawClrDraw[radians][FFFFFFFFFFFFFFFF]->PIC1[3844828282443800]->PIC245->A->B0->Csub(MAP)Pt-On(A-3,B-3,PIC2)DispGraph::While 1If getKey(15)Goto ENDEndgetKey(1)-getKey(4)->EgetKey(3)-getKey(2)->DIf D or EClrDrawA+D->AB+E->Bsub(MAP)For(C,0,64)sub(LIN,A,B,96,C)sub(LIN,A,B,0,C)EndFor(C,1,95)sub(LIN,A,B,C,64)sub(LIN,A,B,C,0)EndPt-On(A-3,B-3,PIC2)0->CDispGraph:End::EndLabel MAPFor(F,0,7)For(G,0,1)Pt-On(G*16,F*8,PIC1)Pt-On(G*16+72,F*8,PIC1)EndPt-On(F*8+16,0,PIC1)Pt-On(F*8+16,56,PIC1)EndPt-Change(16,24,PIC1)Pt-Change(72,32,PIC1)For(F,0,1)For(G,0,1)Pt-On(F*24+32,G*24+16,PIC1EndEndReturnLabel LINIf abs(R4-R2)>abs(R3-R1)->Uexpr([degrees]R1,[degrees]R2,2)expr([degrees]R3,[degrees]R4,2)EndR1>R3->Kabs(R3-R1)->S/2->Vabs(R4-R2)->TR2<R4*2-1->WR2->YFor(Z,R1,abs(R3-R1)+R1)If K2*R1-Z->XElseZ->XEndgetKey(15)*9+W->WReturnIf getKey(15)If UIf pxl-Test(Y,X)Line(Y,X,R4,R3)ReturnEndElseIf pxl-Test(X,Y)Line(X,Y,R3,R4)ReturnEndEndV-T->VIf V>99Y+W->YV+S->VEndEndReturnLabel ENDFix 4
That is REALLY cool. I do suggest making the shadows grayscale, however.
Any optimization suggestions, please?(I'm using a variant of Bresenham's line algorithm, for those interested)
Quote from: Michael_Lee on October 17, 2010, 10:40:42 pmAny optimization suggestions, please?(I'm using a variant of Bresenham's line algorithm, for those interested)It looks awesome, but why are you using that algorithm? It could very well be faster to set the initial screen and adjust the start/end points of the Line( function (which already uses Bresenham's algorithm).