But I am getting a couple of (compile) errors.
• Problem 1 in PlanetCuteRUBELayer.mm (solved), just showing it if it might help others:
The first error was "Cast of C pointer type 'void *' to Objective-C pointer type 'PlanetCuteFixtureUserData *' requires a bridged cast", I solved this pretty easily:
I changed this line:
Code: Select all
PlanetCuteFixtureUserData* fudA = (PlanetCuteFixtureUserData*)fA->GetUserData();
Code: Select all
PlanetCuteFixtureUserData* fudA = (__bridge PlanetCuteFixtureUserData*)fA->GetUserData();
in "-(void)afterLoadProcessing:(b2dJson*)json" I get this error:
ERROR CODE: Cannot initialize a parameter of type 'void *' with an lvalue of type 'PlanetCuteFixtureUserData *__strong'
Code: Select all
// For every pickup fixture, we create a FixtureUserData to set in
// the user data.
PlanetCuteFixtureUserData* fud = [[PlanetCuteFixtureUserData alloc] init];
[m_allPickups addObject:fud];
f->SetUserData( fud ); // <- This is not working
• Problem 3 in PlanetCuteRUBELayer.mm (not solved):
in "-(void)afterLoadProcessing:(b2dJson*)json" I also get this error:
ERROR CODE: Assigning to 'void *' from incompatible type 'PlanetCuteRUBELayer *const __strong'
Code: Select all
// Create a contact listener and let the Box2D world know about it.
m_contactListener = new PlanetCuteContactListener();
m_world->SetContactListener( m_contactListener );
// Give the listener a reference to this class, to use in the callback
m_contactListener->m_layer = self; // This is not working


Any plans on updating the demos for cocos2d v.2 with arc?
