| | 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 | |
| 395 | | Font_f.Print(SingleOpenGLWindow->GetWidth()-130, 15, 0x00FFFFFF, "X %10.1f", OurEntityCurrentState->Origin.x); |
| 396 | | Font_f.Print(SingleOpenGLWindow->GetWidth()-130, 35, 0x00FFFFFF, "Y %10.1f", OurEntityCurrentState->Origin.y); |
| 397 | | Font_f.Print(SingleOpenGLWindow->GetWidth()-130, 55, 0x00FFFFFF, "Z %10.1f", OurEntityCurrentState->Origin.z); |
| 398 | | Font_f.Print(SingleOpenGLWindow->GetWidth()-130, 75, 0x00FFFFFF, "Hdg %8u", OurEntityCurrentState->Heading); |
| 399 | | // Font_f.Print(SingleOpenGLWindow->GetWidth()-100, SingleOpenGLWindow->GetHeight()-32, 0x00FFFFFF, "L %4u %c", LeafNr, LeafContents); |
| | 417 | Font_f.Print(FrameSize.GetWidth()-130, 15, FrameSize.GetWidth(), FrameSize.GetHeight(), 0x00FFFFFF, "X %10.1f", OurEntityCurrentState->Origin.x); |
| | 418 | Font_f.Print(FrameSize.GetWidth()-130, 35, FrameSize.GetWidth(), FrameSize.GetHeight(), 0x00FFFFFF, "Y %10.1f", OurEntityCurrentState->Origin.y); |
| | 419 | Font_f.Print(FrameSize.GetWidth()-130, 55, FrameSize.GetWidth(), FrameSize.GetHeight(), 0x00FFFFFF, "Z %10.1f", OurEntityCurrentState->Origin.z); |
| | 420 | Font_f.Print(FrameSize.GetWidth()-130, 75, FrameSize.GetWidth(), FrameSize.GetHeight(), 0x00FFFFFF, "Hdg %8u", OurEntityCurrentState->Heading); |
| | 421 | // Font_f.Print(FrameSize.GetWidth()-100, FrameSize.GetHeight()-32, FrameSize.GetWidth(), FrameSize.GetHeight(), 0x00FFFFFF, "L %4u %c", LeafNr, LeafContents); |
| 444 | | M.Vertices[0].SetOrigin(SingleOpenGLWindow->GetWidth()/2.0f-512.0f, SingleOpenGLWindow->GetHeight()/2.0f-256.0f-20.0f); // links oben |
| 445 | | M.Vertices[1].SetOrigin(SingleOpenGLWindow->GetWidth()/2.0f+512.0f, SingleOpenGLWindow->GetHeight()/2.0f-256.0f-20.0f); // rechts oben |
| 446 | | M.Vertices[2].SetOrigin(SingleOpenGLWindow->GetWidth()/2.0f+512.0f, SingleOpenGLWindow->GetHeight()/2.0f+256.0f-20.0f); // rechts unten |
| 447 | | M.Vertices[3].SetOrigin(SingleOpenGLWindow->GetWidth()/2.0f-512.0f, SingleOpenGLWindow->GetHeight()/2.0f+256.0f-20.0f); // links unten |
| | 466 | M.Vertices[0].SetOrigin(FrameSize.GetWidth()/2.0f-512.0f, FrameSize.GetHeight()/2.0f-256.0f-20.0f); // links oben |
| | 467 | M.Vertices[1].SetOrigin(FrameSize.GetWidth()/2.0f+512.0f, FrameSize.GetHeight()/2.0f-256.0f-20.0f); // rechts oben |
| | 468 | M.Vertices[2].SetOrigin(FrameSize.GetWidth()/2.0f+512.0f, FrameSize.GetHeight()/2.0f+256.0f-20.0f); // rechts unten |
| | 469 | M.Vertices[3].SetOrigin(FrameSize.GetWidth()/2.0f-512.0f, FrameSize.GetHeight()/2.0f+256.0f-20.0f); // links unten |
| 459 | | M.Vertices[0].SetOrigin(SingleOpenGLWindow->GetWidth()/2-BarHalfWidth-16, SingleOpenGLWindow->GetHeight()*9/10-20 ); |
| 460 | | M.Vertices[1].SetOrigin(SingleOpenGLWindow->GetWidth()/2-BarHalfWidth , SingleOpenGLWindow->GetHeight()*9/10-20 ); |
| 461 | | M.Vertices[2].SetOrigin(SingleOpenGLWindow->GetWidth()/2-BarHalfWidth , SingleOpenGLWindow->GetHeight()*9/10-20+32); |
| 462 | | M.Vertices[3].SetOrigin(SingleOpenGLWindow->GetWidth()/2-BarHalfWidth-16, SingleOpenGLWindow->GetHeight()*9/10-20+32); |
| | 481 | M.Vertices[0].SetOrigin(FrameSize.GetWidth()/2-BarHalfWidth-16, FrameSize.GetHeight()*9/10-20 ); |
| | 482 | M.Vertices[1].SetOrigin(FrameSize.GetWidth()/2-BarHalfWidth , FrameSize.GetHeight()*9/10-20 ); |
| | 483 | M.Vertices[2].SetOrigin(FrameSize.GetWidth()/2-BarHalfWidth , FrameSize.GetHeight()*9/10-20+32); |
| | 484 | M.Vertices[3].SetOrigin(FrameSize.GetWidth()/2-BarHalfWidth-16, FrameSize.GetHeight()*9/10-20+32); |
| 470 | | M.Vertices[0].SetOrigin(SingleOpenGLWindow->GetWidth()/2-BarHalfWidth , SingleOpenGLWindow->GetHeight()*9/10-20 ); |
| 471 | | M.Vertices[1].SetOrigin(SingleOpenGLWindow->GetWidth()/2-BarHalfWidth+2*BarHalfWidth*ProgressPercent, SingleOpenGLWindow->GetHeight()*9/10-20 ); |
| 472 | | M.Vertices[2].SetOrigin(SingleOpenGLWindow->GetWidth()/2-BarHalfWidth+2*BarHalfWidth*ProgressPercent, SingleOpenGLWindow->GetHeight()*9/10-20+32); |
| 473 | | M.Vertices[3].SetOrigin(SingleOpenGLWindow->GetWidth()/2-BarHalfWidth , SingleOpenGLWindow->GetHeight()*9/10-20+32); |
| | 492 | M.Vertices[0].SetOrigin(FrameSize.GetWidth()/2-BarHalfWidth , FrameSize.GetHeight()*9/10-20 ); |
| | 493 | M.Vertices[1].SetOrigin(FrameSize.GetWidth()/2-BarHalfWidth+2*BarHalfWidth*ProgressPercent, FrameSize.GetHeight()*9/10-20 ); |
| | 494 | M.Vertices[2].SetOrigin(FrameSize.GetWidth()/2-BarHalfWidth+2*BarHalfWidth*ProgressPercent, FrameSize.GetHeight()*9/10-20+32); |
| | 495 | M.Vertices[3].SetOrigin(FrameSize.GetWidth()/2-BarHalfWidth , FrameSize.GetHeight()*9/10-20+32); |
| 481 | | M.Vertices[0].SetOrigin(SingleOpenGLWindow->GetWidth()/2-BarHalfWidth+2*BarHalfWidth*ProgressPercent, SingleOpenGLWindow->GetHeight()*9/10-20 ); |
| 482 | | M.Vertices[1].SetOrigin(SingleOpenGLWindow->GetWidth()/2+BarHalfWidth , SingleOpenGLWindow->GetHeight()*9/10-20 ); |
| 483 | | M.Vertices[2].SetOrigin(SingleOpenGLWindow->GetWidth()/2+BarHalfWidth , SingleOpenGLWindow->GetHeight()*9/10-20+32); |
| 484 | | M.Vertices[3].SetOrigin(SingleOpenGLWindow->GetWidth()/2-BarHalfWidth+2*BarHalfWidth*ProgressPercent, SingleOpenGLWindow->GetHeight()*9/10-20+32); |
| | 503 | M.Vertices[0].SetOrigin(FrameSize.GetWidth()/2-BarHalfWidth+2*BarHalfWidth*ProgressPercent, FrameSize.GetHeight()*9/10-20 ); |
| | 504 | M.Vertices[1].SetOrigin(FrameSize.GetWidth()/2+BarHalfWidth , FrameSize.GetHeight()*9/10-20 ); |
| | 505 | M.Vertices[2].SetOrigin(FrameSize.GetWidth()/2+BarHalfWidth , FrameSize.GetHeight()*9/10-20+32); |
| | 506 | M.Vertices[3].SetOrigin(FrameSize.GetWidth()/2-BarHalfWidth+2*BarHalfWidth*ProgressPercent, FrameSize.GetHeight()*9/10-20+32); |
| 492 | | M.Vertices[0].SetOrigin(SingleOpenGLWindow->GetWidth()/2+BarHalfWidth , SingleOpenGLWindow->GetHeight()*9/10-20 ); |
| 493 | | M.Vertices[1].SetOrigin(SingleOpenGLWindow->GetWidth()/2+BarHalfWidth+16, SingleOpenGLWindow->GetHeight()*9/10-20 ); |
| 494 | | M.Vertices[2].SetOrigin(SingleOpenGLWindow->GetWidth()/2+BarHalfWidth+16, SingleOpenGLWindow->GetHeight()*9/10-20+32); |
| 495 | | M.Vertices[3].SetOrigin(SingleOpenGLWindow->GetWidth()/2+BarHalfWidth , SingleOpenGLWindow->GetHeight()*9/10-20+32); |
| | 514 | M.Vertices[0].SetOrigin(FrameSize.GetWidth()/2+BarHalfWidth , FrameSize.GetHeight()*9/10-20 ); |
| | 515 | M.Vertices[1].SetOrigin(FrameSize.GetWidth()/2+BarHalfWidth+16, FrameSize.GetHeight()*9/10-20 ); |
| | 516 | M.Vertices[2].SetOrigin(FrameSize.GetWidth()/2+BarHalfWidth+16, FrameSize.GetHeight()*9/10-20+32); |
| | 517 | M.Vertices[3].SetOrigin(FrameSize.GetWidth()/2+BarHalfWidth , FrameSize.GetHeight()*9/10-20+32); |
| 823 | | // if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_RCONTROL ]) ; // R_Strg Run |
| 824 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_RSHIFT ] || // R_Shift Stealth |
| 825 | | SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_LSHIFT ]) PlayerCommand.Keys|=PCK_Walk; // L_Shift Stealth |
| 826 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_UP ] || // Up Walk forward |
| 827 | | SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_W ]) PlayerCommand.Keys|=PCK_MoveForward; // W Walk forward |
| 828 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_DOWN ] || // Down Walk backward |
| 829 | | SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_S ]) PlayerCommand.Keys|=PCK_MoveBackward; // S Walk backward |
| 830 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_A ] || // A Strafe left |
| 831 | | SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_COMMA ]) PlayerCommand.Keys|=PCK_StrafeLeft; // , Strafe left |
| 832 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_D ] || // D Strafe right |
| 833 | | SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_PERIOD ]) PlayerCommand.Keys|=PCK_StrafeRight; // . Strafe right |
| 834 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_R ]) PlayerCommand.Keys|=PCK_Fire1; // R Fire/Respawn |
| 835 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_RETURN ] || // RETURN Use |
| 836 | | SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_NUMPADENTER]) PlayerCommand.Keys|=PCK_Use; // ENTER Use |
| 837 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_LEFT ]) PlayerCommand.Keys|=PCK_TurnLeft; // Left Turn left |
| 838 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_RIGHT ]) PlayerCommand.Keys|=PCK_TurnRight; // Right Turn right |
| 839 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_PGDN ]) PlayerCommand.Keys|=PCK_LookUp; // Look up |
| 840 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_PGUP ]) PlayerCommand.Keys|=PCK_LookDown; // Look down |
| 841 | | // if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_HOME ]) PlayerCommand.Keys|=PCK_BankCW // Bank CW |
| 842 | | // if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_INSERT ]) PlayerCommand.Keys|=PCK_BankCCW; // Bank CCW |
| 843 | | if (SingleOpenGLWindow->GetKeyboardState()[CaKeyboardEventT::CK_END ]) PlayerCommand.Keys|=PCK_CenterView; |
| | 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; |