//------------------------------------------------------------------------------ bool initScenes(CCScene * pScene, CCScene** inScene, CCScene ** outScene) { CCAssert(pScene != NULL, "Argument scene must be non-nil"); CCScene * pOutScene = (CCScene*)CCDirector::sharedDirector()->getNotificationNode(); if (pOutScene == NULL) { pOutScene = CCScene::create(); pOutScene->init(); pOutScene->onEnter(); } pOutScene->retain(); pScene->retain(); CCAssert(pScene != pOutScene, "Incoming scene must be different from the outgoing scene"); *inScene = pScene; *outScene = pOutScene; return true; }