2
0

FPSMovement.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. //-----------------------------------------------------
  3. // SphereSweepAndSlide - Initial work by Dan Bartlett
  4. // Shows how to use the FPS Movement behaviour
  5. //------------------------------------------------------
  6. // Controls:
  7. // W,A,S,D: Movement
  8. // Mouse: Movement
  9. // I,J,K,L,O,P: Movement (2nd sphere)
  10. // F2, F3: First person, Third person
  11. // F5: Toggle wireframe
  12. // Space: Move upwards
  13. // Esc: Quit
  14. //--------------------------------------------------------
  15. */
  16. #include <vcl.h>
  17. #include <tchar.h>
  18. #pragma hdrstop
  19. //---------------------------------------------------------------------------
  20. USEFORM("Unit1.cpp", Form1);
  21. //---------------------------------------------------------------------------
  22. int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
  23. {
  24. try
  25. {
  26. Application->Initialize();
  27. Application->MainFormOnTaskBar = true;
  28. Application->CreateForm(__classid(TForm1), &Form1);
  29. Application->Run();
  30. }
  31. catch (Exception &exception)
  32. {
  33. Application->ShowException(&exception);
  34. }
  35. catch (...)
  36. {
  37. try
  38. {
  39. throw Exception("");
  40. }
  41. catch (Exception &exception)
  42. {
  43. Application->ShowException(&exception);
  44. }
  45. }
  46. return 0;
  47. }
  48. //---------------------------------------------------------------------------