From b9d4b60486e224261990c0732852513e86dd94ff Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Fri, 2 Oct 2015 23:48:34 +0800 Subject: Add BLR3 files. Modify Readme. Currently BLR3 is VERY primitive!! --- src/main.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/main.cpp (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..afe37d4 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,30 @@ +#include "smelt.hpp" +#include "master/master.hpp" +#include "master/resources.hpp" +#include +SMELT *sm; +sceneManager *sceneMgr; +bool update(){return sceneMgr->update();} +bool foc(){if(sceneMgr->isSceneActive(sceneMgr->getSceneID("GameScene")))sceneMgr->startUpdate();return false;} +bool unfoc(){if(sceneMgr->isSceneActive(sceneMgr->getSceneID("GameScene"))&&sceneMgr->isThreadActive())sceneMgr->stopUpdate();return false;} +int main(int argc,char **argv) +{ + srand(time(NULL)); + sm=smGetInterface(SMELT_APILEVEL); + sceneMgr=new sceneManager; + resourcesLoad(); + sm->smVidMode(960,720,true); + sm->smUpdateFunc(update); + sm->smFocFunc(foc);sm->smUnFocFunc(unfoc); + sm->smWinTitle("Bullet Lab Remix 3"); + sm->smSetFPS(FPS_VSYNC); + sm->smInit(); + introScene *insc=new introScene; + insc->introInit(); + sm->smMainLoop(); + sm->smFinale(); + resourcesUnload(); + delete sceneMgr; + sm->smRelease(); + return 0; +} -- cgit v1.2.3