From 340467638a31ac896a063f1793ef6297d3cd2c23 Mon Sep 17 00:00:00 2001 From: James Gregory Date: Wed, 3 Apr 2013 18:29:15 -0700 Subject: [PATCH] Add main.cpp files for app samples --- samples/Cpp/HelloCpp/proj.emscripten/main.cpp | 20 +++++++++++++++++++ .../Cpp/SimpleGame/proj.emscripten/main.cpp | 20 +++++++++++++++++++ samples/Cpp/TestCpp/proj.emscripten/main.cpp | 19 ++++++++++++++++++ samples/Lua/HelloLua/proj.emscripten/main.cpp | 18 +++++++++++++++++ samples/Lua/TestLua/proj.emscripten/main.cpp | 19 ++++++++++++++++++ 5 files changed, 96 insertions(+) create mode 100644 samples/Cpp/HelloCpp/proj.emscripten/main.cpp create mode 100644 samples/Cpp/SimpleGame/proj.emscripten/main.cpp create mode 100644 samples/Cpp/TestCpp/proj.emscripten/main.cpp create mode 100644 samples/Lua/HelloLua/proj.emscripten/main.cpp create mode 100644 samples/Lua/TestLua/proj.emscripten/main.cpp diff --git a/samples/Cpp/HelloCpp/proj.emscripten/main.cpp b/samples/Cpp/HelloCpp/proj.emscripten/main.cpp new file mode 100644 index 0000000000..be615ef301 --- /dev/null +++ b/samples/Cpp/HelloCpp/proj.emscripten/main.cpp @@ -0,0 +1,20 @@ +#include "../Classes/AppDelegate.h" +#include "cocos2d.h" + +#include +#include +#include +#include + +USING_NS_CC; + +int main(int argc, char **argv) +{ + // create the application instance + AppDelegate app; + + CCEGLView* eglView = CCEGLView::sharedOpenGLView(); + eglView->setFrameSize(800, 480); + + return CCApplication::sharedApplication()->run(); +} diff --git a/samples/Cpp/SimpleGame/proj.emscripten/main.cpp b/samples/Cpp/SimpleGame/proj.emscripten/main.cpp new file mode 100644 index 0000000000..fbaeec114b --- /dev/null +++ b/samples/Cpp/SimpleGame/proj.emscripten/main.cpp @@ -0,0 +1,20 @@ +#include "../Classes/AppDelegate.h" +#include "cocos2d.h" + +#include +#include +#include +#include + +USING_NS_CC; + +int main(int argc, char **argv) +{ + // create the application instance + AppDelegate app; + + CCEGLView* eglView = CCEGLView::sharedOpenGLView(); + eglView->setFrameSize(800, 480); + + return CCApplication::sharedApplication()->run(); +} diff --git a/samples/Cpp/TestCpp/proj.emscripten/main.cpp b/samples/Cpp/TestCpp/proj.emscripten/main.cpp new file mode 100644 index 0000000000..bbaa8a6d23 --- /dev/null +++ b/samples/Cpp/TestCpp/proj.emscripten/main.cpp @@ -0,0 +1,19 @@ +#include "../Classes/AppDelegate.h" +#include "cocos2d.h" +#include "CCEGLView.h" + +#include +#include +#include +#include + +USING_NS_CC; + +int main(int argc, char **argv) +{ + // create the application instance + AppDelegate app; + CCEGLView* eglView = CCEGLView::sharedOpenGLView(); + eglView->setFrameSize(800, 480); + return CCApplication::sharedApplication()->run(); +} diff --git a/samples/Lua/HelloLua/proj.emscripten/main.cpp b/samples/Lua/HelloLua/proj.emscripten/main.cpp new file mode 100644 index 0000000000..dd21672f23 --- /dev/null +++ b/samples/Lua/HelloLua/proj.emscripten/main.cpp @@ -0,0 +1,18 @@ +#include "../Classes/AppDelegate.h" +#include "cocos2d.h" + +#include +#include +#include +#include + +USING_NS_CC; + +int main(int argc, char **argv) +{ + // create the application instance + AppDelegate app; + CCEGLView* eglView = CCEGLView::sharedOpenGLView(); + eglView->setFrameSize(960, 640); + return CCApplication::sharedApplication()->run(); +} diff --git a/samples/Lua/TestLua/proj.emscripten/main.cpp b/samples/Lua/TestLua/proj.emscripten/main.cpp new file mode 100644 index 0000000000..bbaa8a6d23 --- /dev/null +++ b/samples/Lua/TestLua/proj.emscripten/main.cpp @@ -0,0 +1,19 @@ +#include "../Classes/AppDelegate.h" +#include "cocos2d.h" +#include "CCEGLView.h" + +#include +#include +#include +#include + +USING_NS_CC; + +int main(int argc, char **argv) +{ + // create the application instance + AppDelegate app; + CCEGLView* eglView = CCEGLView::sharedOpenGLView(); + eglView->setFrameSize(800, 480); + return CCApplication::sharedApplication()->run(); +}