2013-05-22 20:45:53 +08:00
|
|
|
//
|
|
|
|
// This file contains the Tizen application entry point.
|
|
|
|
//
|
|
|
|
#include "../../Classes/AppDelegate.h"
|
|
|
|
#include "cocos2d.h"
|
|
|
|
|
|
|
|
USING_NS_CC;
|
|
|
|
using namespace Tizen::Base;
|
|
|
|
using namespace Tizen::Base::Collection;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif // __cplusplus
|
|
|
|
|
|
|
|
void
|
|
|
|
ApplicationInitialized(void)
|
|
|
|
{
|
|
|
|
AppDelegate* pAppDelegate = new AppDelegate;
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
EGLView* eglView = EGLView::sharedOpenGLView();
|
2013-06-09 18:54:35 +08:00
|
|
|
eglView->setFrameSize(1280, 720);
|
2013-05-22 20:45:53 +08:00
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
Application::sharedApplication()->run();
|
2013-05-22 20:45:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// The entry function of Tizen application called by the operating system.
|
|
|
|
//
|
|
|
|
_EXPORT_ int
|
|
|
|
OspMain(int argc, char *pArgv[])
|
|
|
|
{
|
|
|
|
AppLog("Application started.");
|
|
|
|
ArrayList args(SingleObjectDeleter);
|
|
|
|
args.Construct();
|
|
|
|
for (int i = 0; i < argc; i++)
|
|
|
|
{
|
2013-06-20 18:20:27 +08:00
|
|
|
args.Add(new (std::nothrow) Tizen::Base::String(pArgv[i]));
|
2013-05-22 20:45:53 +08:00
|
|
|
}
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
OspApplication::SetApplicationInitializedCallback(ApplicationInitialized);
|
|
|
|
OspApplication::SetScreenOrientation(Tizen::Ui::ORIENTATION_LANDSCAPE);
|
|
|
|
result r = Tizen::App::Application::Execute(OspApplication::CreateInstance, &args);
|
2013-05-22 20:45:53 +08:00
|
|
|
TryLog(r == E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r));
|
|
|
|
AppLog("Application finished.");
|
|
|
|
|
|
|
|
return static_cast<int>(r);
|
|
|
|
}
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif // __cplusplus
|