/xbmc/visualizations/XBMCProjectM/libprojectM/PresetFrameIO.hpp

http://github.com/xbmc/xbmc · C++ Header · 194 lines · 140 code · 42 blank · 12 comment · 0 complexity · 13dd8a6cb6589599fe5135599bd72a9d MD5 · raw file

  1. #ifndef PRESET_FRAME_IO_HPP
  2. #define PRESET_FRAME_IO_HPP
  3. #include <vector>
  4. class CustomWave;
  5. class CustomShape;
  6. /// Container class for all preset writeable engine variables. This is the important glue
  7. /// between the presets and renderer to facilitate smooth preset switching
  8. /// Every preset object needs a reference to one of these.
  9. class PresetOutputs {
  10. public:
  11. typedef std::vector<CustomWave*> cwave_container;
  12. typedef std::vector<CustomShape*> cshape_container;
  13. cwave_container customWaves;
  14. cshape_container customShapes;
  15. void Initialize(int gx, int gy);
  16. PresetOutputs();
  17. ~PresetOutputs();
  18. /* PER FRAME VARIABLES BEGIN */
  19. float zoom;
  20. float zoomexp;
  21. float rot;
  22. float warp;
  23. float sx;
  24. float sy;
  25. float dx;
  26. float dy;
  27. float cx;
  28. float cy;
  29. float decay;
  30. float wave_r;
  31. float wave_g;
  32. float wave_b;
  33. float wave_o;
  34. float wave_x;
  35. float wave_y;
  36. float wave_mystery;
  37. float ob_size;
  38. float ob_r;
  39. float ob_g;
  40. float ob_b;
  41. float ob_a;
  42. float ib_size;
  43. float ib_r;
  44. float ib_g;
  45. float ib_b;
  46. float ib_a;
  47. float mv_a ;
  48. float mv_r ;
  49. float mv_g ;
  50. float mv_b ;
  51. float mv_l;
  52. float mv_x;
  53. float mv_y;
  54. float mv_dy;
  55. float mv_dx;
  56. int gy,gx;
  57. /* PER_FRAME VARIABLES END */
  58. float fRating;
  59. float fGammaAdj;
  60. float fVideoEchoZoom;
  61. float fVideoEchoAlpha;
  62. int nVideoEchoOrientation;
  63. int nWaveMode;
  64. bool bAdditiveWaves;
  65. bool bWaveDots;
  66. bool bWaveThick;
  67. bool bModWaveAlphaByVolume;
  68. bool bMaximizeWaveColor;
  69. bool bTexWrap;
  70. bool bDarkenCenter;
  71. bool bRedBlueStereo;
  72. bool bBrighten;
  73. bool bDarken;
  74. bool bSolarize;
  75. bool bInvert;
  76. bool bMotionVectorsOn;
  77. float fWaveAlpha ;
  78. float fWaveScale;
  79. float fWaveSmoothing;
  80. float fWaveParam;
  81. float fModWaveAlphaStart;
  82. float fModWaveAlphaEnd;
  83. float fWarpAnimSpeed;
  84. float fWarpScale;
  85. float fShader;
  86. /* Q VARIABLES START */
  87. float q1;
  88. float q2;
  89. float q3;
  90. float q4;
  91. float q5;
  92. float q6;
  93. float q7;
  94. float q8;
  95. /* Q VARIABLES END */
  96. float **zoom_mesh;
  97. float **zoomexp_mesh;
  98. float **rot_mesh;
  99. float **sx_mesh;
  100. float **sy_mesh;
  101. float **dx_mesh;
  102. float **dy_mesh;
  103. float **cx_mesh;
  104. float **cy_mesh;
  105. float **warp_mesh;
  106. float **x_mesh;
  107. float **y_mesh;
  108. float wavearray[2048][2];
  109. float wavearray2[2048][2];
  110. int wave_samples;
  111. bool two_waves;
  112. bool draw_wave_as_loop;
  113. double wave_rot;
  114. double wave_scale;
  115. };
  116. /// Container for all *read only* engine variables a preset requires to
  117. /// evaluate milkdrop equations. Every preset object needs a reference to one of these.
  118. class PresetInputs {
  119. public:
  120. /* PER_PIXEL VARIBLES BEGIN */
  121. float x_per_pixel;
  122. float y_per_pixel;
  123. float rad_per_pixel;
  124. float ang_per_pixel;
  125. /* PER_PIXEL VARIBLES END */
  126. int fps;
  127. float time;
  128. float bass;
  129. float mid;
  130. float treb;
  131. float bass_att;
  132. float mid_att;
  133. float treb_att;
  134. int frame;
  135. float progress;
  136. /* variables were added in milkdrop 1.04 */
  137. int gx,gy;
  138. float **x_mesh;
  139. float **y_mesh;
  140. float **rad_mesh;
  141. float **theta_mesh;
  142. float **origtheta; //grid containing interpolated mesh reference values
  143. float **origrad;
  144. float **origx; //original mesh
  145. float **origy;
  146. float mood_r, mood_g, mood_b;
  147. void ResetMesh();
  148. ~PresetInputs();
  149. PresetInputs();
  150. void Initialize(int gx, int gy);
  151. };
  152. #endif