Advertisement
mixster

mixster

Feb 5th, 2010
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 1.08 KB | None | 0 0
  1. type
  2.   TRadialWalk = record
  3.     colour: Integer;
  4.     startRad, endRad: Integer;
  5.     radius: Integer;
  6.     xmod, ymod: Integer;
  7.   end;
  8.  
  9. function ParseRadialWalk(input: TIntegerArray): TRadialWalk;
  10. var
  11.   h, i: Integer;
  12. begin
  13.   h := High(input);
  14.   if (h < 5) then // 5 as you need 6 indices, highest being 5
  15.     exit;
  16.  
  17.   Result.colour := input[0];
  18.   Result.startRad := input[1];
  19.   Result.endRad := input[2];
  20.   Result.radius := input[3];
  21.   Result.xmod := input[4];
  22.   Result.ymod := input[5];
  23. end;
  24.  
  25. procedure DoSomeWalking;
  26. var
  27.   walks: array of TIntegerArray;
  28.   tmpRadWalk: TRadialWalk;
  29.   h, i: Integer;
  30. begin
  31.   walks := [
  32.     [8030602, 45, 135, 150, 0, -1],
  33.     [2317161, 0, 90, 350, 0, -1],
  34.     [2114396, 0, 90, 350, 0, -1],
  35.     [7634054, 0, 45, 350, 0, -1],
  36.     [2312801, 345, 15, 350, 0, 3]
  37.   ];
  38.  
  39.   h := High(walks);
  40.   for i := 0 to High(walks) do
  41.   begin
  42.     tmpRadWalk := ParseRadialWalking(walks[i]);
  43.     RadialRoadWalk(tmpRadWalk.colour, tmpRadWalk.startRad, tmpRadWalk.endRad, tmpRadWalk.radius, tmpRadWalk.xmod, tmpRadWalk.ymod);
  44.     FFlag(0);
  45.   end;
  46. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement