MACRO STAIR SAVESETTINGS SELSAVE GV bcol 0 GV bcol ^DEnter background color (>255 for none): (0) IFN bcol MacroDone GV lcol 247 GV lcol ^DEnter low step color: (247) IFN lcol MacroDone IFP lcol-255 MacroDone GV hcol 254 GV hcol ^DEnter high step color: (254) IFN hcol MacroDone IFP hcol-255 MacroDone GN snb 15 GN snb ^DEnter steps#: (15) IFN snb MacroDone IFZ snb MacroDone IFZ snb-1 MacroDone GV swidth 4 GV swidth ^DEnter step width: (4) IFZ swidth MacroDone IFN swidth MacroDone GP LowP ^DSelect low step midpoint IFERR MacroDone GP hihP ^DSelect high step midpoint IFERR MacroDone GDIST sleng LowP hihP IFZ sleng MacroDone GETX x1 lowP GETY y1 lowP GETX x2 hihP GETY y2 hihP GV ux (x2-x1)/sleng GV uy (y2-y1)/sleng GV vx uy GV vy -ux IFP bcol-255 NoBack SHEET STAIR_BACK FSTYLE solid COLOR bcol GP P1 ref lowP @vx*swidth/2,vy*swidth/2 GP P2 ref lowP @-vx*swidth/2,-vy*swidth/2 GP P3 ref hihP @-vx*swidth/2,-vy*swidth/2 GP P4 ref hihP @vx*swidth/2,vy*swidth/2 POLY P1 P2 P3 P4; :NoBack GN index 0 GV sthi 5*sleng/(6*snb-1) SHEET STAIRS :Loop GN ccol (hcol-lcol)/(snb-1)*index+lcol GV csw (swidth/2)/(snb-1)*index+swidth/2 COLOR ccol FSTYLE solid GP P1 ref lowP @vx*csw/2+ux*sthi*1.2*index,vy*csw/2+uy*sthi*1.2*index GP P2 ref lowP @-vx*csw/2+ux*sthi*1.2*index,-vy*csw/2+uy*sthi*1.2*index GP P3 ref lowP @-vx*csw/2+ux*sthi*(1.2*index+1),-vy*csw/2+uy*sthi*(1.2*index+1) GP P4 ref lowP @vx*csw/2+ux*sthi*(1.2*index+1),vy*csw/2+uy*sthi*(1.2*index+1) POLY P1 P2 P3 P4; GN index index+1 IFN index-snb Loop :MacroDone SELREST GETSETTINGS ENDM MACRO RSTAIR SAVESETTINGS SELSAVE GV bcol 0 GV bcol ^DEnter background color (>255 for none): (0) IFN bcol MacroDone GV lcol 247 GV lcol ^DEnter low step color: (247) IFN lcol MacroDone IFP lcol-255 MacroDone GV hcol 254 GV hcol ^DEnter high step color: (254) IFN hcol MacroDone IFP hcol-255 MacroDone GN snb 15 GN snb ^DEnter steps#: (15) IFN snb MacroDone IFZ snb MacroDone IFZ snb-1 MacroDone GV swidth 4 GV swidth ^DEnter step width: (4) IFZ swidth MacroDone IFN swidth MacroDone GN rev 0 ASKBOX Reverse rotation? Historically, castle stairs went always up counter-clockwise because defenders (coming up) had more room to swing a sword. In a dungeon like situation where defenders figth from a lower place, logic would have the stair going up clockwise... IFERR RevDone GN rev 1 :RevDone GP cP ^DSelect center point IFERR MacroDone GP LowP ^DSelect low step midpoint IFERR MacroDone GP hihP ^DSelect high step midpoint IFERR MacroDone GDIST sleng LowP hihP IFZ sleng MacroDone GBRNG br1 cP lowP GBRNG br2 cP hihP IFP rev RevOrder IFP br2-br1 BrDone GV br2 br2+360 GO BrDone :RevOrder IFN br2-br1 BrDone GV br1 br1+360 :BrDone IFN 255-bcol BackDone SHEET STAIR_BACK FSTYLE solid COLOR bcol GN index 1 GV ast (br2-br1)/120 GDIST arad cP lowP GV rad1 arad-swidth/2 GV rad2 arad+swidth/2 GP PB ref cP