Viewing paste WTF3
made on Tue, 09 Jul 2013 12:08:16 -0400
Sane-itized version, click to copy:
&map.render.debug #3629=[setq(p,%0)][setq(q,%1)]drawing map centered on %qp:%qq%r[setq(u,%2)][setq(v,%3)]drawing map %2 wide by %2 high%r[setq(3,[div(%qu,2)])][setq(4,[div(%qv,2)])]tile area half offset is %q3 x and %q4 y%r[setq(7,[mul(%qu,6)])][setq(8,[mul(%qv,4)])]total area of framebuffer will be %qu wide and %qv tall%r[setq(9,[sub(%qp,%q3)])][setq(0,[sub(%qq,%q4)])]position to start drawing is %q9:%q0%r[setq(5,0)]null([if([fbexists(MAPVIEW)],[fbdestroy(MAPVIEW)])][fbcreate(MAPVIEW,%q7,%q8)][fbwrite(MAPVIEW,0,0,[color(255,255,[repeat([repeat(0,%q7)]%r,%q8)])])])framebuffer is initialized:%r[fbdump(MAPVIEW)]%r[setq(1,[lnum(%q9,[sub(add(%q9,%qu),1)])])]%r--Preparing to draw x-list: %q1[iter(%q1,[setq(6,0)][setq(2,[lnum(%q0,[sub(add(%q0,%qv),1)])])]%r--Preparing to draw y-list: %q2[iter(%q2,[setq(t,[u(map.tile,[itext(1)],[itext(0)],0)])][setq(z,[baseconv(%qt,16,10)])][setq(w,DNDT%qz)]%rdraw map position [itext(1)]:[itext(0)] where t=%qt  z=%qz  w=%qw at fb position %q6:%q5%rtile will be: showpicture(%qw)%r[showpicture(#676/%qw)] [c(17)]-%rnull([ifelse(eq(%qt,-1),NO TILE,[fbwrite(MAPVIEW,%q5,%q6,[showpicture(%qw)])])])[setq(6,[add(%q6,4)])],%b,)][setq(5,[add(%q5,6)])],%b,)]%rFinal Result:%r[fbdump(MAPVIEW)]

Enter a target attribute, object reference and the mushcode.


[setq(p,%0)]
[setq(q,%1)]
drawing map centered on %qp:%qq%r
[setq(u,%2)]
[setq(v,%3)]
drawing map %2 wide by %2 high%r
[setq(3,[div(%qu,2)])]
[setq(4,[div(%qv,2)])]
tile area half offset is %q3 x and %q4 y%r
[setq(7,[mul(%qu,6)])]
[setq(8,[mul(%qv,4)])]
total area of framebuffer will be %qu wide and %qv tall%r
[setq(9,[sub(%qp,%q3)])]
[setq(0,[sub(%qq,%q4)])]
position to start drawing is %q9:%q0%r
[setq(5,0)]
null(
 [if([fbexists(MAPVIEW)],[fbdestroy(MAPVIEW)])]
 [fbcreate(MAPVIEW,%q7,%q8)]
 [fbwrite(MAPVIEW,0,0,[color(255,255,[repeat([repeat(0,%q7)]%r,%q8)])])]
)
framebuffer is initialized:%r[fbdump(MAPVIEW)]%r
[setq(1,[lnum(%q9,[sub(add(%q9,%qu),1)])])]
%r--Preparing to draw x-list: %q1
[iter(%q1,
 [setq(6,0)]
 [setq(2,[lnum(%q0,[sub(add(%q0,%qv),1)])])]
 %r--Preparing to draw y-list: %q2
 [iter(%q2,
  [setq(t,[u(map.tile,[itext(1)],[itext(0)],0)])]
  [setq(z,[baseconv(%qt,16,10)])]
  [setq(w,DNDT%qz)]
  %rdraw map position [itext(1)]:[itext(0)] where t=%qt  z=%qz  w=%qw at fb position %q6:%q5%rtile will be: showpicture(%qw)%r[showpicture(#676/%qw)] [c(17)]-%r
  null(
   [ifelse(eq(%qt,-1),NO TILE,[fbwrite(MAPVIEW,%q5,%q6,[showpicture(%qw)])])]
  )
  [setq(6,[add(%q6,4)])],%b,
 )]
 [setq(5,[add(%q5,6)])],%b,
)]
%rFinal Result:%r
[fbdump(MAPVIEW)]

save as: imprettify (attempt to format for readibility):
Found this useful? Try MUSHcode Repeater
written by orcs.biz