Hi all … Coming from a Cocos2d-iPhone background … I have a couple of outstanding questions on Cocos2d-x …Please!
-
Is there any chance of getting retina disable back? Its very handy for fixing APPs on iPods that claim to handle large image files but often do not!
-
If not … is there much to me adjusting the CCDirector file and maybe CCEGLView file to retrieve it without causing havoc to myself?
-
if not … and better still … Any way of detecting the device running the APP as in NSString * deviceType = [UIDevice currentDevice].model; in ObjC?
-
Any way of putting in a 3D layer like a COCOS3D -x?
Regards
Harry
Ok scratch questions 1,2,3 as I found a simple answer that works for those. For anyone interested I go into the ios folder of the APP and modify APPController.mm (i.e. the one that sets up and does sharedApplication()>run to start the Cocos2d-x APP) and stick this into the (BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:launchOptions{} method
NSString deviceType = [UIDevice currentDevice].model;
NSRange match = [deviceType rangeOfString: `“iPod”];
if(match.location != NSNotFound){
NSLog(`“iPodFix”);
[[NSUserDefaults standardUserDefaults] setValue:"YES" forKey:
“isIPOD”];
}else{
NSLog("NoiPodFix"); [[NSUserDefaults standardUserDefaults] setValue:
“NO” forKey:@“isIPOD”];
}
Then in the AppDelegate.cpp file of Classes use it like so …
std::string iPod = CCUserDefault::sharedUserDefault()>getStringForKey;
if
{
CCLOG (“iPod”);
CCSize resourceSize = CCSizeMake;
std::vectorstd::string searchPaths;
searchPaths.push_back;
pFileUtils>setSearchPaths(searchPaths);
pDirector->setContentScaleFactor(resourceSize.height/designSize.height);
}
I’m still looking for a work around to get a simple 3D object into a scene … any ideas?