View Full Version : Important reflection functions..?
Fitta
08-23-2014, 06:54 PM
r_TileOnMS
function r_TileOnMS(tile: TPoint): Boolean;
begin
Result := (PointInBox(r_TileToMS(tile), IntToBox(MSX1, MSY1, MSX2, MSY2)));
end;
adding more as it comes along..
EDIT:Nvm, missread the function
ineedbot
08-23-2014, 09:15 PM
r_TileOnMS
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.
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.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.