Sporkinator

Direction Chart

Dec 26th, 2011
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var radius, unit, xx, yy, i, lx, ly, tlx, tly;
  2. xx = room_width div 2;
  3. yy = room_height div 2;
  4. radius = 128;
  5. unit = 45;
  6. draw_set_halign(fa_center);
  7. draw_set_valign(fa_center);
  8. for (i = 0; i < 360; i += unit)
  9. {
  10.     lx = lengthdir_x(radius - 32, i);
  11.     ly = lengthdir_y(radius - 32, i);
  12.     tlx = lengthdir_x(radius, i);
  13.     tly = lengthdir_y(radius, i);
  14.     draw_line(xx, yy, xx + lx, yy + ly);
  15.     draw_text(xx + tlx, yy + tly, string(i));
  16. }
Advertisement
Add Comment
Please, Sign In to add comment