00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef TIL_TILELIST_H
00021 #define TIL_TILELIST_H
00022
00023 #include "TIL_API.h"
00024
00025 class TIL_Plane;
00026 class TIL_Region;
00027 class TIL_Tile;
00028
00029 class TIL_API TIL_TileList
00030 {
00031 public:
00032 static TIL_TileList *allocList();
00033 static void freeList(TIL_TileList *&list);
00034
00035 void init(const TIL_Plane *, int array_index,
00036 int x1, int y1, int image_index);
00037 void reset();
00038
00039
00040
00041 void setSize(int x,int y);
00042
00043 TIL_TileList & operator=(const TIL_TileList &);
00044
00045 int contains(int x,int y) const;
00046
00047
00048
00049
00050 TIL_Region *getRegionFromTiles(bool uncooked_only = false);
00051
00052 bool assignConstant(TIL_Region *region,
00053 bool black = false);
00054 void clearToBlack(bool markconstant = true);
00055
00056 bool isEmpty() const
00057 { return myItems[0] == 0 && myItems[1] == 0 &&
00058 myItems[2] == 0 && myItems[3] == 0; }
00059
00060
00061 void setDeferredKey(void *key) { myDeferKey = key; }
00062 void *getDeferredKey() { return myDeferKey; }
00063 public:
00064
00065 TIL_Tile *myItems[PLANE_MAX_VECTOR_SIZE];
00066
00067
00068 union {
00069 const TIL_Plane *myPlane;
00070 TIL_TileList *myNext;
00071 };
00072 short myArrayIndex;
00073 char myUsePoints;
00074 char myScanEven;
00075 char myScanStep;
00076 TIL_Interlace myInterlace;
00077
00078 float myScanScale;
00079 float myScanOffset;
00080
00081
00082 int myImageIndex;
00083
00084
00085
00086 int mySize;
00087 int myX1, myY1, myX2, myY2;
00088 unsigned int myBlack, myWhite;
00089
00090
00091 char myTileWrite[PLANE_MAX_VECTOR_SIZE];
00092
00093 private:
00094
00095 TIL_TileList();
00096 ~TIL_TileList();
00097
00098
00099 void *myDeferKey;
00100 };
00101
00102 #endif