From: Nicolás Dimov Date: Tue, 11 Nov 2003 20:56:27 +0000 (+0000) Subject: ahora si se verifica que esten conectados, aunque esto lo tengo que arreglar porque... X-Git-Tag: svn_import~312 X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/commitdiff_plain/e0a805d3947c6bce53f1b2a0ffef837822ee3012?ds=inline ahora si se verifica que esten conectados, aunque esto lo tengo que arreglar porque tiene bugs --- diff --git a/Constructor/conduct.cpp b/Constructor/conduct.cpp index e02cae0..8c540e8 100644 --- a/Constructor/conduct.cpp +++ b/Constructor/conduct.cpp @@ -91,13 +91,13 @@ bool Conduct::check_connection() { switch (get_img_actual()) { case 0: - if ( is_other_occupied_area( get_position_x()+get_image()->get_width()/2, get_position_y()+get_image()->get_height()+10) && - is_other_occupied_area( get_position_x()+get_image()->get_width()/2, get_position_y() - 10) ) + if ( is_other_occupied_area( get_position_x()+10, get_position_y()-10) && + is_other_occupied_area( get_position_x()+get_image()->get_width()-10, get_position_y()+get_image()->get_height() +10) ) return true; break; case 1: - if ( is_other_occupied_area( get_position_x()-10, get_position_y()+get_image()->get_height()/2) && - is_other_occupied_area( get_position_x()+get_image()->get_width()+10, get_position_y()+get_image()->get_height()/2) ) + if ( is_other_occupied_area( get_position_x()-10, get_position_y()+10) && + is_other_occupied_area( get_position_x()+get_image()->get_width()+10, get_position_y()+get_image()->get_height()-10) ) return true; } return false; diff --git a/Constructor/exclusa.cpp b/Constructor/exclusa.cpp index 516f689..c0348f8 100644 --- a/Constructor/exclusa.cpp +++ b/Constructor/exclusa.cpp @@ -98,13 +98,13 @@ bool Exclusa::check_connection() { switch (get_img_actual()) { case 0: - if ( is_other_occupied_area( get_position_x()+get_image()->get_width()/2, get_position_y()+get_image()->get_height()+10) && - is_other_occupied_area( get_position_x()+get_image()->get_width()/2, get_position_y() - 10) ) + if ( is_other_occupied_area( get_position_x()+get_image()->get_width()+10, get_position_y()+10) && + is_other_occupied_area( get_position_x()-10, get_position_y() + 10) ) return true; break; case 1: - if ( is_other_occupied_area( get_position_x()-10, get_position_y()+get_image()->get_height()/2) && - is_other_occupied_area( get_position_x()+get_image()->get_width()+10, get_position_y()+get_image()->get_height()/2) ) + if ( is_other_occupied_area( get_position_x()+10, get_position_y()-10 ) && + is_other_occupied_area( get_position_x()+get_image()->get_width()-10, get_position_y()+get_image()->get_height()+10) ) return true; } return false; diff --git a/Constructor/pump.cpp b/Constructor/pump.cpp index 51993a2..9ff057d 100644 --- a/Constructor/pump.cpp +++ b/Constructor/pump.cpp @@ -97,7 +97,7 @@ void Pump::save(FILE *archivo) dato += c_img; dato += c_x; dato += c_y; - dato += "\t\n"; + dato += "\t\n"; fprintf(archivo,dato.c_str()); } @@ -105,7 +105,7 @@ bool Pump::check_connection() { switch (get_img_actual()) { case 0: - if ( is_other_occupied_area( get_position_x()+get_image()->get_width()+10 , get_position_y()+get_image()->get_height() +10) ) + if ( is_other_occupied_area( get_position_x()+get_image()->get_width()+10 , get_position_y() +10) ) return true; break; case 1: