PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Collision Mask

Is it possible to rotate a collision mask? If there isn't it would be nice to have a DrawMask function that would take GDBLTFX on the next GapiDraw version.(Just a suggestion) :roll:
Hi,

It's now on my todo-list. 8)

/Johan
... in the mean time, you can achieve the exact same effect by:

(1) Calculate the color used to represent your maskid. The formula is listed on gapidraw.com, and is:

Color = RGB(((dwMaskID & 0x1F) << 3), ((dwMaskID & 0x3E0) >> 2), (dwMaskID & 0x7C00) >> 7))

(2) Draw the sprite to the mask surface using Blt with rotation and Colorfill, using the color above.

Voilá! :)

/Johan
Is there a way to use GetMaskID with rotation? :x :arrow: :lol:
Actually, that's not quite as easy to implement... Hmm...

Is there any way for you to avoid real-time rotation? I mean the sprites could most probably be precalced onto a separate surface...