Results 1 to 3 of 3

Thread: Important reflection functions..?

  1. #1
    Join Date
    Feb 2013
    Location
    Rimmington
    Posts
    319
    Mentioned
    33 Post(s)
    Quoted
    183 Post(s)

    Default Important reflection functions..?

    r_TileOnMS

    Simba Code:
    function r_TileOnMS(tile: TPoint): Boolean;
    begin
      Result := (PointInBox(r_TileToMS(tile), IntToBox(MSX1, MSY1, MSX2, MSY2)));
    end;


    adding more as it comes along..
    Last edited by Fitta; 08-23-2014 at 10:02 PM.

  2. #2
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    EDIT:Nvm, missread the function
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  3. #3
    Join Date
    Aug 2007
    Posts
    539
    Mentioned
    20 Post(s)
    Quoted
    266 Post(s)

    Default

    Quote Originally Posted by Fitta View Post
    r_TileOnMS

    Simba Code:
    function r_TileOnMS(tile: TPoint): Boolean;
    begin
      Result := (PointInBox(tile, IntToBox(MSX1, MSY1, MSX2, MSY2)));
    end;


    adding more as it comes along..
    The function in it's current state isn't going to do much. It's only going to see if the TPoint argument is within the boundaries of the main screen's box. You would need to convert the RSTile to a point on the main screen with a function like R_TileToMS.
    Simba Code:
    function R_RSTileOnMS(tile:TRSTile):boolean;
    begin
      result := PointInBox(R_RSTileToMS(tile), MSBox);
    end;

    Just to note, I personally like to keep TPoints and RSTiles separate so the conversation is obvious.

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
  •