Results 1 to 11 of 11

Thread: [Suggestion]

  1. #1
    Join Date
    May 2006
    Location
    Australia
    Posts
    370
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [Suggestion]

    Delete this (Simba.simba)
    Code:
    function IntToPoint(x,y : integer) : TPoint;
    begin
      result := Point(x,y);
    end;
    I mean...really?
    ------
    Strong Holder
    Kill Goblins and Zombies in (ex) bot free zones. Loot & Bank. Stable: 1.2b

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    It was probably there for SCAR compatibility. Aren't you happy we didn't just include it in Simba but did it like this?
    Does the include (SRL) use it at all?



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  3. #3
    Join Date
    May 2006
    Location
    Australia
    Posts
    370
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Haha yes very happy it can be deleted :P
    Not used as far as I could find.
    ------
    Strong Holder
    Kill Goblins and Zombies in (ex) bot free zones. Loot & Bank. Stable: 1.2b

  4. #4
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Code:
    ian@ubuntu:~/mahsheet/mySimba/srl-opendev$ grep -ri IntToPoint *
    SRL/misc/users.scar:        MousePosPoint := srlpf_PlayerPageControl[ArmyIndex].ClientToScreen(IntToPoint(x, y));
    SRL/misc/users.scar:        MousePosPoint := srlpf_ArmyPageControl.ClientToScreen(IntToPoint(x, y));
    SRL/misc/.svn/text-base/users.scar.svn-base:        MousePosPoint := srlpf_PlayerPageControl[ArmyIndex].ClientToScreen(IntToPoint(x, y));
    SRL/misc/.svn/text-base/users.scar.svn-base:        MousePosPoint := srlpf_ArmyPageControl.ClientToScreen(IntToPoint(x, y));
    SRL/core/simba.simba:function IntToPoint(x,y : integer) : TPoint;
    SRL/core/.svn/text-base/simba.simba.svn-base:function IntToPoint(x,y : integer) : TPoint;
    ian@ubuntu:~/mahsheet/mySimba/srl-opendev$

  5. #5
    Join Date
    May 2006
    Location
    Australia
    Posts
    370
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Grep is amazing.
    Ok, so its used twice in users.scar. No problem, just delete for next SRL version
    ------
    Strong Holder
    Kill Goblins and Zombies in (ex) bot free zones. Loot & Bank. Stable: 1.2b

  6. #6
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    g/re/p is quite amazing.

    By the way, a quick search for IntToPoint in SRL5 showed no use of IntToPoint.

  7. #7
    Join Date
    Oct 2010
    Location
    Under a bridge
    Posts
    648
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    To use of it is quite lazy in my mind
    Quote Originally Posted by DD on IRC
    wanted to troll the troll

  8. #8
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    hm iv seen similar things such as point; and tile; whats the difference imo tile should be deleted?

  9. #9
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Quote Originally Posted by pur3b100d View Post
    hm iv seen similar things such as point; and tile; whats the difference imo tile should be deleted?
    It can be better for readability to define something as a tile rather than a point, since although they store the same thing are conceptually different.

  10. #10
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Quite useful function actually
    FunctionWhichWantsTPoint(IntToPoint(x, y));
    Saves a few lines and a variable.
    I made a new script, check it out!.

  11. #11
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Quote Originally Posted by Markus View Post
    Quite useful function actually
    FunctionWhichWantsTPoint(IntToPoint(x, y));
    Saves a few lines and a variable.
    Point() does the same thing, shorter function name (less typing pl0x), and IntToPoint is pretty much unused.

    Request:

    Box(x1, y1, x2, y2): TBox rather than IntToBox()?

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
  •