Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.

    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
    GETX mapxl mapxyl
    GETY mapyl mapxyl
    GETX mapxh mapxyh
    GETY mapyh mapxyh
    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

    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.

    • CommentTimeJan 22nd 2020
    Posted By: DaltonSpenceIFDEF mapxyl chkInMap
    Remember that variables aren't reset between loading different maps, so by using this check, it will keep using the dimensions of the first map you ran it on during the current session.

    As for inclusions in fcw32.mac, contact Ralf.
    They aren't? Oops! (I had that midnight revelation yesterday but no home internet to make the correction.)