Macro For fcw32.mac: inmaptest
DaltonSpence
Mapmaker
I would like to suggest that the following macro be included in the next version of the official macro file. As I mentioned in my TIP: Determining Map Width in Macros discussion you can get the effective boundries of a map by getting the extents of the BACKGROUND
sheet. The following macro tests a point to determine if it is inside these boundries.
MACRO inmaptest
IFDEF mapxyl chkInMap
GETSHEETL mapxyl;BACKGROUND
GETX mapxl mapxyl
GETY mapyl mapxyl
GETSHEETH mapxyh;BACKGROUND
GETX mapxh mapxyh
GETY mapyh mapxyh
:chkInMap
GETX px p
GETY py p
GN isInMap 0
IFN px-mapxl notInMap
IFN py-mapyl notInMap
IFP px-mapxh notInMap
IFP py-mapyh notInMap
GN isInMap 1
:notInMap
ENDM
Like the very useful ontest
macro the point tested is in the variable “p”. This would most effectively be used to check the validity of macro generated points.
Comments
As for inclusions in fcw32.mac, contact Ralf.