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