Morph-SynRJ
view efx_screen3.h @ 0:22de913c2d84
morph-synrj intro
| author | "Cedric Pinson <cedric.pinson@alcove.fr> <mornifle@plopbyte.net>" |
|---|---|
| date | Tue Nov 27 15:23:52 2007 +0100 (2007-11-27) |
| parents | |
| children |
line source
1 #ifndef EFX_SCREEN3_H
2 #define EFX_SCREEN3_H
5 #include "cmn_texture.h"
6 #include "mth_vector2.h"
7 #include "efx_rub.h"
8 #include "cmn_design.h"
10 /*
11 * miniFMod
12 * include
13 * resource
14 */
15 #include "minifmod/minifmod.h"
16 extern FMUSIC_MODULE * intro_mod;
17 #include "fxSync.h"
21 struct cmnDesignElementRubberEnd_t: public cmnDesignElement_t
22 {
23 float alpha;
25 void Update() {
26 float f=position.MagSqr();
27 f=mth::Max(0.1,f);
28 float dt=Timer->GetFrameTime();
29 position+=(target-position)*1.0/factor*dt;
30 alpha-=1*dt;
31 alpha=mth::Max(0.05,alpha);
32 }
33 };
38 class efxScreen3_t
39 {
41 double internalTime;
43 efxRub_t* rub;
44 int currentShapeToMorph;
45 float morphFrac;
46 float waitingRubber;
47 float translateRubberFrac;
48 mth::Vector3_t* translateYrubber;
49 float* rubberTransitionAlpha;
50 GLuint rubTexture;
51 float rubberAngle;
52 bool rubberTransition;
53 float* rubberEffect1Angle;
54 int rubberIndexEffect1;
55 float* rubberEffect2Translation;
56 int rubberIndexEffect2;
57 bool rubberTransformPart2;
58 bool Effect3StartInitialized;
60 void InitRubbers(int _nbShapes);
61 void UpdateRubbers();
62 void DrawRubber();
63 void DrawRubberFull();
64 void DrawRubberTransition();
66 GLuint backGroundTexture;
67 GLuint backGroundTexture2;
70 cmnDesign_t design;
71 cmnDesignElementRubberEnd_t* designElementsRubber;
72 cmnDesignElementRubberEnd_t* designElementsRubberAlpha;
73 cmnDesignElementFont_t* designElementsFont;
74 int nbLetters;
75 int nbGreetz;
76 void InitDesign();
79 public:
81 efxScreen3_t();
83 void Init();
84 void Update();
85 void Draw();
88 };
91 #endif
