| | 385 | MatSys::Renderer->PushMatrix(MatSys::RendererI::PROJECTION ); |
| | 386 | MatSys::Renderer->PushMatrix(MatSys::RendererI::MODEL_TO_WORLD); |
| | 387 | MatSys::Renderer->PushMatrix(MatSys::RendererI::WORLD_TO_VIEW ); |
| | 388 | |
| | 389 | MatSys::Renderer->SetMatrix(MatSys::RendererI::PROJECTION, |
| | 390 | // Note that the far plane is located at infinity for our stencil shadows implementation! |
| | 391 | // A fovY of 67.5 corresponds to a fovX of 90.0 when the aspect ratio is 4:3. |
| | 392 | MatrixT::GetProjPerspectiveMatrix(67.5f, float(FrameSize.GetWidth())/float(FrameSize.GetHeight()), 100.0f, -1.0f)); |
| | 393 | |
| | 394 | MatSys::Renderer->SetMatrix(MatSys::RendererI::MODEL_TO_WORLD, MatrixT()); |
| | 395 | MatSys::Renderer->SetMatrix(MatSys::RendererI::WORLD_TO_VIEW, MatrixT()); |
| | 396 | |
| 830 | | // if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_RCONTROL ]) ; // R_Strg Run |
| 831 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_RSHIFT ] || // R_Shift Stealth |
| 832 | | SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_LSHIFT ]) PlayerCommand.Keys|=PCK_Walk; // L_Shift Stealth |
| 833 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_UP ] || // Up Walk forward |
| 834 | | SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_W ]) PlayerCommand.Keys|=PCK_MoveForward; // W Walk forward |
| 835 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_DOWN ] || // Down Walk backward |
| 836 | | SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_S ]) PlayerCommand.Keys|=PCK_MoveBackward; // S Walk backward |
| 837 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_A ] || // A Strafe left |
| 838 | | SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_COMMA ]) PlayerCommand.Keys|=PCK_StrafeLeft; // , Strafe left |
| 839 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_D ] || // D Strafe right |
| 840 | | SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_PERIOD ]) PlayerCommand.Keys|=PCK_StrafeRight; // . Strafe right |
| 841 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_R ]) PlayerCommand.Keys|=PCK_Fire1; // R Fire/Respawn |
| 842 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_RETURN ] || // RETURN Use |
| 843 | | SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_NUMPADENTER]) PlayerCommand.Keys|=PCK_Use; // ENTER Use |
| 844 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_LEFT ]) PlayerCommand.Keys|=PCK_TurnLeft; // Left Turn left |
| 845 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_RIGHT ]) PlayerCommand.Keys|=PCK_TurnRight; // Right Turn right |
| 846 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_PGDN ]) PlayerCommand.Keys|=PCK_LookUp; // Look up |
| 847 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_PGUP ]) PlayerCommand.Keys|=PCK_LookDown; // Look down |
| 848 | | // if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_HOME ]) PlayerCommand.Keys|=PCK_BankCW // Bank CW |
| 849 | | // if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_INSERT ]) PlayerCommand.Keys|=PCK_BankCCW; // Bank CCW |
| 850 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_END ]) PlayerCommand.Keys|=PCK_CenterView; |
| 851 | | } |
| 852 | | #endif |
| | 846 | // if (wxGetKeyState(WXK_CONTROL) ) ; // R_Strg Run |
| | 847 | if (wxGetKeyState(WXK_SHIFT) ) PlayerCommand.Keys|=PCK_Walk; // Shift Stealth |
| | 848 | if (wxGetKeyState(WXK_UP) || // Up Walk forward |
| | 849 | wxGetKeyState(wxKeyCode('W')) ) PlayerCommand.Keys|=PCK_MoveForward; // W Walk forward |
| | 850 | if (wxGetKeyState(WXK_DOWN) || // Down Walk backward |
| | 851 | wxGetKeyState(wxKeyCode('S')) ) PlayerCommand.Keys|=PCK_MoveBackward; // S Walk backward |
| | 852 | if (wxGetKeyState(wxKeyCode('A')) || // A Strafe left |
| | 853 | wxGetKeyState(wxKeyCode(',')) ) PlayerCommand.Keys|=PCK_StrafeLeft; // , Strafe left |
| | 854 | if (wxGetKeyState(wxKeyCode('D')) || // D Strafe right |
| | 855 | wxGetKeyState(wxKeyCode('.')) ) PlayerCommand.Keys|=PCK_StrafeRight; // . Strafe right |
| | 856 | if (wxGetKeyState(wxKeyCode('R')) ) PlayerCommand.Keys|=PCK_Fire1; // R Fire/Respawn |
| | 857 | if (wxGetKeyState(WXK_RETURN) || // RETURN Use |
| | 858 | wxGetKeyState(WXK_NUMPAD_ENTER)) PlayerCommand.Keys|=PCK_Use; // ENTER Use |
| | 859 | if (wxGetKeyState(WXK_LEFT )) PlayerCommand.Keys|=PCK_TurnLeft; // Left Turn left |
| | 860 | if (wxGetKeyState(WXK_RIGHT )) PlayerCommand.Keys|=PCK_TurnRight; // Right Turn right |
| | 861 | if (wxGetKeyState(WXK_PAGEDOWN )) PlayerCommand.Keys|=PCK_LookUp; // Look up |
| | 862 | if (wxGetKeyState(WXK_PAGEUP )) PlayerCommand.Keys|=PCK_LookDown; // Look down |
| | 863 | // if (wxGetKeyState(WXK_HOME )) PlayerCommand.Keys|=PCK_BankCW // Bank CW |
| | 864 | // if (wxGetKeyState(WXK_INSERT )) PlayerCommand.Keys|=PCK_BankCCW; // Bank CCW |
| | 865 | if (wxGetKeyState(WXK_END )) PlayerCommand.Keys|=PCK_CenterView; |
| | 866 | } |