diff --git a/Box2D/Box2D-win32.vcproj b/Box2D/Box2D-win32.vcproj
index 29174436c9..77cdb1282c 100644
--- a/Box2D/Box2D-win32.vcproj
+++ b/Box2D/Box2D-win32.vcproj
@@ -4,6 +4,7 @@
Version="9.00"
Name="Box2D-win32"
ProjectGUID="{929480E7-23C0-4DF6-8456-096D71547116}"
+ RootNamespace="Box2D-win32"
Keyword="Win32Proj"
TargetFrameworkVersion="0"
>
@@ -61,6 +62,7 @@
/>
init();
+ g_SharedConfiguration.init();
}
- return g_pSharedConfiguration;
+ return &g_SharedConfiguration;
}
bool CCConfiguration::checkForGLExtension(const string &searchName)
diff --git a/cocos2dx/CCDirector.cpp b/cocos2dx/CCDirector.cpp
index ec908c996a..22e95c7408 100644
--- a/cocos2dx/CCDirector.cpp
+++ b/cocos2dx/CCDirector.cpp
@@ -159,10 +159,6 @@ CCDirector::~CCDirector(void)
CCX_SAFE_RELEASE(m_pRunningScene);
CCX_SAFE_RELEASE(m_pobScenesStack);
- // delete configuration pointer
- CCConfiguration *conf = CCConfiguration::sharedConfiguration();
- CCX_SAFE_RELEASE(conf);
-
// pop the autorelease pool
NSPoolManager::getInstance()->pop();
diff --git a/cocos2dx/cocos2dx-win32.vcproj b/cocos2dx/cocos2dx-win32.vcproj
index a9721e5e68..7bdf77c467 100644
--- a/cocos2dx/cocos2dx-win32.vcproj
+++ b/cocos2dx/cocos2dx-win32.vcproj
@@ -64,12 +64,14 @@
setOpenGLView(&m_MainForm);
+
+ pDirector->setDisplayFPS(true);
+
+ CCScene * pScene = CCScene::node();
+ CCLayer * pLayer = new TestController();
+ pLayer->autorelease();
+
+ pScene->addChild(pLayer);
+ pDirector->replaceScene(pScene);
+
+ return true;
+}
+
+void TestApplication::applicationDidEnterBackground()
+{
+ CCDirector::getSharedDirector()->stopAnimation();
+}
+
+void TestApplication::applicationWillEnterForeground()
+{
+ CCDirector::getSharedDirector()->startAnimation();
+}
\ No newline at end of file
diff --git a/test_win32/TestApplication.h b/test_win32/TestApplication.h
new file mode 100644
index 0000000000..c970c5b0b8
--- /dev/null
+++ b/test_win32/TestApplication.h
@@ -0,0 +1,19 @@
+#ifndef __TEST_APPLICATION_H__
+#define __TEST_APPLICATION_H__
+
+#include "cocos2d.h"
+
+class TestApplication : public cocos2d::CCXApplication
+{
+public:
+ virtual bool initCocos2d();
+ virtual bool InitInstance();
+
+ virtual void applicationDidEnterBackground();
+ virtual void applicationWillEnterForeground();
+
+protected:
+ cocos2d::CCXEGLView m_MainForm;
+};
+
+#endif // __TEST_APPLICATION_H__
\ No newline at end of file
diff --git a/test_win32/application.cpp b/test_win32/application.cpp
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/test_win32/application.h b/test_win32/application.h
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/test_win32/copy_res.bat b/test_win32/copy_res.bat
new file mode 100644
index 0000000000..992d0da2bb
--- /dev/null
+++ b/test_win32/copy_res.bat
@@ -0,0 +1,4 @@
+echo off
+set OUTPUT_BY_SVN=1
+set TOOLSDIR=..
+call %TOOLSDIR%\output.bat %CD%\Res %1
diff --git a/test_win32/test-win32.vcproj b/test_win32/test-win32.vcproj
index 9e6784720e..10c80ae3b6 100644
--- a/test_win32/test-win32.vcproj
+++ b/test_win32/test-win32.vcproj
@@ -41,13 +41,15 @@
@@ -169,11 +181,7 @@
Name="include"
>
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test_win32/winmain.cpp b/test_win32/winmain.cpp
index ecd2a8b078..1048c6f7ed 100644
--- a/test_win32/winmain.cpp
+++ b/test_win32/winmain.cpp
@@ -1,4 +1,5 @@
#include "winmain.h"
+#include "TestApplication.h"
HINSTANCE g_hInstance;
@@ -13,10 +14,10 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
g_hInstance = hInstance;
int nRet = 0;
-// HelloWorldApplication app;
-// if (app.InitInstance() && app.initCocos2d())
-// {
-// nRet = app.Run();
-// }
+ TestApplication app;
+ if (app.InitInstance() && app.initCocos2d())
+ {
+ nRet = app.Run();
+ }
return nRet;
}