void malla() { MALLA malla; int corX,corY,color,tamX,tamY,x1,y1,x2,y2; x2 = y2 = 0; char name[20]; x1 = 175; y1 = 25; x2 = 278; y2 = 52; inicializaMalla( &malla ); do { dibujaMenu(); corX = mousex(); corY = mousey(); if( corX > x1 && corX < x2 && corY > y1 && corY < y2 ){ //nuevo dibujaLinea( x1 , y2 + 4, x2 , y2 + 4 , YELLOW ); if( ismouseclick( WM_LBUTTONDOWN )){ eliminaMalla( &malla ); leerDimensiones( &malla ); creaMalla( &malla ); } }else{ dibujaLinea( x1 , y2 + 4, x2 , y2 + 4 , BLACK); if( corX > x2 + 15 && corX < x2 + 95 && corY > y1 && corY < y2 ){ //Abrir dibujaLinea( x2+15,y2+4, x2 + 130 , y2+4, YELLOW ); if( ismouseclick(WM_LBUTTONDOWN ) ){ imprimeMalla(malla); } // printf( " name : %s\n", name );*/ }else dibujaLinea( x2+15, y2+4 , x2 + 130 , y2 + 4, BLACK ); } clearmouseclick(WM_LBUTTONDOWN ); }while(!kbhit()); }
void Pelota::dibujaNormales(Lapiz &lapiz) const { if (m_tipo == Protagonista) { dibujaLinea(m_pos, m_sentido * (RADIO_PELOTA + m_fuerza)); } }