Results 1 to 9 of 9

Thread: Xeon's Functions & Procedures.

  1. #1
    Join Date
    May 2007
    Location
    Space.
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Xeon's Functions & Procedures. [Xi.scar]

    Xeon's Functions & Procedures

    I will update this page every time I create a new function/ procedure. (Hopefully make this an include when I have enough procedures/ functions/ feedback [Xi.scar])

    I will be taking any requests for new Functions & Procedures or modifications to existing ones.

    Please comment on anything you see, as for SCAR is not my primary coding language and I need feed back.

    Every one is allowed to use the below just as long as you credit properly.


    -Change Log-
    Code:
    6th June 2007 - Added XiCompassWalk, description tags too. Rev3.
    27th May 2007 - Revised XiAutoColor, Now has a StartTol. Rev2
    27th May 2007 - Added the Function & Procedure request option.
    27th May 2007 - Created Thread and Added Auto Color Function. Rev1
    -Functions-
    SCAR Code:
    {*******************************************************************************
    function XiAutoColor(BitMap, StartTol, MaxTol, xs, ys, xe, ye: Integer): Integer;
    By: Xeon.
    Description: Returns the color of a given Bit Map.
    *******************************************************************************}


    function XiAutoColor(BitMap, StartTol, MaxTol, xs, ys, xe, ye: Integer): Integer;
    var
      XAC: TPoint;
    begin
      while not (FindBitMapToleranceIn(BitMap, XAC.x, XAC.y, xs, ys, xe, ye, StartTol))
        or (StartTol > MaxTol) do
      begin
        StartTol := StartTol + 1;
      end;
      if not (StartTol > MaxTol) then
      begin
        Result := GetColor(XAC.x, XAC.y);
        Writeln('Color Auto Picked with a ' + IntToStr(StartTol) + ' tolerance.');
      end;
    end;

    Will add more soon...


    -Procedures-
    SCAR Code:
    {*******************************************************************************
    procedure XiCompassWalk(Radial, Radius, xmod, ymod : Integer);
    By: Xeon, orignally by Sythe's A-Walk.
    Description: Walks "Blindly" According to which direction the compass is facing.
    *******************************************************************************}


    procedure XiCompassWalk(Radial, Radius, xmod, ymod : Integer);
    var
      XCW: TPoint;
    begin
      XCW.x := Round(Radius * Sin((Pi/180)* FixD(rs_GetCompassAngleDegrees + Radial)) + MMCX);
      XCW.y := Round(-Radius * Cos((Pi/180)* FixD(rs_GetCompassAngleDegrees + Radial)) + MMCY);
      MouseFindFlag(XCW.x, XCW.y, xmod, ymod);
      Flag;
    end;

    Will add more soon...


    -XEON

  2. #2
    Join Date
    May 2007
    Location
    Space.
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    -Reserved-

  3. #3
    Join Date
    May 2007
    Location
    Space.
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    -Reserved-

  4. #4
    Join Date
    May 2007
    Location
    Space.
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Please, I would really like some requests

    I'm currently working on 2-D Arrays and Multi-D Array/TPoints to make limitless array-coloring finding functions, but I REALLY needs some suggestions on what new procedures/ functions to make.

    -XEON

  5. #5
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What are you saying? His procedures do use SRL... he said he is going to make his on extended include... it doesn't use any includes BUT SRL.

  6. #6
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well, bitmaps are not best way to autocolor, you should use dtm's, but i can't help you... i'm still learning in scar....
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  7. #7
    Join Date
    Mar 2007
    Posts
    3,681
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by negaal View Post
    well, bitmaps are not best way to autocolor, you should use dtm's, but i can't help you... i'm still learning in scar....
    i think bitmaps are way better IMHO

    and if u want dtms use DDTMs

  8. #8
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice work is linearwork not the same as xicompasswalk?
    ~Hermen

  9. #9
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by hugolord View Post
    i think bitmaps are way better IMHO

    and if u want dtms use DDTMs

    ...sigh... why am i reading fake scar guides so much...?
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 16
    Last Post: 07-31-2008, 05:40 PM
  2. Functions or Procedures One Shouldn't Use?
    By Azzon in forum OSR Help
    Replies: 2
    Last Post: 01-28-2007, 06:09 PM

Posting Permissions

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