This commit is contained in:
walzer 2011-04-07 15:16:30 +08:00
commit 63f323456c
6 changed files with 34 additions and 30 deletions

View File

@ -276,7 +276,7 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
case WM_LBUTTONDOWN:
if (m_pDelegate && m_pTouch && MK_LBUTTON == wParam)
{
POINT pt = {LOWORD(lParam), HIWORD(lParam)};
POINT pt = {(short)LOWORD(lParam), (short)HIWORD(lParam)};
if (PtInRect(&m_rcViewPort, pt))
{
m_bCaptured = true;
@ -292,8 +292,8 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
case WM_MOUSEMOVE:
if (MK_LBUTTON == wParam && m_bCaptured)
{
m_pTouch->SetTouchInfo(0, (float)(LOWORD(lParam)- m_rcViewPort.left) / m_fScreenScaleFactor,
(float)(HIWORD(lParam) - m_rcViewPort.top) / m_fScreenScaleFactor);
m_pTouch->SetTouchInfo(0, (float)((short)LOWORD(lParam)- m_rcViewPort.left) / m_fScreenScaleFactor,
(float)((short)HIWORD(lParam) - m_rcViewPort.top) / m_fScreenScaleFactor);
m_pDelegate->touchesMoved(m_pSet, NULL);
}
break;
@ -301,8 +301,8 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
case WM_LBUTTONUP:
if (m_bCaptured)
{
m_pTouch->SetTouchInfo(0, (float)(LOWORD(lParam)- m_rcViewPort.left) / m_fScreenScaleFactor,
(float)(HIWORD(lParam) - m_rcViewPort.top) / m_fScreenScaleFactor);
m_pTouch->SetTouchInfo(0, (float)((short)LOWORD(lParam)- m_rcViewPort.left) / m_fScreenScaleFactor,
(float)((short)HIWORD(lParam) - m_rcViewPort.top) / m_fScreenScaleFactor);
m_pDelegate->touchesEnded(m_pSet, NULL);
m_pSet->removeObject(m_pTouch);
ReleaseCapture();

View File

@ -130,6 +130,7 @@ xcopy /Y /Q "$(SolutionDir)cocos2dx\platform\third_party\win32\libraries\*.*" "$
<ClCompile Include="..\cocoa\CCAutoreleasePool.cpp" />
<ClCompile Include="..\cocoa\CCData.cpp" />
<ClCompile Include="..\cocoa\CCGeometry.cpp" />
<ClCompile Include="..\cocoa\CCNS.cpp" />
<ClCompile Include="..\cocoa\CCObject.cpp" />
<ClCompile Include="..\cocoa\CCSet.cpp" />
<ClCompile Include="..\cocoa\CCZone.cpp" />
@ -161,6 +162,7 @@ xcopy /Y /Q "$(SolutionDir)cocos2dx\platform\third_party\win32\libraries\*.*" "$
<ClCompile Include="..\particle_nodes\CCParticleSystemQuad.cpp" />
<ClCompile Include="..\platform\CCCommon.cpp" />
<ClCompile Include="..\platform\CCDirector_mobile.cpp" />
<ClCompile Include="..\platform\CCFileUtils.cpp" />
<ClCompile Include="..\platform\CCGL.cpp" />
<ClCompile Include="..\platform\CCGrid_mobile.cpp" />
<ClCompile Include="..\platform\CCImage.cpp" />
@ -175,8 +177,6 @@ xcopy /Y /Q "$(SolutionDir)cocos2dx\platform\third_party\win32\libraries\*.*" "$
<ClCompile Include="..\platform\platform.cpp" />
<ClCompile Include="..\platform\win32\CCApplication_win32.cpp" />
<ClCompile Include="..\platform\win32\CCEGLView_win32.cpp" />
<ClCompile Include="..\platform\win32\CCFileUtils_win32.cpp" />
<ClCompile Include="..\platform\win32\CCNS_win32.cpp" />
<ClCompile Include="..\sprite_nodes\CCAnimation.cpp" />
<ClCompile Include="..\sprite_nodes\CCAnimationCache.cpp" />
<ClCompile Include="..\sprite_nodes\CCSprite.cpp" />
@ -193,7 +193,6 @@ xcopy /Y /Q "$(SolutionDir)cocos2dx\platform\third_party\win32\libraries\*.*" "$
<ClCompile Include="..\support\zip_support\ioapi.cpp" />
<ClCompile Include="..\support\zip_support\unzip.cpp" />
<ClCompile Include="..\support\zip_support\ZipUtils.cpp" />
<ClCompile Include="..\support\file_support\FileUtils.cpp" />
<ClCompile Include="..\textures\CCPVRTexture.cpp" />
<ClCompile Include="..\textures\CCTexture2D.cpp" />
<ClCompile Include="..\textures\CCTextureAtlas.cpp" />
@ -218,6 +217,7 @@ xcopy /Y /Q "$(SolutionDir)cocos2dx\platform\third_party\win32\libraries\*.*" "$
<ClCompile Include="..\cocos2d.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\cocoa\CCNS.h" />
<ClInclude Include="..\effects\CCGrabber.h" />
<ClInclude Include="..\effects\CCGrid.h" />
<ClInclude Include="..\include\CCAccelerometer.h" />
@ -310,6 +310,7 @@ xcopy /Y /Q "$(SolutionDir)cocos2dx\platform\third_party\win32\libraries\*.*" "$
<ClInclude Include="..\platform\CCArchOptimalParticleSystem.h" />
<ClInclude Include="..\platform\CCCommon.h" />
<ClInclude Include="..\platform\CCEGLView_platform.h" />
<ClInclude Include="..\platform\CCFileUtils.h" />
<ClInclude Include="..\platform\CCFileUtils_platform.h" />
<ClInclude Include="..\platform\CCGL.h" />
<ClInclude Include="..\platform\CCImage.h" />
@ -326,7 +327,6 @@ xcopy /Y /Q "$(SolutionDir)cocos2dx\platform\third_party\win32\libraries\*.*" "$
<ClInclude Include="..\platform\win32\CCAccelerometer_win32.h" />
<ClInclude Include="..\platform\win32\CCApplication_win32.h" />
<ClInclude Include="..\platform\win32\CCEGLView_win32.h" />
<ClInclude Include="..\platform\win32\CCFileUtils_win32.h" />
<ClInclude Include="..\support\base64.h" />
<ClInclude Include="..\support\CCProfiling.h" />
<ClInclude Include="..\support\ccUtils.h" />
@ -338,7 +338,6 @@ xcopy /Y /Q "$(SolutionDir)cocos2dx\platform\third_party\win32\libraries\*.*" "$
<ClInclude Include="..\support\zip_support\ioapi.h" />
<ClInclude Include="..\support\zip_support\unzip.h" />
<ClInclude Include="..\support\zip_support\ZipUtils.h" />
<ClInclude Include="..\support\file_support\FileData.h" />
<ClInclude Include="..\touch_dispatcher\CCTouchHandler.h" />
<ClInclude Include="..\CCConfiguration.h" />
</ItemGroup>

View File

@ -52,9 +52,6 @@
<Filter Include="support\zip_support">
<UniqueIdentifier>{3e1780b2-6a4d-48f0-90ca-e4e0d2613978}</UniqueIdentifier>
</Filter>
<Filter Include="support\file_support">
<UniqueIdentifier>{e1d45f64-9be7-41c5-a657-194780e1b9ea}</UniqueIdentifier>
</Filter>
<Filter Include="textures">
<UniqueIdentifier>{022561bf-a9f5-4d03-b3d3-5178fe3ed572}</UniqueIdentifier>
</Filter>
@ -219,12 +216,6 @@
<ClCompile Include="..\platform\win32\CCEGLView_win32.cpp">
<Filter>platform\win32</Filter>
</ClCompile>
<ClCompile Include="..\platform\win32\CCFileUtils_win32.cpp">
<Filter>platform\win32</Filter>
</ClCompile>
<ClCompile Include="..\platform\win32\CCNS_win32.cpp">
<Filter>platform\win32</Filter>
</ClCompile>
<ClCompile Include="..\sprite_nodes\CCAnimation.cpp">
<Filter>sprite_nodes</Filter>
</ClCompile>
@ -273,9 +264,6 @@
<ClCompile Include="..\support\zip_support\ZipUtils.cpp">
<Filter>support\zip_support</Filter>
</ClCompile>
<ClCompile Include="..\support\file_support\FileUtils.cpp">
<Filter>support\file_support</Filter>
</ClCompile>
<ClCompile Include="..\textures\CCPVRTexture.cpp">
<Filter>textures</Filter>
</ClCompile>
@ -335,6 +323,12 @@
<ClCompile Include="..\platform\CCSAXParser.cpp">
<Filter>platform</Filter>
</ClCompile>
<ClCompile Include="..\platform\CCFileUtils.cpp">
<Filter>platform</Filter>
</ClCompile>
<ClCompile Include="..\cocoa\CCNS.cpp">
<Filter>cocoa</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\effects\CCGrabber.h">
@ -658,9 +652,6 @@
<ClInclude Include="..\platform\win32\CCEGLView_win32.h">
<Filter>platform\win32</Filter>
</ClInclude>
<ClInclude Include="..\platform\win32\CCFileUtils_win32.h">
<Filter>platform\win32</Filter>
</ClInclude>
<ClInclude Include="..\support\base64.h">
<Filter>support</Filter>
</ClInclude>
@ -694,9 +685,6 @@
<ClInclude Include="..\support\zip_support\ZipUtils.h">
<Filter>support\zip_support</Filter>
</ClInclude>
<ClInclude Include="..\support\file_support\FileData.h">
<Filter>support\file_support</Filter>
</ClInclude>
<ClInclude Include="..\touch_dispatcher\CCTouchHandler.h">
<Filter>touch_dispatcher</Filter>
</ClInclude>
@ -704,5 +692,11 @@
<ClInclude Include="..\platform\CCSAXParser.h">
<Filter>platform</Filter>
</ClInclude>
<ClInclude Include="..\platform\CCFileUtils.h">
<Filter>platform</Filter>
</ClInclude>
<ClInclude Include="..\cocoa\CCNS.h">
<Filter>cocoa</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -175,8 +175,8 @@ function AddConfigurations(proj, strProjectName) {
var WizardVersion = wizard.FindSymbol('WIZARD_VERSION');
if(WizardVersion >= 10.0) {
config.OutputDirectory = '$(SolutionDir)$(Configuration).win32'
config.IntermediateDirectory = '$(Configuration).win32';
config.OutputDirectory = '$(SolutionDir)$(Configuration).win32\\'
config.IntermediateDirectory = '$(Configuration).win32\\';
} else {
config.OutputDirectory = '$(SolutionDir)$(ConfigurationName).win32'
config.IntermediateDirectory = '$(ConfigurationName).win32';

View File

@ -112,6 +112,7 @@
<ClCompile Include="..\tests\PerformanceTest\PerformanceTest.cpp" />
<ClCompile Include="..\tests\PerformanceTest\PerformanceTextureTest.cpp" />
<ClCompile Include="..\tests\PerformanceTest\PerformanceTouchesTest.cpp" />
<ClCompile Include="..\tests\ZwoptexTest\ZwoptexTest.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="..\AppDelegate.cpp" />
<ClCompile Include="..\tests\controller.cpp" />
@ -178,6 +179,7 @@
<ClInclude Include="..\tests\PerformanceTest\PerformanceTest.h" />
<ClInclude Include="..\tests\PerformanceTest\PerformanceTextureTest.h" />
<ClInclude Include="..\tests\PerformanceTest\PerformanceTouchesTest.h" />
<ClInclude Include="..\tests\ZwoptexTest\ZwoptexTest.h" />
<ClInclude Include="main.h" />
<ClInclude Include="..\AppDelegate.h" />
<ClInclude Include="..\tests\controller.h" />

View File

@ -106,6 +106,9 @@
<Filter Include="classes\tests\PerformanceTest">
<UniqueIdentifier>{631af586-68bb-471f-9a8d-d9314cf221db}</UniqueIdentifier>
</Filter>
<Filter Include="classes\tests\ZwoptexTest">
<UniqueIdentifier>{d84b2f0f-e3c2-46e9-8f5a-c953ced5778a}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
@ -300,6 +303,9 @@
<ClCompile Include="..\tests\PerformanceTest\PerformanceTouchesTest.cpp">
<Filter>classes\tests\PerformanceTest</Filter>
</ClCompile>
<ClCompile Include="..\tests\ZwoptexTest\ZwoptexTest.cpp">
<Filter>classes\tests\ZwoptexTest</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="main.h">
@ -557,5 +563,8 @@
<ClInclude Include="..\tests\PerformanceTest\PerformanceTouchesTest.h">
<Filter>classes\tests\PerformanceTest</Filter>
</ClInclude>
<ClInclude Include="..\tests\ZwoptexTest\ZwoptexTest.h">
<Filter>classes\tests\ZwoptexTest</Filter>
</ClInclude>
</ItemGroup>
</Project>