00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __DISASSMTOMOVES_H__
00022 #define __DISASSMTOMOVES_H__
00023
00024 #include <vector>
00025
00026 class separation_c;
00027 class disassemblerNode_c;
00028
00032 class piecePositions_c {
00033
00034 public:
00035
00036 piecePositions_c(void) {}
00037 virtual ~piecePositions_c(void) {}
00038
00040 virtual float getX(unsigned int piece) = 0;
00042 virtual float getY(unsigned int piece) = 0;
00044 virtual float getZ(unsigned int piece) = 0;
00045
00047 virtual float getA(unsigned int piece) = 0;
00048
00050 virtual bool moving(unsigned int piece) = 0;
00051
00052 private:
00053
00054
00055 piecePositions_c(const piecePositions_c&);
00056 void operator=(const piecePositions_c&);
00057
00058 };
00059
00064 class disasmToMoves_c : public piecePositions_c {
00065
00067 const separation_c * tree;
00068
00073 unsigned int size;
00074
00076 float * moves;
00077
00079 bool * mv;
00080
00085 unsigned int maxPieceName;
00086
00088 int doRecursive(const separation_c * tree, int step, float * array, bool center_active, int cx, int cy, int cz);
00089
00090 public:
00091
00097 disasmToMoves_c(const separation_c * tr, unsigned int sz, unsigned int maxPiece);
00098
00099 virtual ~disasmToMoves_c();
00100
00109 void setStep(float step, bool fadeOut = true, bool center_active = false);
00110
00111 virtual float getX(unsigned int piece);
00112 virtual float getY(unsigned int piece);
00113 virtual float getZ(unsigned int piece);
00114 virtual float getA(unsigned int piece);
00115 virtual bool moving(unsigned int piece);
00116
00117 private:
00118
00119
00120 disasmToMoves_c(const disasmToMoves_c&);
00121 void operator=(const disasmToMoves_c&);
00122 };
00123
00125 class fixedPositions_c : public piecePositions_c {
00126
00127 public:
00128
00129 fixedPositions_c(const disassemblerNode_c * nd, const std::vector<unsigned int> & pieces, unsigned int pc);
00130 fixedPositions_c(const fixedPositions_c * nd);
00131 ~fixedPositions_c(void);
00132
00133 virtual float getX(unsigned int piece);
00134 virtual float getY(unsigned int piece);
00135 virtual float getZ(unsigned int piece);
00136 virtual float getA(unsigned int piece);
00137 virtual bool moving(unsigned int piece);
00138
00139 private:
00140
00141 int *x, *y, *z;
00142 bool *visible;
00143 unsigned int pieces;
00144
00145 private:
00146
00147
00148 fixedPositions_c(const fixedPositions_c&);
00149 void operator=(const fixedPositions_c&);
00150 };
00151
00152 #endif