From e0a805d3947c6bce53f1b2a0ffef837822ee3012 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicol=C3=A1s=20Dimov?= Date: Tue, 11 Nov 2003 20:56:27 +0000 Subject: [PATCH] ahora si se verifica que esten conectados, aunque esto lo tengo que arreglar porque tiene bugs --- Constructor/conduct.cpp | 8 ++++---- Constructor/exclusa.cpp | 8 ++++---- Constructor/pump.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) 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: -- 2.43.0