mirror of https://github.com/axmolengine/axmol.git
make HelloWorld easier
This commit is contained in:
parent
ea4ea4b5a2
commit
4ec20bb873
|
@ -3,9 +3,8 @@
|
||||||
// Original file name: HelloWorldApp.cpp
|
// Original file name: HelloWorldApp.cpp
|
||||||
// Generated by TOPS Builder:Project wizard,Date:2010-8-3
|
// Generated by TOPS Builder:Project wizard,Date:2010-8-3
|
||||||
|
|
||||||
#include "HelloWorldApp.h"
|
#include "HelloWorld.h"
|
||||||
|
|
||||||
#include "cocos2d.h"
|
|
||||||
using namespace cocos2d;
|
using namespace cocos2d;
|
||||||
|
|
||||||
#define IMG_PATH "/NEWPLUS/TDA_DATA/UserData/HelloWorld.png"
|
#define IMG_PATH "/NEWPLUS/TDA_DATA/UserData/HelloWorld.png"
|
||||||
|
@ -37,14 +36,14 @@ public:
|
||||||
|
|
||||||
// AppDelegate
|
// AppDelegate
|
||||||
|
|
||||||
THelloWorldApp::THelloWorldApp()
|
HelloWorldAppDelegate::HelloWorldAppDelegate()
|
||||||
: m_rcWnd(0, 0, GetScreenWidth(), GetScreenHeight())
|
: m_rcWnd(0, 0, GetScreenWidth(), GetScreenHeight())
|
||||||
, m_pMainWnd(NULL)
|
, m_pMainWnd(NULL)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool THelloWorldApp::initCocos2d()
|
bool HelloWorldAppDelegate::initCocos2d()
|
||||||
{
|
{
|
||||||
// init director
|
// init director
|
||||||
CCDirector::getSharedDirector()->setOpenGLView(m_pMainWnd);
|
CCDirector::getSharedDirector()->setOpenGLView(m_pMainWnd);
|
||||||
|
@ -73,7 +72,7 @@ bool THelloWorldApp::initCocos2d()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Boolean THelloWorldApp::EventHandler(EventType* pEvent)
|
Boolean HelloWorldAppDelegate::EventHandler(EventType* pEvent)
|
||||||
{
|
{
|
||||||
Boolean bHandled = FALSE;
|
Boolean bHandled = FALSE;
|
||||||
switch(pEvent->eType)
|
switch(pEvent->eType)
|
||||||
|
@ -96,6 +95,6 @@ Boolean THelloWorldApp::EventHandler(EventType* pEvent)
|
||||||
// application main entry
|
// application main entry
|
||||||
Int32 TG3AppMain(const TUChar * pAppID, UInt32 nCmd, void * pCmdParam)
|
Int32 TG3AppMain(const TUChar * pAppID, UInt32 nCmd, void * pCmdParam)
|
||||||
{
|
{
|
||||||
THelloWorldApp app;
|
HelloWorldAppDelegate app;
|
||||||
return app.Run();
|
return app.Run();
|
||||||
}
|
}
|
|
@ -4,15 +4,15 @@
|
||||||
// Generated by TOPS Builder:Project wizard,Date:2010-8-3
|
// Generated by TOPS Builder:Project wizard,Date:2010-8-3
|
||||||
|
|
||||||
|
|
||||||
#ifndef __HelloWorld_App_H__
|
#ifndef __HELLOWORLD_H__
|
||||||
#define __HelloWorld_App_H__
|
#define __HELLOWORLD_H__
|
||||||
#include "CCXApplication.h"
|
|
||||||
#include "CCXEGLView.h"
|
|
||||||
|
|
||||||
class THelloWorldApp : public cocos2d::CCXApplication
|
#include "cocos2d.h"
|
||||||
|
|
||||||
|
class HelloWorldAppDelegate : public cocos2d::CCXApplication
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
THelloWorldApp();
|
HelloWorldAppDelegate();
|
||||||
|
|
||||||
virtual bool initCocos2d();
|
virtual bool initCocos2d();
|
||||||
virtual Boolean EventHandler(EventType * pEvent);
|
virtual Boolean EventHandler(EventType * pEvent);
|
|
@ -187,11 +187,11 @@
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
>
|
>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\HelloWorldApp.cpp"
|
RelativePath=".\HelloWorld.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\HelloWorldApp.h"
|
RelativePath=".\HelloWorld.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
|
Loading…
Reference in New Issue