2013-01-03 07:53:31 +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();
|
2013-01-03 07:53:31 +08:00
|
|
|
eglView->setFrameSize(width, height);
|
|
|
|
|
2013-07-15 16:24:42 +08:00
|
|
|
return Application::getInstance()->run();
|
2013-01-03 07:53:31 +08:00
|
|
|
}
|