00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef CCAMERA_HPP_INCLUDED
00020 #define CCAMERA_HPP_INCLUDED
00021
00022 #undef AFX_EXT_CLASS
00023 #undef AFX_EXT_API
00024 #undef AFX_EXT_DATA
00025 #define AFX_EXT_CLASS AFX_CLASS_IMPORT
00026 #define AFX_EXT_API AFX_API_IMPORT
00027 #define AFX_EXT_DATA AFX_DATA_IMPORT
00028
00029 #include <SDL.h>
00030 #include <sdl_image.h>
00031
00032 #undef AFX_EXT_CLASS
00033 #undef AFX_EXT_API
00034 #undef AFX_EXT_DATA
00035 #define AFX_EXT_CLASS AFX_CLASS_EXPORT
00036 #define AFX_EXT_API AFX_API_EXPORT
00037 #define AFX_EXT_DATA AFX_DATA_EXPORT
00038
00039 #include <list>
00040
00041 #include "start_code.hpp"
00042 #include "cSprite.hpp"
00043
00044 namespace SPACE
00045 {
00046 namespace Graphic
00047 {
00048 class DLL_EXPORT cCamera
00049 {
00050 public:
00051 cCamera(SDL_Surface* _Screen);
00052 ~cCamera();
00053
00058 void Move(float _dX, float _dY);
00059
00064 void MoveTo(float _X, float _Y);
00065
00070 void Resize(int _Width, int _Height);
00071
00075 bool AddChild(cSprite* _Sprite);
00076
00078 void UpdateChild();
00079
00081 void RemoveAllChild();
00082
00084 SDL_Rect GetRect() {return m_Rect;}
00085 private:
00086 std::list<cSprite*> m_lChild;
00087 std::list<cSprite*>::iterator m_Iterator;
00088 SDL_Rect m_Rect;
00090 };
00091 }
00092 }
00093 #endif