diff --git a/HelloWorld/HelloWorldApp.cpp b/HelloWorld/HelloWorld.cpp similarity index 85% rename from HelloWorld/HelloWorldApp.cpp rename to HelloWorld/HelloWorld.cpp index 2d9cabb9ac..63c272543a 100644 --- a/HelloWorld/HelloWorldApp.cpp +++ b/HelloWorld/HelloWorld.cpp @@ -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(); } diff --git a/HelloWorld/HelloWorldApp.h b/HelloWorld/HelloWorld.h similarity index 61% rename from HelloWorld/HelloWorldApp.h rename to HelloWorld/HelloWorld.h index 3f21878be8..283c2a5e63 100644 --- a/HelloWorld/HelloWorldApp.h +++ b/HelloWorld/HelloWorld.h @@ -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); diff --git a/HelloWorld/HelloWorld.vcproj b/HelloWorld/HelloWorld.vcproj index eea44f9548..f98b9f6941 100644 --- a/HelloWorld/HelloWorld.vcproj +++ b/HelloWorld/HelloWorld.vcproj @@ -187,11 +187,11 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" >