00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef BENG_ZONE_H
00033 #define BENG_ZONE_H
00034
00035 #include <vector>
00036
00037 #include "BengFixedPoint.h"
00038 #include "CString.h"
00039 #include "Layer.h"
00040 #include "System.h"
00041
00042 class BengLayer;
00043
00052
00053 class BengScene {
00054 friend class BengLayer;
00055 friend class BengObject;
00056 friend class BengIGfx;
00057
00058 private:
00059
00060 BengSystem *system_;
00061
00062 BengCString sceneName_;
00063 std::vector<BengLayer*> layerList_;
00064 std::vector<BengLayer*>::iterator layerIterator_;
00065
00066 BengVector cameraPos_;
00067 int camOutputX_, camOutputY_, camOutputW_, camOutputH_;
00068
00069 int layersForDeletion_;
00070 char deleteAll_;
00071
00072 unsigned int mainLayer_;
00073
00074 void purgeLayers_(void);
00075
00076 public:
00077
00080 BengScene(void);
00082 ~BengScene(void);
00083
00085 BengSystem *getSystem(void);
00086
00087 void attachToSystem(BengSystem *parentsystem);
00088
00091 const char *getName(void);
00094 void setName(const char *name);
00095
00102 void addLayer(BengLayer *layer);
00104 void clearLayers(void);
00107 BengLayer *getLayer(int layernum);
00109 int getNumLayers(void);
00110
00111 void setMainLayer(int mainlayer);
00112
00113 void setCameraPos(BengFixed xIn, BengFixed yIn);
00114 void getCameraPos(BengVector &out);
00115
00116 void setCameraRegion(int xIn, int yIn, int wIn, int hIn);
00117 void getCameraRegion(int &xOut, int &yOut, int &wOut, int &hOut);
00118
00119 void doCameraPons(void);
00120
00121 void process(void);
00122
00123 };
00124
00125 #endif