| 1 |
#ifndef HEADER_VIDEOAGENT_H |
| 2 |
#define HEADER_VIDEOAGENT_H |
| 3 |
|
| 4 |
class Path; |
| 5 |
|
| 6 |
#include "BaseAgent.h" |
| 7 |
#include "MultiDrawer.h" |
| 8 |
#include "Name.h" |
| 9 |
|
| 10 |
#include "SDL.h" |
| 11 |
|
| 12 |
#include <vector> |
| 13 |
|
| 14 |
/** |
| 15 |
* Video agent initializes video mode and |
| 16 |
* every cycle lets registered drawers to drawOn(screen). |
| 17 |
*/ |
| 18 |
class VideoAgent : public BaseAgent, public MultiDrawer { |
| 19 |
AGENT(VideoAgent, Name::VIDEO_NAME); |
| 20 |
private: |
| 21 |
SDL_Surface *m_screen; |
| 22 |
bool m_fullscreen; |
| 23 |
|
| 24 |
private: |
| 25 |
void setIcon(const Path &file); |
| 26 |
void changeVideoMode(int screen_width, int screen_height); |
| 27 |
int getVideoFlags(); |
| 28 |
void toggleFullScreen(); |
| 29 |
protected: |
| 30 |
virtual void own_init(); |
| 31 |
virtual void own_update(); |
| 32 |
virtual void own_shutdown(); |
| 33 |
public: |
| 34 |
virtual void receiveSimple(const SimpleMsg *msg); |
| 35 |
virtual void receiveString(const StringMsg *msg); |
| 36 |
|
| 37 |
void initVideoMode(); |
| 38 |
}; |
| 39 |
|
| 40 |
#endif |