]> git.llucax.com Git - z.facultad/75.42/plaqui.git/commitdiff
ahora si se verifica que esten conectados, aunque esto lo tengo que arreglar porque...
authorNicolás Dimov <ndimov@gmail.com>
Tue, 11 Nov 2003 20:56:27 +0000 (20:56 +0000)
committerNicolás Dimov <ndimov@gmail.com>
Tue, 11 Nov 2003 20:56:27 +0000 (20:56 +0000)
Constructor/conduct.cpp
Constructor/exclusa.cpp
Constructor/pump.cpp

index e02cae00284e0a096ef27d9fdee2294ac16daf8e..8c540e82472778036102894c01401204a5d63b92 100644 (file)
@@ -91,13 +91,13 @@ bool Conduct::check_connection()
 {
        switch (get_img_actual()) {
                        case 0:
 {
        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:
                                        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;
                                return true;
        }
        return false;
index 516f689203d197995b3c7a41474bf2e91428a577..c0348f8d3ceab52a334504e106d07b67db70a3f8 100644 (file)
@@ -98,13 +98,13 @@ bool Exclusa::check_connection()
 {
        switch (get_img_actual()) {
                        case 0:
 {
        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:
                                        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;
                                return true;
        }
        return false;
index 51993a225eeeca7caf473960aa15f6621d195eb4..9ff057d9d58e2d446b69ad496e3197ae7e981c3f 100644 (file)
@@ -97,7 +97,7 @@ void Pump::save(FILE *archivo)
        dato += c_img;
        dato += c_x; 
        dato += c_y;
        dato += c_img;
        dato += c_x; 
        dato += c_y;
-       dato += "\t</entrega>\n";
+       dato += "\t</bomba>\n";
        fprintf(archivo,dato.c_str());  
 }
 
        fprintf(archivo,dato.c_str());  
 }
 
@@ -105,7 +105,7 @@ bool Pump::check_connection()
 {
        switch (get_img_actual()) {
                case 0:
 {
        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:
                                return true;                            
                        break;
                case 1: