2012-08-18 05:45:21 +08:00
|
|
|
|
|
|
|
#include "../Classes/AppDelegate.h"
|
|
|
|
#include "cocos2d.h"
|
|
|
|
|
|
|
|
|
|
|
|
USING_NS_CC;
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
// create the application instance
|
|
|
|
AppDelegate app;
|
|
|
|
|
|
|
|
int width, height;
|
|
|
|
const char *width_str, *height_str;
|
|
|
|
width_str = getenv("WIDTH");
|
|
|
|
height_str = getenv("HEIGHT");
|
|
|
|
if (width_str && height_str)
|
|
|
|
{
|
|
|
|
width = atoi(width_str);
|
|
|
|
height = atoi(height_str);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
width = 1024;
|
|
|
|
height = 600;
|
|
|
|
}
|
|
|
|
|
2013-07-12 13:11:21 +08:00
|
|
|
EGLView* eglView = EGLView::getInstance();
|
2012-08-21 15:28:43 +08:00
|
|
|
eglView->setFrameSize(width, height);
|
2012-08-18 05:45:21 +08:00
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
return Application::sharedApplication()->run();
|
2012-08-18 05:45:21 +08:00
|
|
|
}
|