00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef INCL_ORDINFO
00026 #define INCL_ORDINFO 1
00027
00028
00029
00030
00031 class Ordering_info
00032 {
00033 public:
00034 Rectangle area;
00035 Shape_info& info;
00036 int tx, ty, tz;
00037 int xs, ys, zs;
00038 #if 1
00039 int xleft, xright, ynear, yfar, zbot, ztop;
00040 #endif
00041 private:
00042 void init(const Game_object *obj)
00043 {
00044 Tile_coord t = obj->get_tile();
00045 tx = t.tx; ty = t.ty; tz = t.tz;
00046 int frnum = obj->get_framenum();
00047 xs = info.get_3d_xtiles(frnum);
00048 ys = info.get_3d_ytiles(frnum);
00049 zs = info.get_3d_height();
00050 #if 1
00051 xleft = tx - xs + 1;
00052 xright = tx;
00053 yfar = ty - ys + 1;
00054 ynear = ty;
00055 ztop = tz + zs - 1;
00056 zbot = tz;
00057 if (!zs)
00058 zbot--;
00059 #endif
00060 }
00061 public:
00062 friend class Game_object;
00063 friend class Map_chunk;
00064
00065 Ordering_info(Game_window *gwin, Game_object *obj)
00066 : area(gwin->get_shape_rect(obj)),
00067 info(obj->get_info())
00068 { init(obj); }
00069 Ordering_info(Game_window *gwin, Game_object *obj, Rectangle& a)
00070 : area(a),
00071 info(obj->get_info())
00072 { init(obj); }
00073 };
00074
00075 #endif