From ccd1ce3ab12890b20912e09cf5bc40d6ca3d1c2f Mon Sep 17 00:00:00 2001 From: Dander7BD Date: Thu, 20 Feb 2014 14:58:42 +0100 Subject: [PATCH] jumping --- Code/Game/GameClient/DanBiasGame_Impl.cpp | 39 ++++++++++++++++++++--- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/Code/Game/GameClient/DanBiasGame_Impl.cpp b/Code/Game/GameClient/DanBiasGame_Impl.cpp index 2a46b8d6..f2ea8251 100644 --- a/Code/Game/GameClient/DanBiasGame_Impl.cpp +++ b/Code/Game/GameClient/DanBiasGame_Impl.cpp @@ -14,7 +14,7 @@ #include #include "../WindowManager/WindowShell.h" -#include "L_inputClass.h" +#include "Win32\Win32Input.h" #include "WinTimer.h" #include "vld.h" @@ -28,6 +28,7 @@ using namespace ::Oyster::Network; using namespace ::Utility::DynamicMemory; using namespace ::DanBias::Client; +LRESULT CALLBACK WindowCallBack(HWND handle, UINT message, WPARAM wParam, LPARAM lParam ); void ClientEventFunction( NetEvent e ); namespace DanBias @@ -66,9 +67,10 @@ namespace DanBias //if(! data.window->CreateWin(WindowShell::WINDOW_INIT_DESC(L"Window", cPOINT(1600, 900), cPOINT()))) WindowShell::WINDOW_INIT_DESC winDesc; - winDesc.windowSize.x = 1280; - winDesc.windowSize.y = 720; - + winDesc.windowSize.x = 1280; + winDesc.windowSize.y = 720; + winDesc.windowProcCallback = WindowCallBack; + if(! data.window->CreateWin(winDesc) ) return DanBiasClientReturn_Error; @@ -261,6 +263,35 @@ namespace DanBias } //End namespace DanBias +LRESULT CALLBACK WindowCallBack(HWND handle, UINT message, WPARAM wParam, LPARAM lParam ) +{ + PAINTSTRUCT ps; + HDC hdc; + + switch ( message ) + { + case WM_PAINT: + hdc = BeginPaint( handle, &ps ); + EndPaint( handle, &ps ); + break; + + case WM_DESTROY: + PostQuitMessage( 0 ); + break; + + case WM_KEYDOWN: + switch( wParam ) + { + case VK_ESCAPE: + PostQuitMessage( 0 ); + break; + } + break; + } + + return DefWindowProc( handle, message, wParam, lParam ); +} + void ClientEventFunction( NetEvent e ) { if( DanBias::data.state )