| Rev | Line | |
|---|
| [10453] | 1 | #ifndef _SCROLLING_SCREEN_H |
|---|
| 2 | #define _SCROLLING_SCREEN_H |
|---|
| 3 | |
|---|
| 4 | #include "world_entity.h" |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | class TiXmlElement; |
|---|
| 8 | class Material; |
|---|
| 9 | |
|---|
| 10 | class ScrollingScreen : public WorldEntity |
|---|
| 11 | { |
|---|
| 12 | ObjectListDeclaration(ScrollingScreen); |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | public: |
|---|
| 17 | ScrollingScreen(); |
|---|
| 18 | ScrollingScreen(const TiXmlElement* root); |
|---|
| 19 | virtual ~ScrollingScreen(); |
|---|
| 20 | |
|---|
| [10464] | 21 | typedef enum ScScMode |
|---|
| 22 | { |
|---|
| 23 | SCSC_FULL = 0, |
|---|
| 24 | SCSC_VIEW |
|---|
| 25 | }; |
|---|
| 26 | |
|---|
| [10453] | 27 | void init(); |
|---|
| 28 | virtual void loadParams(const TiXmlElement* root); |
|---|
| 29 | |
|---|
| 30 | void fadeIn(float speed); |
|---|
| 31 | void fadeOut(float speed); |
|---|
| 32 | |
|---|
| [10455] | 33 | void setTexture(const std::string& texture); |
|---|
| 34 | |
|---|
| [10453] | 35 | void setSpeed(float speed) { this->scrollingSpeed = speed; } |
|---|
| 36 | void setViewHeight(float height) { this->viewHeight = height; } |
|---|
| 37 | void setSize(float xSize, float ySize) { this->xSize = xSize; this->ySize = ySize; } |
|---|
| 38 | |
|---|
| 39 | virtual void tick (float time); |
|---|
| 40 | |
|---|
| 41 | virtual void draw() const; |
|---|
| [10464] | 42 | void drawFull() const; |
|---|
| 43 | void drawView() const; |
|---|
| [10453] | 44 | |
|---|
| [10464] | 45 | |
|---|
| [10453] | 46 | private: |
|---|
| 47 | Material* material; |
|---|
| 48 | bool isTransparent; |
|---|
| 49 | float transparency; |
|---|
| 50 | float fadeingSpeed; |
|---|
| 51 | |
|---|
| 52 | float scrollingSpeed; |
|---|
| 53 | float viewHeight; |
|---|
| [10457] | 54 | float offset; |
|---|
| [10460] | 55 | float ratio; |
|---|
| [10453] | 56 | |
|---|
| 57 | float xSize; |
|---|
| 58 | float ySize; |
|---|
| 59 | |
|---|
| [10464] | 60 | int mode; |
|---|
| [10453] | 61 | |
|---|
| 62 | }; |
|---|
| 63 | |
|---|
| 64 | #endif /* _SCROLLING_SCREEN_H */ |
|---|
Note: See
TracBrowser
for help on using the repository browser.