Results 1 to 2 of 2

Thread: Spinning Squares

  1. #1
    Join Date
    Feb 2006
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Spinning Squares

    Code:
    program New;
    var
      Canvas:TCanvas;
      intCurrentStage:integer;
    
    procedure ResetDebug;
    begin
      DisplayDebugImgWindow(100,100);
      Canvas:=GetDebugCanvas;
      Canvas.Brush.COLOR:= clblack;
      Canvas.Pen.COLOR:= clwhite;
      Canvas.Font.Color:= clwhite;
      Canvas.Font.Name:= 'Verdana Bold';
      Canvas.Font.Size:= 7;
      Canvas.Rectangle(0,0,100,100);
      Canvas.Brush.COLOR := clwhite;
    end;
    
    procedure DrawBox1;
    begin
      Canvas.MoveTo(5,5);
      Canvas.LineTo(95,5);
      Canvas.LineTo(95,95);
      Canvas.LineTo(5,95);
      Canvas.LineTo(5,5);
    end;
    
    procedure DrawBox2(intStage:integer);
    begin
      Canvas.MoveTo(5+intStage,5);
      Canvas.LineTo(5,95-intStage);
      Canvas.LineTo(95-intStage,95);
      Canvas.LineTo(95,5+intStage);
      Canvas.LineTo(5+intStage,5);
    end;
    
    begin
      repeat
        intCurrentStage := 0;
        repeat
          ResetDebug;
          DrawBox1;
          DrawBox2(intCurrentStage);
          DrawBox2(90-intCurrentStage);
          intCurrentStage := intCurrentStage + 1;
          wait(15);
        until(intCurrentStage=91);
      until(false);
    end.
    I'm bored. I have a fancier version, but I have to fix some bugs first. Stare at this as I fix bugs.

  2. #2
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    its pretty cool im going to make something using canvas, never tried it yet before tho...

    EDIT: heres my first try!
    Code:
    program New;
    const
      Invert = False;//Set To True To Invert;
    var
      Canvas:TCanvas;
      ihold : integer;
    
    
    procedure ResetDebug1;
    begin
      Canvas:=GetDebugCanvas;
      Canvas.Brush.COLOR:= clblack;
      Canvas.Pen.COLOR:= clwhite;
      Canvas.Font.Color:= clwhite;
      Canvas.Font.Name:= 'Verdana Bold';
      Canvas.Font.Size:= 7;
      Canvas.Rectangle(0,0,200,200);
      Canvas.Brush.COLOR := clwhite;
    end;
    
    procedure ResetDebug2;
    begin
      Canvas:=GetDebugCanvas;
      Canvas.Brush.COLOR:= clwhite;
      Canvas.Pen.COLOR:= clblack;
      Canvas.Font.Color:= clwhite;
      Canvas.Font.Name:= 'Verdana Bold';
      Canvas.Font.Size:= 7;
      Canvas.Rectangle(5,5,195,195);
      Canvas.Brush.COLOR := clwhite;
    end;
    
    procedure DrawBox(inwords : integer);
    begin
      Canvas.MoveTo(5+inwords,5+inwords);
      Canvas.LineTo(195-inwords,5+inwords);
      Canvas.LineTo(195-inwords,195-inwords);
      Canvas.LineTo(5+inwords,195-inwords);
      Canvas.LineTo(5+inwords,5+inwords);
      ClearDebug;
      Writeln('Inwords ' + inttostr(inwords));
    end;
    
    begin
     DisplayDebugImgWindow(200,200);
     repeat
     ihold := 0
     ResetDebug1;
      repeat
       if Invert = True then ResetDebug1;
       DrawBox(ihold);
       ihold := ihold + 1;
       Sleep(1);
      until(ihold = 98)
      ResetDebug2;
      repeat
       if Invert = True then ResetDebug2;
       DrawBox(ihold);
       ihold := ihold - 1;
       Sleep(1);
      until(ihold = 0)
     until(false)
    end.
    PAINT HELPED ME PICTURE THE BOX ROFL, AND THE ADDING AND SUBTRACTING OF THE INWORDS THINGY LOL

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Home's Flax Gardener Ultimate (Picking And Spinning) [Reflection]
    By Home in forum RS3 Outdated / Broken Scripts
    Replies: 56
    Last Post: 06-08-2009, 04:58 PM
  2. help with vilons flax spinning script!
    By mannykind in forum OSR Help
    Replies: 2
    Last Post: 01-30-2008, 10:03 AM
  3. now when u spinning flax etc
    By Scaper in forum RS has been updated.
    Replies: 2
    Last Post: 11-10-2007, 12:04 PM
  4. Did the gears just start spinning?
    By Jason2gs in forum SRL Site Discussion
    Replies: 21
    Last Post: 05-06-2007, 01:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •