Results 1 to 5 of 5

Thread: () Swirly Eeks

  1. #1
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default () Swirly Eeks

    Lol..

    Code:
    var C: TCanvas;
    var Eek, Clear: Integer;
    
    function CircleCoords(Sx, Sy, Radius, StartAngle, EndAngle: Integer): TPointArray;
    var i: Integer;
    begin
      SetarrayLength(Result, ((EndAngle + StartAngle) + 1)-StartAngle);
      for i:= StartAngle to EndAngle do
      begin
        Result[i].x:= Round(Radius * Sin(i * Pi / 180)) + Sx;
        Result[i].y:= Round(-Radius * Cos(i * Pi / 180)) + Sy;
      end;
    end;
    
    procedure DrawCanvas;
    begin
      DisplayDebugImgWindow(200, 200);
      C:= GetDebugCanvas;
      C.Brush.Color:= CLBlack;
      C.Rectangle(-1, -1, 201, 201);
      Eek := BitmapFromString(16, 14, 'z78DA8D5459AE1C3108BC12663' +
           '1F813BCDCFF48A95E9E344A325128C93D636396024CF421EB424D' +
           '602D06448E4C29A2A6EDF89AFDA4E76CE760A77197942EB6689EC' +
           '5932E340684FE940EC4F922F0414230C735BB674C93CEC5F94DFF' +
           'B6363ECDBBB8B93DA7DB80BE05D067676A65251F1353112806329' +
           '4E2575F017BD667C70B581515B38D1C9982B481E7B40D60D169AD' +
           'BDF677C29FF390219B4D426AEBDA9B5EFD04F007375EFDC4853C4' +
           '38182AB5E273C2C5EFB17FD73CE01BC0C80E144C0ACAE29AA530F' +
           'CE40DA6FFAFEA33F0821525DF0B4EA535A21E6AF7C9A6AEA761A3' +
           '1D203E15E3E58ED9B3E0BB7B6E38C513A50F9652D402D6B5DDDB2' +
           'F72EA4972790D6707226BF725FB7BD67A56CD2C2B50F245FC74F3' +
           'F0DF7A639CAC05773C9EA113A3322F7A4A895A72450F84D7CF512' +
           'D646C64B457DDDCCEDF154FFE6E48933B56B4293C9AE06A36057E' +
           'B6523A0D0CD4FADB73D77C96A6988E5E47DB9EA8EF6E987959A0E' +
           'FE4D03FC771DD8A97CBDA43D9C2F28FBB9A6435B474F7CF6A79E9' +
           '8C921D3F719735FF6EF98C11AC8A32F22D3466F29E0F2449BF0D3' +
           'DB400FF1349BFCA9691118AFCEE354C65908CCA5DA3C3FC7A8C0C' +
           '617D3F9AED7CE7C735F69ABFC1E3795BE36CBB19DFD2FF188A150' +
           'D09F8B6DC72CFF193F4A3A9EC234DCA4613615157AB935F5B31A5' +
           'A848E30A3E483FE295C4618610A708E77A6F30A3C458469F27DAF' +
           'F8EDC5B7EF86C197D331010DAC47D27F4BEFEE81770DB9E215634' +
           '5FB99151C834BB4EC0449D548C2A74D4CC6D7987F01BA9C313E');
      Clear := BitmapFromString(200, 200, '');
    end;
    
    procedure DrawBitmap(C: TCanvas; x, y, Bmp: Integer);
    begin
      x:= x / 2;
      y:= y / 2;
      FastDrawTransparent(x, y, Bmp, Clear);
      SafeDrawBitmap(Clear, C, x, y);
    end;
    
    procedure Play;
    var a, b: TPointarray;
    var i, e: Integer;
    begin
      DrawBitmap(C, 95, 100, Eek);
      a:= CircleCoords(95, 100, 50, 0, 360);
      repeat
        for i:= 0 to 360 do
        begin
          DrawBitmap(C, a[i].x, a[i].y, Eek);
        end;
      until(false);
    end;
    
    begin
      DrawCanvas;
      Play;
    end.

  2. #2
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Eats up the cpu, but cool effect!

  3. #3
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Mwuaha, that's my plan.

    I forgot to say, click the stop button or use the stop hotkeys. Closing the debug window will just freeze until you use the hot keys if you don't. -.-

  4. #4
    Join Date
    Feb 2006
    Location
    Pennsylvania
    Posts
    1,524
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Kane, suggestion:
    Cover the defult canvas with a bitmap so that the image (in this case your swirly thing) doesn't flicker or "blink"

  5. #5
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Nothing flickers for me? It goes perfect.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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