particleed.h
上传用户:jnfxsk
上传日期:2022-06-16
资源大小:3675k
文件大小:3k
源码类别:

游戏引擎

开发平台:

Visual C++

  1. /*
  2. ** Haaf's Game Engine 1.8
  3. ** Copyright (C) 2007, Relish Games
  4. ** hge.relishgames.com
  5. **
  6. ** Particle systems editor
  7. */
  8. #ifndef PARTICLEED_H
  9. #define PARTICLEED_H
  10. #include "....includehge.h"
  11. #include "....includehgeanim.h"
  12. #include "....includehgefont.h"
  13. #include "....includehgeparticle.h"
  14. #include "....includehgegui.h"
  15. #include "....includehgeguictrls.h"
  16. #define PARTICLE_SIZE 32
  17. #define ButtonGetState(id) ((hgeGUIButton*)gui->GetCtrl(id))->GetState()
  18. #define ButtonSetState(id,b) ((hgeGUIButton*)gui->GetCtrl(id))->SetState(b)
  19. #define SliderGetValue(id) ((hgeGUISlider*)gui->GetCtrl(id))->GetValue()
  20. #define SliderSetValue(id,f) ((hgeGUISlider*)gui->GetCtrl(id))->SetValue(f)
  21. #define GetTextCtrl(id) ((hgeGUIText*)gui->GetCtrl(id))
  22. extern HGE *hge;
  23. struct PEditorState
  24. {
  25. bool bHelp;
  26. bool bBBox;
  27. bool bIFace;
  28. int nPreset;
  29. float mx, my;
  30. HTEXTURE texBG;
  31. hgeSprite *sprBG;
  32. hgeParticleSystem *ps;
  33. };
  34. extern hgeFont *fnt;
  35. extern hgeGUI *gui;
  36. extern HTEXTURE texGui, texParticle;
  37. extern hgeSprite *sprLeftPane1, *sprLeftPane2, *sprRightPane1, *sprRightPane2;
  38. extern hgeSprite *sprCursor, *sprColor, *sprBBox;
  39. extern hgeAnimation *sprParticles;
  40. extern PEditorState state;
  41. bool HandleKeys(int key);
  42. bool DoCommands(int id);
  43. void cmdChangePreset(int n);
  44. void cmdSavePreset(int n);
  45. void cmdLoadPreset(int n);
  46. void cmdChangeColor(int id);
  47. #define CMD_EXIT 1
  48. #define CMD_HELP 2
  49. #define CMD_PRESET1 3
  50. #define CMD_PRESET2 4
  51. #define CMD_PRESET3 5
  52. #define CMD_PRESET4 6
  53. #define CMD_PRESET5 7
  54. #define CMD_PRESET6 8
  55. #define CMD_PRESET7 9
  56. #define CMD_PRESET8 10
  57. #define CMD_PRESET9 11
  58. #define CMD_BOUNDINGBOX 12
  59. #define CMD_NPARTICLES 13
  60. #define CMD_FPS 14
  61. #define CMD_SYS_LIFETIME 15
  62. #define CMD_SYS_TLIFETIME 16
  63. #define CMD_SYS_LIFECONT 17
  64. #define CMD_SYS_EMISSION 18
  65. #define CMD_SYS_TEMISSION 19
  66. #define CMD_SYS_PARLIFETIMEMIN 20
  67. #define CMD_SYS_PARLIFETIMEMAX 21
  68. #define CMD_SYS_PARLIFETIMELOCK 22
  69. #define CMD_SYS_BLENDADDITIVE 23
  70. #define CMD_SYS_BLENDBLEND 24
  71. #define CMD_SYS_TEXTURE 25
  72. #define CMD_PM_DIRECTION 26
  73. #define CMD_PM_TDIRECTION 27
  74. #define CMD_PM_RELATIVE 28
  75. #define CMD_PM_SPREAD 29
  76. #define CMD_PM_TSPREAD 30
  77. #define CMD_PM_STARTSPEEDMIN 31
  78. #define CMD_PM_STARTSPEEDMAX 32
  79. #define CMD_PM_STARTSPEEDLOCK 33
  80. #define CMD_PM_GRAVITYMIN 34
  81. #define CMD_PM_GRAVITYMAX 35
  82. #define CMD_PM_GRAVITYLOCK 36
  83. #define CMD_PM_RADIALMIN 37
  84. #define CMD_PM_RADIALMAX 38
  85. #define CMD_PM_RADIALLOCK 39
  86. #define CMD_PM_TANGENTIALMIN 40
  87. #define CMD_PM_TANGENTIALMAX 41
  88. #define CMD_PM_TANGENTIALLOCK 42
  89. #define CMD_PA_SIZESTART 43
  90. #define CMD_PA_SIZEEND 44
  91. #define CMD_PA_SIZEVAR 45
  92. #define CMD_PA_SIZELOCK 46
  93. #define CMD_PA_SPINSTART 47
  94. #define CMD_PA_SPINEND 48
  95. #define CMD_PA_SPINVAR 49
  96. #define CMD_PA_SPINLOCK 50
  97. #define CMD_PA_ALPHASTART 51
  98. #define CMD_PA_ALPHAEND 52
  99. #define CMD_PA_ALPHAVAR 53
  100. #define CMD_PA_ALPHALOCK 54
  101. #define CMD_PA_RSTART 55
  102. #define CMD_PA_GSTART 56
  103. #define CMD_PA_BSTART 57
  104. #define CMD_PA_REND 58
  105. #define CMD_PA_GEND 59
  106. #define CMD_PA_BEND 60
  107. #define CMD_PA_RGBVAR 61
  108. #endif