2013-03-02 01:09:58 +08:00
|
|
|
#include "main.h"
|
|
|
|
#include "../Classes/AppDelegate.h"
|
|
|
|
#include "cocos2d.h"
|
|
|
|
#include "CCInstance.h"
|
|
|
|
#include "CCModule.h"
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <string>
|
|
|
|
#include <AL/alc.h>
|
|
|
|
|
|
|
|
#include "fcntl.h"
|
|
|
|
#include "sys/stat.h"
|
|
|
|
|
|
|
|
USING_NS_CC;
|
|
|
|
|
|
|
|
AppDelegate g_app;
|
|
|
|
|
|
|
|
void* cocos_main(void* arg)
|
|
|
|
{
|
|
|
|
fprintf(stderr, "in cocos_main\n");
|
2013-03-06 07:50:51 +08:00
|
|
|
CocosPepperInstance* instance = (CocosPepperInstance*)arg;
|
2013-03-02 01:09:58 +08:00
|
|
|
alSetPpapiInfo(instance->pp_instance(), pp::Module::Get()->get_browser_interface());
|
|
|
|
fprintf(stderr, "calling application->run\n");
|
2013-06-20 14:17:10 +08:00
|
|
|
int rtn = Application::sharedApplication()->run();
|
2013-03-02 01:09:58 +08:00
|
|
|
fprintf(stderr, "app run returned: %d\n", rtn);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace pp
|
|
|
|
{
|
|
|
|
|
|
|
|
Module* CreateModule()
|
|
|
|
{
|
|
|
|
return new CocosPepperModule();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|