+
+void Cistern::get_in_logic_connect_position(int& _a, int& _b)
+{
+ _a = in_x;
+ _b = in_y;
+}
+
+void Cistern::get_out_logic_connect_position(int& _a, int& _b)
+{
+ _a = out_x;
+ _b = out_y;
+}
+
+ConnectorType Cistern::detect_click_position(int _a, int _b)
+{
+ //VER DONDE CAEN LOS CLICKS!!!!!!!!!!!!!! SI ES CON RESPECTO AL WORKPLACE O AL ITEM!!!
+ switch(imgActual) {
+ case 0:
+ if ( (_a<=32) &&(_a>=0)&&(_b<=32)&&(_b>=0) )
+ return IN;
+ if ( (_a<=image->get_width())&&(_a>=image->get_width()-32)&&(_b<=image->get_height())&&(_b>=image->get_height()-32) )
+ return OUT;
+ break;
+ case 1:
+ if ( (_a<=image->get_width()) &&(_a>=image->get_width()-32)&&(_b<=32)&&(_b>=0) )
+ return IN;
+ if ( (_a<=32)&&(_a>=0)&&(_b<=image->get_height())&&(_b>=image->get_height()-32) )
+ return OUT;
+ }
+ return UNDEF;
+}
+
+void Cistern::update_logic_position()
+{
+ switch (imgActual) {
+ case 1:
+ in_x = x + image->get_width();
+ in_y = y + 16;
+ out_x = x+16;
+ out_y = y + image->get_height();
+ break;
+ case 0:
+ in_x = x;
+ in_y = y+16;
+ out_x = x + image->get_width() -16;
+ out_y = y + image->get_height();
+ }
+}