fire.cpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*: The fire special effect basic sample.
  2. If you look at the code you won't see anything fancy. The FireFX is a dynamic
  3. special effect (driven by a cadencer). Making use of it means two things :<br>
  4. - dropping a FirexFXManager, this one controls fire particle systems aspects<br>
  5. - adding a FireFX effect to the object you want to see burning (here, a sphere)<br>
  6. You may have multiple objects sharing the same FireFXManager, this means they
  7. will all look the same, but also that the particle system calculations are
  8. made only once.
  9. This effect looks cool but is fill-rate hungry, but un-textured fillrate
  10. hungry, ie. video card memory bandwith is not an issue. Anyway, you can
  11. always make it look nice with smaller and/or less particles.
  12. */
  13. //---------------------------------------------------------------------------
  14. #include <vcl.h>
  15. #pragma hdrstop
  16. #include <tchar.h>
  17. //---------------------------------------------------------------------------
  18. USEFORM("Unit1.cpp", Form1);
  19. //---------------------------------------------------------------------------
  20. int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
  21. {
  22. try
  23. {
  24. Application->Initialize();
  25. Application->MainFormOnTaskBar = true;
  26. Application->CreateForm(__classid(TForm1), &Form1);
  27. Application->Run();
  28. }
  29. catch (Exception &exception)
  30. {
  31. Application->ShowException(&exception);
  32. }
  33. catch (...)
  34. {
  35. try
  36. {
  37. throw Exception("");
  38. }
  39. catch (Exception &exception)
  40. {
  41. Application->ShowException(&exception);
  42. }
  43. }
  44. return 0;
  45. }
  46. //---------------------------------------------------------------------------