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..
Printable View
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..
EDIT:Nvm, missread the function
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.