This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Collision Mask


Collision Mask

Postby BooRad » Sep 7, 2002 @ 5:54am

Make it idiot proof and someone will make a better idiot.
User avatar
BooRad
pm Member
 
Posts: 7
Joined: Aug 6, 2002 @ 5:26am


Postby Johan » Sep 9, 2002 @ 6:12pm

Hi,

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

/Johan
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby Johan » Sep 10, 2002 @ 12:46am

... 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
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby BooRad » Sep 18, 2002 @ 12:18am

User avatar
BooRad
pm Member
 
Posts: 7
Joined: Aug 6, 2002 @ 5:26am


Postby Johan » Sep 18, 2002 @ 12:23am

User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron