mirror of https://github.com/axmolengine/axmol.git
Migrate namespace for templates [skip ci]
This commit is contained in:
parent
376941da91
commit
a2a3bbe6c4
|
@ -70,7 +70,7 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
#if (AX_TARGET_PLATFORM == AX_PLATFORM_WIN32) || (AX_TARGET_PLATFORM == AX_PLATFORM_MAC) || \
|
||||
(AX_TARGET_PLATFORM == AX_PLATFORM_LINUX)
|
||||
glView = GLViewImpl::createWithRect(
|
||||
"HelloCpp", axis::Rect(0, 0, designResolutionSize.width, designResolutionSize.height));
|
||||
"HelloCpp", ax::Rect(0, 0, designResolutionSize.width, designResolutionSize.height));
|
||||
#else
|
||||
glView = GLViewImpl::create("HelloCpp");
|
||||
#endif
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
Private inheritance here hides part of interface from Director.
|
||||
*/
|
||||
class AppDelegate : private axis::Application
|
||||
class AppDelegate : private ax::Application
|
||||
{
|
||||
public:
|
||||
AppDelegate();
|
||||
|
|
|
@ -42,11 +42,11 @@ static AppDelegate s_sharedApplication;
|
|||
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
|
||||
{
|
||||
|
||||
axis::Application* app = axis::Application::getInstance();
|
||||
ax::Application* app = ax::Application::getInstance();
|
||||
|
||||
// Initialize the GLView attributes
|
||||
app->initGLContextAttrs();
|
||||
axis::GLViewImpl::convertAttrs();
|
||||
ax::GLViewImpl::convertAttrs();
|
||||
|
||||
// Override point for customization after application launch.
|
||||
|
||||
|
@ -84,8 +84,8 @@ static AppDelegate s_sharedApplication;
|
|||
}
|
||||
|
||||
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
|
||||
axis::GLView* glView = axis::GLViewImpl::createWithEAGLView((__bridge void*)_viewController.view);
|
||||
axis::Director::getInstance()->setOpenGLView(glView);
|
||||
ax::GLView* glView = ax::GLViewImpl::createWithEAGLView((__bridge void*)_viewController.view);
|
||||
ax::Director::getInstance()->setOpenGLView(glView);
|
||||
|
||||
// run the cocos2d-x game scene
|
||||
app->run();
|
||||
|
@ -102,7 +102,7 @@ static AppDelegate s_sharedApplication;
|
|||
throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||
*/
|
||||
// We don't need to call this method any more. It will interrupt user defined game pause&resume logic
|
||||
/* axis::Director::getInstance()->pause(); */
|
||||
/* ax::Director::getInstance()->pause(); */
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication*)application
|
||||
|
@ -112,7 +112,7 @@ static AppDelegate s_sharedApplication;
|
|||
previously in the background, optionally refresh the user interface.
|
||||
*/
|
||||
// We don't need to call this method any more. It will interrupt user defined game pause&resume logic
|
||||
/* axis::Director::getInstance()->resume(); */
|
||||
/* ax::Director::getInstance()->resume(); */
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication*)application
|
||||
|
@ -122,7 +122,7 @@ static AppDelegate s_sharedApplication;
|
|||
information to restore your application to its current state in case it is terminated later. If your application
|
||||
supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
axis::Application::getInstance()->applicationDidEnterBackground();
|
||||
ax::Application::getInstance()->applicationDidEnterBackground();
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication*)application
|
||||
|
@ -131,7 +131,7 @@ static AppDelegate s_sharedApplication;
|
|||
Called as part of transition from the background to the inactive state: here you can undo many of the changes made
|
||||
on entering the background.
|
||||
*/
|
||||
axis::Application::getInstance()->applicationWillEnterForeground();
|
||||
ax::Application::getInstance()->applicationWillEnterForeground();
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication*)application
|
||||
|
|
|
@ -46,12 +46,12 @@ customization that is not appropriate for viewDidLoad.
|
|||
{
|
||||
// Initialize the CCEAGLView
|
||||
CCEAGLView* eaglView = [CCEAGLView viewWithFrame:[UIScreen mainScreen].bounds
|
||||
pixelFormat:(__bridge NSString*)axis::GLViewImpl::_pixelFormat
|
||||
depthFormat:axis::GLViewImpl::_depthFormat
|
||||
pixelFormat:(__bridge NSString*)ax::GLViewImpl::_pixelFormat
|
||||
depthFormat:ax::GLViewImpl::_depthFormat
|
||||
preserveBackbuffer:NO
|
||||
sharegroup:nil
|
||||
multiSampling:axis::GLViewImpl::_multisamplingCount > 0 ? YES : NO
|
||||
numberOfSamples:axis::GLViewImpl::_multisamplingCount];
|
||||
multiSampling:ax::GLViewImpl::_multisamplingCount > 0 ? YES : NO
|
||||
numberOfSamples:ax::GLViewImpl::_multisamplingCount];
|
||||
|
||||
// Enable or disable multiple touches
|
||||
#if !defined(AX_TARGET_OS_TVOS)
|
||||
|
@ -95,7 +95,7 @@ customization that is not appropriate for viewDidLoad.
|
|||
{
|
||||
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
|
||||
|
||||
auto glView = axis::Director::getInstance()->getOpenGLView();
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
|
||||
if (glView)
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ customization that is not appropriate for viewDidLoad.
|
|||
if (eaglView)
|
||||
{
|
||||
CGSize s = CGSizeMake([eaglView getWidth], [eaglView getHeight]);
|
||||
axis::Application::getInstance()->applicationScreenSizeChanged((int)s.width, (int)s.height);
|
||||
ax::Application::getInstance()->applicationScreenSizeChanged((int)s.width, (int)s.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
Private inheritance here hides part of interface from Director.
|
||||
*/
|
||||
class AppDelegate : private axis::Application
|
||||
class AppDelegate : private ax::Application
|
||||
{
|
||||
public:
|
||||
AppDelegate();
|
||||
|
|
|
@ -42,11 +42,11 @@ static AppDelegate s_sharedApplication;
|
|||
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
|
||||
{
|
||||
|
||||
axis::Application* app = axis::Application::getInstance();
|
||||
ax::Application* app = ax::Application::getInstance();
|
||||
|
||||
// Initialize the GLView attributes
|
||||
app->initGLContextAttrs();
|
||||
axis::GLViewImpl::convertAttrs();
|
||||
ax::GLViewImpl::convertAttrs();
|
||||
|
||||
// Override point for customization after application launch.
|
||||
|
||||
|
@ -84,8 +84,8 @@ static AppDelegate s_sharedApplication;
|
|||
}
|
||||
|
||||
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
|
||||
axis::GLView* glView = axis::GLViewImpl::createWithEAGLView((__bridge void*)_viewController.view);
|
||||
axis::Director::getInstance()->setOpenGLView(glView);
|
||||
ax::GLView* glView = ax::GLViewImpl::createWithEAGLView((__bridge void*)_viewController.view);
|
||||
ax::Director::getInstance()->setOpenGLView(glView);
|
||||
|
||||
// run the cocos2d-x game scene
|
||||
app->run();
|
||||
|
@ -102,7 +102,7 @@ static AppDelegate s_sharedApplication;
|
|||
throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||
*/
|
||||
// We don't need to call this method any more. It will interrupt user defined game pause&resume logic
|
||||
/* axis::Director::getInstance()->pause(); */
|
||||
/* ax::Director::getInstance()->pause(); */
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication*)application
|
||||
|
@ -112,7 +112,7 @@ static AppDelegate s_sharedApplication;
|
|||
previously in the background, optionally refresh the user interface.
|
||||
*/
|
||||
// We don't need to call this method any more. It will interrupt user defined game pause&resume logic
|
||||
/* axis::Director::getInstance()->resume(); */
|
||||
/* ax::Director::getInstance()->resume(); */
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication*)application
|
||||
|
@ -122,7 +122,7 @@ static AppDelegate s_sharedApplication;
|
|||
information to restore your application to its current state in case it is terminated later. If your application
|
||||
supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
axis::Application::getInstance()->applicationDidEnterBackground();
|
||||
ax::Application::getInstance()->applicationDidEnterBackground();
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication*)application
|
||||
|
@ -131,7 +131,7 @@ static AppDelegate s_sharedApplication;
|
|||
Called as part of transition from the background to the inactive state: here you can undo many of the changes made
|
||||
on entering the background.
|
||||
*/
|
||||
axis::Application::getInstance()->applicationWillEnterForeground();
|
||||
ax::Application::getInstance()->applicationWillEnterForeground();
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication*)application
|
||||
|
|
|
@ -46,8 +46,8 @@ customization that is not appropriate for viewDidLoad.
|
|||
{
|
||||
// Initialize the CCEAGLView
|
||||
CCEAGLView* eaglView = [CCEAGLView viewWithFrame:[UIScreen mainScreen].bounds
|
||||
pixelFormat:(__bridge NSString*)axis::GLViewImpl::_pixelFormat
|
||||
depthFormat:axis::GLViewImpl::_depthFormat
|
||||
pixelFormat:(__bridge NSString*)ax::GLViewImpl::_pixelFormat
|
||||
depthFormat:ax::GLViewImpl::_depthFormat
|
||||
preserveBackbuffer:NO
|
||||
sharegroup:nil
|
||||
multiSampling:NO
|
||||
|
@ -93,7 +93,7 @@ customization that is not appropriate for viewDidLoad.
|
|||
{
|
||||
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
|
||||
|
||||
auto glView = axis::Director::getInstance()->getOpenGLView();
|
||||
auto glView = ax::Director::getInstance()->getOpenGLView();
|
||||
|
||||
if (glView)
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ customization that is not appropriate for viewDidLoad.
|
|||
if (eaglView)
|
||||
{
|
||||
CGSize s = CGSizeMake([eaglView getWidth], [eaglView getHeight]);
|
||||
axis::Application::getInstance()->applicationScreenSizeChanged((int)s.width, (int)s.height);
|
||||
ax::Application::getInstance()->applicationScreenSizeChanged((int)s.width, (int)s.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue