home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / flash078.zip / flashsource-r0_7_8.zip / FDisplay.h < prev    next >
C/C++ Source or Header  |  2001-08-02  |  5KB  |  188 lines

  1. #ifndef FDISPLAY_H_FILE
  2. #define FDISPLAY_H_FILE
  3.  
  4. #include <string>
  5. #include "FBase.h"
  6. #include "FShape.h"
  7.  
  8. class FlashTagPlaceObject : public FlashSpriteEnabled
  9. {
  10. DEFINE_RW_INTERFACE
  11. public:
  12.     FlashTagPlaceObject(UWORD _depth, UWORD _charID, FlashMatrix &m);
  13.     FlashTagPlaceObject(UWORD _depth, UWORD _charID, FlashMatrix &m, FlashColorTransform &c);
  14.  
  15.     bool HasColorTransform() { return (hascfx); }
  16.  
  17.     UWORD GetCharID() { return characterID; }
  18.     UWORD GetDepth()  { return depth; }
  19.     FlashMatrix GetMatrix() { return matrix; } 
  20.     FlashColorTransform GetColorTransform() { return cfx; }
  21.  
  22. protected:
  23.     friend class FlashImporter;
  24.     FlashTagPlaceObject() {}
  25. private:
  26.     friend std::ostream& operator<<(std::ostream& out, FlashTagPlaceObject &data);
  27.     friend std::istream& operator>>(std::istream& in, FlashTagPlaceObject &data);
  28.  
  29.         UWORD characterID;
  30.         UWORD depth;
  31.     FlashMatrix matrix;
  32.         bool hascfx;
  33.     FlashColorTransform cfx;
  34.  
  35. };
  36.  
  37. //TODO: Find out Clip Actions Data Format
  38. class FlashTagPlaceObject2 : public FlashSpriteEnabled
  39. {
  40. DEFINE_RW_INTERFACE
  41. protected:
  42.     friend class FlashImporter;
  43. public:
  44.     FlashTagPlaceObject2(UWORD _depth) : hasName(false), hasCharID(false), hasMove(false), hasMatrix(false), hasColorTransform(false), hasRatio(false), hasClipDepth(false), depth(_depth){}
  45.     FlashTagPlaceObject2(UWORD _depth, UWORD _charID) : hasName(false), hasCharID(true), hasMove(false), hasMatrix(false), hasColorTransform(false), hasRatio(false), hasClipDepth(false), depth(_depth), charID(_charID)
  46.     {
  47.     }
  48.     FlashTagPlaceObject2(UWORD _depth, UWORD _charID, FlashMatrix& _matrix) : hasName(false), hasCharID(true), hasMove(false), hasMatrix(true), hasColorTransform(false), hasRatio(false), hasClipDepth(false), depth(_depth)
  49.     {
  50.         charID = _charID;
  51.         matrix = _matrix;
  52.     }
  53.     FlashTagPlaceObject2(UWORD _depth, UWORD _charID, FlashMatrix& _matrix, FlashColorTransform& _cfx) : hasName(false), hasCharID(true), hasMove(false), hasMatrix(true), hasColorTransform(true), hasRatio(false), hasClipDepth(false), depth(_depth)
  54.     {
  55.         charID = _charID;
  56.         matrix = _matrix;
  57.         cfx = _cfx;
  58.     }
  59.     FlashTagPlaceObject2(UWORD _depth, FlashMatrix& _matrix, FlashColorTransform& _cfx) : hasName(false), hasCharID(false), hasMove(false), hasMatrix(true), hasColorTransform(true), hasRatio(false), hasClipDepth(false), depth(_depth)
  60.     {    
  61.         matrix = _matrix;
  62.         cfx = _cfx;
  63.     }
  64.     ~FlashTagPlaceObject2(){}
  65.     
  66.     void SetName(std::string& _name)
  67.     {
  68.         hasName = true;
  69.         name = _name;
  70.     }
  71.  
  72.     void SetCharID(UWORD _charID)
  73.     {
  74.         hasCharID = true;
  75.         charID = _charID;
  76.     }
  77.  
  78.     void SetMove(bool _move)
  79.     {
  80.         hasMove = _move;
  81.     }
  82.  
  83.     void SetMatrix(FlashMatrix& _matrix)
  84.     {
  85.         hasMatrix = true;
  86.         matrix = _matrix;
  87.     }
  88.  
  89.     void SetColorTransform(FlashColorTransform& _cfx)
  90.     {
  91.         hasColorTransform = true;
  92.         cfx = _cfx;
  93.     }
  94.  
  95.     void SetRatio(UWORD _ratio) 
  96.     { 
  97.         hasRatio = true;
  98.         ratio=_ratio; 
  99.     }
  100.  
  101.     void SetClipDepth(UWORD _clipDepth) 
  102.     {
  103.         hasClipDepth = true;
  104.         clipDepth = _clipDepth;
  105.     }
  106.  
  107.     bool HasName() { return hasName; }
  108.     bool HasCharID() { return hasCharID; }
  109.     bool HasMove() { return hasMove; }
  110.     bool HasMatrix() { return hasMatrix; }
  111.     bool HasColorTransform() { return hasColorTransform; }
  112.     bool HasRatio() { return hasRatio; }
  113.     bool HasClipDepth() { return hasClipDepth; }
  114.  
  115.     UWORD GetDepth()  { return depth; }
  116.     const char* GetName() { return name.c_str(); }
  117.     UWORD GetCharID() { return charID; }    
  118.     FlashMatrix GetMatrix() { return matrix; } 
  119.     FlashColorTransform GetColorTransform() { return cfx; }
  120.     UWORD GetRatio() { return ((UWORD)ratio); }
  121.     UWORD GetClipDepth(){ return clipDepth; }
  122.     
  123.  
  124. private:
  125.  
  126.     friend std::ostream& operator<<(std::ostream& out, FlashTagPlaceObject2 &data);
  127.     friend std::istream& operator>>(std::istream& in, FlashTagPlaceObject2 &data);
  128.     
  129.     FlashTagPlaceObject2(){}
  130.  
  131.     bool hasName;
  132.     bool hasCharID;
  133.     bool hasMove;
  134.     bool hasMatrix;
  135.     bool hasColorTransform;
  136.     bool hasRatio;
  137.     bool hasClipDepth;
  138.     
  139.     UWORD depth;
  140.     std::string name;
  141.     UWORD charID;
  142.     FlashMatrix matrix;
  143.     FlashColorTransform cfx;    
  144.     UWORD ratio;
  145.     UWORD clipDepth;
  146. };
  147.  
  148. class FlashTagRemoveObject : public FlashSpriteEnabled
  149. {
  150. DEFINE_RW_INTERFACE
  151. public:
  152.     FlashTagRemoveObject(UWORD _charID, UWORD _depth) : charID(_charID), depth(_depth){};
  153.     ~FlashTagRemoveObject() {}
  154.  
  155.     UWORD GetCharID() { return charID; }
  156.     UWORD GetDepth()  { return depth; }
  157.  
  158. protected:
  159.     friend class FlashImporter;
  160.     FlashTagRemoveObject() {}
  161. private:
  162.     friend std::ostream& operator<<(std::ostream& out, FlashTagRemoveObject &data);
  163.     friend std::istream& operator>>(std::istream& in, FlashTagRemoveObject &data);
  164.  
  165.     UWORD charID;
  166.     UWORD depth;
  167. };
  168. class FlashTagRemoveObject2 : public FlashSpriteEnabled
  169. {
  170. DEFINE_RW_INTERFACE
  171. public:
  172.     FlashTagRemoveObject2(UWORD _depth) : depth(_depth){};
  173.     ~FlashTagRemoveObject2() {}
  174.  
  175.     UWORD GetDepth()  { return depth; }
  176.  
  177. protected:
  178.     friend class FlashImporter;
  179.     FlashTagRemoveObject2() {}
  180. private:
  181.     friend std::ostream& operator<<(std::ostream& out, FlashTagRemoveObject2 &data);
  182.     friend std::istream& operator>>(std::istream& in, FlashTagRemoveObject2 &data);
  183.  
  184.     UWORD depth;
  185. };
  186. DECLARE_SIMPLE_TAG3(FlashTagShowFrame)
  187. #endif 
  188.