00001 #include "includes.h"
00002
00003 #ifndef __CLASSES_H__
00004 #define __CLASSES_H__
00005
00006 class point
00007 {
00008 public:
00009 point(int _x = 0, int _y = 0);
00010 ~point() {}
00011 bool checkArea(point _low, point _high);
00012 void set(int _x = 0, int _y = 0);
00013
00014 int x;
00015 int y;
00016 };
00017
00018 class limit
00019 {
00020 public:
00021 limit(int _low = 0, int _high = 0);
00022 ~limit() {}
00023 bool checkLimit(float _value);
00024 float forceLimit(float _value);
00025 int intForceLimit(float _value);
00026 void set(int _low = 0, int _high = 0);
00027
00028 int low;
00029 int high;
00030 };
00031
00032 class matrix
00033 {
00034 public:
00035 matrix(float *_E, char _dimension = 1, short int _division = 1);
00036 ~matrix();
00037 void convertMatrix(float *_E);
00038 short int division;
00039 float E[11][11];
00040 char dimension;
00041 };
00042
00043 Rgba applyMatrix(ImageRGBA *_img, matrix *_M, int _x, int _y, point _lowArea, point _highArea);
00044
00045
00046
00047
00048 class effect
00049 {
00050 public:
00051 effect(ImageRGBA *_img = 0, ImageRGBA *_temp = 0, ImageRGBA *_temp2 = 0, ImageRGBA *_hud = 0, ImageRGBA *_menu = 0, bool _bArea = false, point _lowArea = 0, point _highArea = 0);
00052 virtual ~effect();
00053 virtual void startup(ImageRGBA *_img, ImageRGBA *_temp, ImageRGBA *_temp2, ImageRGBA *_hud, ImageRGBA *_menu, bool _bArea, point _lowArea, point _highArea);
00054 virtual void idle();
00055 virtual void idleAction();
00056 virtual void move();
00057 virtual void moveAction();
00058 virtual void LB(bool _state);
00059 virtual void LBAction();
00060 virtual void RB(bool _state);
00061 virtual void RBAction();
00062 virtual void colorChangeAction();
00063 virtual void key(unsigned char _key);
00064 virtual void specialKey(int _key);
00065 virtual void setXY(float _x, float _y);
00066 virtual void changeMode(char _mode);
00067 virtual void changeValue(char _key);
00068 virtual void showArea();
00069 virtual void showMenu();
00070
00071 virtual bool useMenu(bool firstClick);
00072 virtual void showHud();
00073 virtual void refreshImage();
00074
00075 ImageRGBA *img;
00076 ImageRGBA *temp;
00077 ImageRGBA *temp2;
00078 ImageRGBA *hud;
00079 ImageRGBA *display;
00080 ImageRGBA *menu;
00081 point mouse;
00082 bool LBpressed;
00083 bool RBpressed;
00084 bool inAction;
00085 bool inActionState;
00086 point startArea;
00087 point endArea;
00088 point lowArea;
00089 point highArea;
00090 int areaColorOffset;
00091 bool bArea;
00092 bool bMenu;
00093 bool bColorMenu;
00094 Rgba myColor;
00095
00096
00097 char mode;
00098 char numModes;
00099 float value1;
00100 float value2;
00101 limit limitValue1;
00102 limit limitValue2;
00103 limit limitX;
00104 limit limitY;
00105 limit limitRGBA;
00106
00107 point start;
00108 point end;
00109 bool finalDraw;
00110 bool breakDraw;
00111
00112 bool refresh;
00113 bool interpolate;
00114
00115 matrix *M[10];
00116 int strength;
00117
00118 float myAngleXY;
00119 float myAngleZ;
00120 float myStrength;
00121
00122 float opacity;
00123 };
00124
00125 class tools : public effect
00126 {
00127 };
00128
00129 class color : public effect
00130 {
00131 public:
00132 void LBAction();
00133 void RBAction();
00134 void changeValue(char _key);
00135 virtual void action(int location);
00136 };
00137
00138 class geometric : public effect
00139 {
00140 public:
00141 void RBAction();
00142 void specialKey(int _key);
00143 virtual void idleAction();
00144 virtual void changeValue(char _key);
00145 virtual void keyRIGHT();
00146 virtual void keyLEFT();
00147 virtual void keyUP();
00148 virtual void keyDOWN();
00149 };
00150
00151 class distort : public effect
00152 {
00153 public:
00154 void RBAction();
00155 void changeValue(char _key);
00156 virtual void LBAction();
00157 };
00158
00159 class matrices : public effect
00160 {
00161 public:
00162 void RBAction();
00163 void changeValue(char _key);
00164 void key(unsigned char _key);
00165 void specialKey(int _key);
00166 virtual void LBAction();
00167 virtual void matrixAction(int _x, int _y);
00168 };
00169
00170 class artistic : public effect
00171 {
00172 public:
00173 void RBAction();
00174 void key(unsigned char _key);
00175 void specialKey(int _key);
00176 virtual void changeValue(char _key);
00177 };
00178
00179 #endif