Request: void * data on cpSpace

Discuss new features and future development.

Request: void * data on cpSpace

Postby pat » Fri Oct 08, 2010 5:20 pm

Hey there, This is something i think could be useful. Basically i'm accomplishing this now through cpSpace.staticBody.data but i really don't think it would hurt much to have a void *data member in cpSpace. I'm using the void * data in cpSpace.staticBody.data just to tie the game class in. So i can just cast it to that during things like collision callbacks. Using the void*data in staticBody works for now, but if i actually moved to tieing things into body's data member it would be a pain, but i'm not saying i'm planning on doing that either. Just thought maybe this would be ideal for most people.

I've been playing with the idea of having multiple spaces too, So it could help here as well.
User avatar
pat
 
Posts: 53
Joined: Tue Jul 20, 2010 7:55 pm

Re: Request: void * data on cpSpace

Postby slembcke » Fri Oct 08, 2010 6:03 pm

Actually I was just thinking about this yesterday. Added to the TODO list.

I just got the changes ready to push out for 5.3.2, so it'll have to wait for the next version though.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Request: void * data on cpSpace

Postby pat » Fri Oct 08, 2010 9:34 pm

awesome, no hurry.
User avatar
pat
 
Posts: 53
Joined: Tue Jul 20, 2010 7:55 pm


Return to Features/Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron