Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros entornos y lenguajes > C++ Builder
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 13-11-2016
Snaked Snaked is offline
Baneado
NULL
 
Registrado: sep 2016
Posts: 102
Poder: 0
Snaked Va por buen camino
Talking Trabajando en el Editor de Sectores del Mapa

Aqui estoy de nuevo

Estoy trabajando en un Editor/Tool para diseñar SECTORES con Rutas para lo del mapeado del juego....de momento va todo viento en popa y pronto publicaré una version funcional para que todos la probéis y veamos si podemos ir expandiendo el universo_base del juego

Un saludo
Responder Con Cita
  #2  
Antiguo 14-11-2016
Snaked Snaked is offline
Baneado
NULL
 
Registrado: sep 2016
Posts: 102
Poder: 0
Snaked Va por buen camino
Editor de Sectores (Sources)

Hola, entre ayer y hoy he estado ahi liado con el editor de Sectores del mapa...... aqui os dejo el codigo fuente por si veis algo que seguro se podrá mejorar......

Unit1.hpp
Código PHP:
//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <Vcl.Buttons.hpp>
#include <Vcl.Menus.hpp>
#include <Vcl.Graphics.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:    // IDE-managed Components
    
TImage *tablero;
    
TBitBtn *BitBtn1;
    
TBitBtn *BitBtn3;
    
TScrollBar *ScrollBar;
    
TLabel *Label1;
    
TPopupMenu *PopupMenu1;
    
TMenuItem *InsertarInicioRuta1;
    
TMenuItem *InsertarFinRuta1;
    
TMenuItem *InsertarSpaceStation1;
    
TMenuItem *Coriolis11;
    
TMenuItem *MendellMedical1;
    
TMenuItem *Odissey11;
    
TMenuItem *InsertarAsteroidFields1;
    
TMenuItem *InsertarI1;
    
TMenuItem *Factory11;
    
TMenuItem *StoringContainers1;
    
TMenuItem *CancelLastInsert1;
    
TMenuItem *InsertTradeStation1;
    
TMenuItem *Goods1;
    
TMenuItem *Chemicals1;
    
TMenuItem *MetalsandMinnery1;
    
TMenuItem *BactaandPharmaceuticalGoods1;
    
TMenuItem *MilitaryEquipmentandDefense1;
    
TMenuItem *ISSInternationaSpaceStation1;
    
TMenuItem *NewAcheronMilitaryBase1;
    
TMainMenu *MainMenu1;
    
TMenuItem *SECTOR1;
    
TMenuItem *EstoesunCaosquieroempezardenuevo1;
    
TMenuItem *MegustacomovaquedandoQuieroGuardaresteSector1;
    
TMenuItem *SectorFinalizadoSbeloalSERVIDORCENTRAL1;
    
TLabel *Label_X;
    
TLabel *Label_Y;
    
TLabel *Label4;
    
TLabel *Label5;
    
TEdit *Edit1;
    
TTimer *Timer1;
    
TImage *Image1;
    
TImage *Image2;
    
TImage *Image3;
    
TImage *Image4;
    
TImage *Image5;
    
TImage *Image6;
    
TImage *Image7;
    
TImage *Image8;
    
TImage *Image9;
    
TImage *Image10;
    
TImage *Image11;
    
TImage *Image12;
    
TImage *Image13;
    
TImage *Image14;
    
TGroupBox *GroupBox1;
    
TRadioButton *RadioButton1;
    
TRadioButton *RadioButton2;
    
TRadioButton *RadioButton3;
    
TRadioButton *RadioButton4;
    
TRadioButton *RadioButton5;
    
TRadioButton *RadioButton6;
    
TRadioButton *RadioButton7;
    
TRadioButton *RadioButton8;
    
TRadioButton *RadioButton9;
    
TRadioButton *RadioButton10;
    
TRadioButton *RadioButton11;
    
TRadioButton *RadioButton12;
    
TRadioButton *RadioButton13;
    
TRadioButton *RadioButton14;
    
TRadioButton *RadioButton15;
    
TRadioButton *RadioButton16;
    
TMenuItem *InsertObjectPlanet1;
    
TGroupBox *GroupBox2;
    
TEdit *Edit2;
    
TEdit *Edit3;
    
TComboBox *ComboBox1;
    
TButton *Button1;
    
TCheckBox *CheckBox1;
    
TEdit *Edit4;
    
TEdit *Edit5;
    
TEdit *Edit6;
    
TEdit *Edit7;
    
TComboBox *ComboBox2;
    
TButton *Button2;
    
TCheckBox *CheckBox2;
    
void __fastcall BitBtn1Click(TObject *Sender);
    
void __fastcall BitBtn3Click(TObject *Sender);
    
void __fastcall Timer1Timer(TObject *Sender);
    
void __fastcall InsertarInicioRuta1Click(TObject *Sender);
    
void __fastcall InsertarFinRuta1Click(TObject *Sender);
    
void __fastcall InsertObjectPlanet1Click(TObject *Sender);
    
void __fastcall CheckBox1Click(TObject *Sender);
    
void __fastcall CheckBox2Click(TObject *Sender);
    
void __fastcall EstoesunCaosquieroempezardenuevo1Click(TObject *Sender);

private:    
// User declarations
public:        // User declarations
 
TGraphic *g;
  
TGraphic *g1;
 
TGraphic *g2;
    
__fastcall TForm1(TComponentOwner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif 

Unit1.cpp
Código PHP:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
#include "Unit2.h"
//---------------------------------------------------------------------------

#pragma package(smart_init)
#pragma resource "*.dfm"

TForm1 *Form1;

TPoint mouse_pos;
int current_route 0;
int current_object 0;
struct mapp {
              
AnsiString Nombre_Sector;
              
int objetos[15];
              
int coordX_objeto[15];
              
int coordY_objeto[15];
              
int total_objetos;
              
int rutas_inicio_X[15];
              
int rutas_fin_X[15];
              
int rutas_inicio_Y[15];
              
int rutas_fin_Y[15];
              
int total_rutas;
mapita;

bool SALIR false;
bool rejilla false;
bool muestra_rutas false;
bool muestra_objetos true;
int ini_rutaX 0int ini_rutaY 0;
int fin_rutaX 0int fin_rutaY 0;
void SECTOR_VEGA(void);
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponentOwner)
    : 
TForm(Owner)
{
  
Form1->DoubleBuffered true;
}

//--------------------------------------------------------------------------
void Muestra_Mapa(void)
{

   
SECTOR_VEGA();

 
Form1->tablero->Repaint();
 
Application->ProcessMessages();

}
//---------------------------------------------------------------------------

void SECTOR_VEGA(void)
{
 
Form1->0;

         
//Dibujamos fondo grafico
     
Form1->g2 0;
     
Form1->g2 Form2->Image12->Picture->Graphic;
     
Form1->tablero->Canvas->Draw(00,  Form1->g2);


 for(
int cont=0cont<=current_routecont++)
 {
      if(
muestra_rutas)
   {
     
Form1->tablero->Canvas->MoveTo(mapita.rutas_inicio_X[cont],mapita.rutas_inicio_Y[cont]);
     
Form1->tablero->Canvas->Pen->Color clLime;
     if(
mapita.rutas_fin_X[cont] != && mapita.rutas_fin_Y[cont] != 0)
     
Form1->tablero->Canvas->LineTo(mapita.rutas_fin_X[cont], mapita.rutas_fin_Y[cont]);
     }

   }

 for(
int cont=0cont<=current_objectcont++)
 {
      if(
muestra_objetos)
   {

     if(
mapita.objetos[cont] != 0)
      {
         
Form1->g2 0;
         switch(
mapita.objetos[cont])
         {
           case 
1:
           
Form1->g2 Form2->Image12->Picture->Graphic;
           
Form1->tablero->Canvas->Draw(00,  Form1->g2); break;

           case 
2:
           
Form1->g2 Form2->Image12->Picture->Graphic;
           
Form1->tablero->Canvas->Draw(00,  Form1->g2); break;

           case 
3:
           
Form1->g2 Form2->Image12->Picture->Graphic;
           
Form1->tablero->Canvas->Draw(00,  Form1->g2); break;

         }
      }
     }

   }
}


void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
int cont 0;
 
SALIR false;


 for(
cont 0cont 20000cont++)
 {

   
Muestra_Mapa();
   
Label1->Caption cont;
   if(
SALIR == true) break;
  }
}
//---------------------------------------------------------------------------


void __fastcall TForm1::BitBtn3Click(TObject *Sender)
{
 
SALIR true;
}
//---------------------------------------------------------------------------



void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
  
mouse_pos Mouse->CursorPos;
  if(
mouse_pos.<= 4mouse_pos.1;
  if(
mouse_pos.<= 42mouse_pos.1;
  
Label_X->Caption mouse_pos.XLabel_X->Refresh();
  
Label_Y->Caption mouse_pos.Y;Label_Y->Refresh();

}
//---------------------------------------------------------------------------

void __fastcall TForm1::InsertarInicioRuta1Click(TObject *Sender)
{
  
ini_rutaX mouse_pos.4;
  
ini_rutaY mouse_pos.42;
  if(
current_route <= 14)
  {
    
mapita.rutas_inicio_X[current_route] = ini_rutaX;
    
mapita.rutas_inicio_Y[current_route] = ini_rutaY;
  }

  else 
ShowMessage("You reach MAX routes Allowed");
}
//---------------------------------------------------------------------------

void __fastcall TForm1::InsertarFinRuta1Click(TObject *Sender)
{
  
fin_rutaX mouse_pos.4;
  
fin_rutaY mouse_pos.42;
    if(
current_route <= 14)
  {
    
mapita.rutas_fin_X[current_route] = fin_rutaX;
    
mapita.rutas_fin_Y[current_route] = fin_rutaY;

    if(
Application->MessageBox(L"Do you want to SAVE this ROUTE (Keep on map):",
                              
L"Look"MB_OKCANCEL) == ID_OK)
                              {       
//save the current route line
                                
ShowMessage("You Choose SAVE the Route");
                                
current_route++;
                              }
  else {
           
ShowMessage("Canceled: Route Deleted");
           
mapita.rutas_fin_X[current_route] = 0;
           
mapita.rutas_fin_Y[current_route] = 0;

         }

  }

  else 
ShowMessage("You reach MAX routes Allowed");

}
//---------------------------------------------------------------------------

void __fastcall TForm1::InsertObjectPlanet1Click(TObject *Sender)
{

 if(
current_object 14) {
     
ShowMessage("MAX Objects reached!! Can't add more on this map.");
     return;
 }

  if(
RadioButton3->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos.x;
     
mapita.coordY_objeto[current_object] = mouse_pos.y;
     
mapita.objetos[current_object] = 1;
     
current_object++;
   }

  if(
RadioButton4->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos.x;
     
mapita.coordY_objeto[current_object] = mouse_pos.y;
     
mapita.objetos[current_object] = 2;
     
current_object++;
   }

  if(
RadioButton5->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos.x;
     
mapita.coordY_objeto[current_object] = mouse_pos.y;
     
mapita.objetos[current_object] = 3;
     
current_object++;
   }

  if(
RadioButton6->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos.x;
     
mapita.coordY_objeto[current_object] = mouse_pos.y;
     
mapita.objetos[current_object] = 4;
     
current_object++;
   }


  if(
RadioButton7->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos.x;
     
mapita.coordY_objeto[current_object] = mouse_pos.y;
     
mapita.objetos[current_object] = 5;
     
current_object++;
   }

  if(
RadioButton8->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos.x;
     
mapita.coordY_objeto[current_object] = mouse_pos.y;
     
mapita.objetos[current_object] = 6;
     
current_object++;
   }

  if(
RadioButton9->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos.x;
     
mapita.coordY_objeto[current_object] = mouse_pos.y;
     
mapita.objetos[current_object] = 7;
     
current_object++;
   }


  if(
RadioButton10->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos.x;
     
mapita.coordY_objeto[current_object] = mouse_pos.y;
     
mapita.objetos[current_object] = 8;
     
current_object++;
   }


  if(
RadioButton11->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos.x;
     
mapita.coordY_objeto[current_object] = mouse_pos.y;
     
mapita.objetos[current_object] = 9;
     
current_object++;
   }


  if(
RadioButton12->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos.x;
     
mapita.coordY_objeto[current_object] = mouse_pos.y;
     
mapita.objetos[current_object] = 10;
     
current_object++;
   }


  if(
RadioButton13->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos.x;
     
mapita.coordY_objeto[current_object] = mouse_pos.y;
     
mapita.objetos[current_object] = 11;
     
current_object++;
   }


  if(
RadioButton14->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos.x;
     
mapita.coordY_objeto[current_object] = mouse_pos.y;
     
mapita.objetos[current_object] = 12;
     
current_object++;
   }


}
//---------------------------------------------------------------------------



void __fastcall TForm1::CheckBox1Click(TObject *Sender)
{
  if(
CheckBox1->Checked == truemuestra_rutas true;
  else 
muestra_rutas false;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::CheckBox2Click(TObject *Sender)
{
   if(
CheckBox2->Checked == truemuestra_objetos true;
  else 
muestra_objetos false;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::EstoesunCaosquieroempezardenuevo1Click(TObject *Sender)
{
  
// Inicializamos todo a cero.
 
int contador 0;
 
current_route 0;
 
current_object 0;

 for(
contador 0contador <= 14contador++)
  {
    
mapita.coordX_objeto[contador] = 0;
    
mapita.coordY_objeto[contador] = 0;
    
mapita.rutas_fin_X[contador] = 0;
    
mapita.rutas_fin_Y[contador] = 0;
    
mapita.rutas_inicio_X[contador] = 0;
    
mapita.rutas_inicio_Y[contador] = 0;
    
mapita.objetos[contador] = 0;
  }

    
mapita.total_objetos 0;
    
mapita.total_rutas 0;
}
//--------------------------------------------------------------------------- 
y este es el aspecto visual que presenta el programa


Última edición por Snaked fecha: 14-11-2016 a las 15:27:59.
Responder Con Cita
  #3  
Antiguo 14-11-2016
Snaked Snaked is offline
Baneado
NULL
 
Registrado: sep 2016
Posts: 102
Poder: 0
Snaked Va por buen camino
bueno,....con pequeños bugs pero funciona..... mirad.... en hacer esto he tardado 5 segundos

Responder Con Cita
  #4  
Antiguo 14-11-2016
Avatar de AgustinOrtu
[AgustinOrtu] AgustinOrtu is offline
Miembro Premium
NULL
 
Registrado: ago 2013
Ubicación: Argentina
Posts: 1.858
Poder: 15
AgustinOrtu Es un diamante en brutoAgustinOrtu Es un diamante en brutoAgustinOrtu Es un diamante en brutoAgustinOrtu Es un diamante en bruto
Solo 5 segundos?
Responder Con Cita
  #5  
Antiguo 14-11-2016
Snaked Snaked is offline
Baneado
NULL
 
Registrado: sep 2016
Posts: 102
Poder: 0
Snaked Va por buen camino
jajajaja, si Agustin....5 o menos!!! DD

mirad, este es el nuevo aspecto que tiene el Editor..... ya falta poco para sacarlo del horno

Interface Azulado



Interface Esmeralda

Última edición por Snaked fecha: 14-11-2016 a las 21:14:38.
Responder Con Cita
  #6  
Antiguo 14-11-2016
Snaked Snaked is offline
Baneado
NULL
 
Registrado: sep 2016
Posts: 102
Poder: 0
Snaked Va por buen camino
Codigo con algunos errores subsanados

Hey!! aqui va el codigo con algunas correcciones de ultima hora

Código PHP:
//---------------------------------------------------------------------------

#include <vcl.h>
#include <stdio.h>
#pragma hdrstop

#include "Unit1.h"
#include "Unit2.h"

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"

TForm1 *Form1;

TPoint mouse_pos;
TPoint mouse_pos2;
int current_route 0;
int current_object 0;
struct mapp {
              
AnsiString Nombre_Sector;
              
int objetos[30];
              
int coordX_objeto[30];
              
int coordY_objeto[30];
              
int total_objetos;
              
int rutas_inicio_X[30];
              
int rutas_fin_X[30];
              
int rutas_inicio_Y[30];
              
int rutas_fin_Y[30];
              
int total_rutas;
mapita;

int cont_redraw 0;
bool SALIR false;
bool rejilla false;
bool muestra_rutas false;
bool muestra_objetos true;
int ini_rutaX 0int ini_rutaY 0;
int fin_rutaX 0int fin_rutaY 0;
void SECTOR_VEGA(void);
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponentOwner)
    : 
TForm(Owner)
{
  
Form1->DoubleBuffered true;
}

//---------------------------------------------------------------------------
 
void Muestra_Mapa(void)
{

   
SECTOR_VEGA();

    if(
rejillaMuestra_Rejilla();


 
Form1->tablero->Repaint();
 
Application->ProcessMessages();

}
//---------------------------------------------------------------------------

void SECTOR_VEGA(void)
{
     
Form1->g2 0;
     
Form1->g2 Form2->Image12->Picture->Graphic;
     
Form1->tablero->Canvas->Draw(00,  Form1->g2);

 for(
int cont=0cont<=current_routecont++)
 {
      if(
muestra_rutas)
   {
     
Form1->tablero->Canvas->MoveTo(mapita.rutas_inicio_X[cont],mapita.rutas_inicio_Y[cont]);
     
Form1->tablero->Canvas->Pen->Color clLime;
     if(
mapita.rutas_fin_X[cont] != && mapita.rutas_fin_Y[cont] != 0)
     
Form1->tablero->Canvas->LineTo(mapita.rutas_fin_X[cont], mapita.rutas_fin_Y[cont]);
     }

   }

    for(
int cont=0cont<=current_objectcont++)
 {
      if(
muestra_objetos)
   {

     if(
mapita.objetos[cont] != 0)
      {
         
Form1->g2 0;
         switch(
mapita.objetos[cont])
         {
           case 
1:
           
Form1->g2 Form2->Image9->Picture->Graphic;
           
Form1->tablero->Canvas->Draw(mapita.coordX_objeto[cont], mapita.coordY_objeto[cont],  Form1->g2); break;

           case 
2:
           
Form1->g2 Form2->Image3->Picture->Graphic;
           
Form1->tablero->Canvas->Draw(mapita.coordX_objeto[cont], mapita.coordY_objeto[cont],  Form1->g2); break;

           case 
3:
           
Form1->g2 Form2->Image_jupiter->Picture->Graphic;
           
Form1->tablero->Canvas->Draw(mapita.coordX_objeto[cont], mapita.coordY_objeto[cont],  Form1->g2); break;

         }
      }
     }

   }

}





void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
  
mouse_pos Mouse->CursorPos;
  
mouse_pos.mouse_pos.Form1->Top;
  
mouse_pos.mouse_pos.Form1->Left;
  if(
mouse_pos.<= 4mouse_pos.1;
  if(
mouse_pos.<= 42mouse_pos.1;
  
Label_X->Caption mouse_pos.XLabel_X->Refresh();
  
Label_Y->Caption mouse_pos.Y;Label_Y->Refresh();

}
//---------------------------------------------------------------------------

void __fastcall TForm1::InsertarInicioRuta1Click(TObject *Sender)
{
  
ini_rutaX mouse_pos2.4;
  
ini_rutaY mouse_pos2.42;
  if(
current_route <= 14)
  {
    
mapita.rutas_inicio_X[current_route] = ini_rutaX;
    
mapita.rutas_inicio_Y[current_route] = ini_rutaY;
  }

  else 
ShowMessage("You reach MAX routes Allowed");
}
//---------------------------------------------------------------------------

void __fastcall TForm1::InsertarFinRuta1Click(TObject *Sender)
{
  
fin_rutaX mouse_pos2.4;
  
fin_rutaY mouse_pos2.42;
    if(
current_route <= 30)
  {
    
mapita.rutas_fin_X[current_route] = fin_rutaX;
    
mapita.rutas_fin_Y[current_route] = fin_rutaY;

    if(
Application->MessageBox(L"Do you want to SAVE this ROUTE (Keep on map):",
                              
L"Look"MB_OKCANCEL) == ID_OK)
                              {       
//save the current route line
                                
ShowMessage("You Choose SAVE the Route");
                                
current_route++;
                              }
  else {
           
ShowMessage("Canceled: Route Deleted");
           
mapita.rutas_fin_X[current_route] = 0;
           
mapita.rutas_fin_Y[current_route] = 0;

         }

  }

  else 
ShowMessage("You reach MAX routes Allowed");

}
//---------------------------------------------------------------------------

void __fastcall TForm1::InsertObjectPlanet1Click(TObject *Sender)
{

 if(
current_object 30) {
     
ShowMessage("MAX Objects reached!! Can't add more on this map.");
     return;
 }

  if(
RadioButton3->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos2.X-4;
     
mapita.coordY_objeto[current_object] = mouse_pos2.Y-42;
     
mapita.objetos[current_object] = 1;
     
current_object++;
   }

  if(
RadioButton4->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos2.X-4;
     
mapita.coordY_objeto[current_object] = mouse_pos2.Y-42;
     
mapita.objetos[current_object] = 2;
     
current_object++;
   }

  if(
RadioButton5->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos2.X-4;
     
mapita.coordY_objeto[current_object] = mouse_pos2.Y-42;
     
mapita.objetos[current_object] = 3;
     
current_object++;
   }

  if(
RadioButton6->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos2.X-4;
     
mapita.coordY_objeto[current_object] = mouse_pos2.Y-42;
     
mapita.objetos[current_object] = 4;
     
current_object++;
   }


  if(
RadioButton7->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos2.X-4;
     
mapita.coordY_objeto[current_object] = mouse_pos2.Y-42;
     
mapita.objetos[current_object] = 5;
     
current_object++;
   }

  if(
RadioButton8->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos2.X-4;
     
mapita.coordY_objeto[current_object] = mouse_pos2.Y-42;
     
mapita.objetos[current_object] = 6;
     
current_object++;
   }

  if(
RadioButton9->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos2.X-4;
     
mapita.coordY_objeto[current_object] = mouse_pos2.Y-42;
     
mapita.objetos[current_object] = 7;
     
current_object++;
   }


  if(
RadioButton10->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos2.X-4;
     
mapita.coordY_objeto[current_object] = mouse_pos2.Y-42;
     
mapita.objetos[current_object] = 8;
     
current_object++;
   }


  if(
RadioButton11->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos2.X-4;
     
mapita.coordY_objeto[current_object] = mouse_pos2.Y-42;
     
mapita.objetos[current_object] = 9;
     
current_object++;
   }


  if(
RadioButton12->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos2.X-4;
     
mapita.coordY_objeto[current_object] = mouse_pos2.Y-42;
     
mapita.objetos[current_object] = 10;
     
current_object++;
   }


  if(
RadioButton13->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos2.X-4;
     
mapita.coordY_objeto[current_object] = mouse_pos2.Y-42;
     
mapita.objetos[current_object] = 11;
     
current_object++;
   }


  if(
RadioButton14->Checked == true)
   {
     
mapita.coordX_objeto[current_object] = mouse_pos2.X-4;
     
mapita.coordY_objeto[current_object] = mouse_pos2.Y-42;
     
mapita.objetos[current_object] = 12;
     
current_object++;
   }


}
//---------------------------------------------------------------------------



void __fastcall TForm1::CheckBox1Click(TObject *Sender)
{
  if(
CheckBox1->Checked == truemuestra_rutas true;
  else 
muestra_rutas false;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::CheckBox2Click(TObject *Sender)
{
   if(
CheckBox2->Checked == truemuestra_objetos true;
  else 
muestra_objetos false;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::EstoesunCaosquieroempezardenuevo1Click(TObject *Sender)
{
  
// Inicializamos todo a cero.
 
int contador 0;
 
current_route 0;
 
current_object 0;

 for(
contador 0contador <= 14contador++)
  {
    
mapita.coordX_objeto[contador] = 0;
    
mapita.coordY_objeto[contador] = 0;
    
mapita.rutas_fin_X[contador] = 0;
    
mapita.rutas_fin_Y[contador] = 0;
    
mapita.rutas_inicio_X[contador] = 0;
    
mapita.rutas_inicio_Y[contador] = 0;
    
mapita.objetos[contador] = 0;
  }

    
mapita.total_objetos 0;
    
mapita.total_rutas 0;
}
//---------------------------------------------------------------------------



void __fastcall TForm1::PopupMenu1Popup(TObject *Sender)
{
  
mouse_pos2 Mouse->CursorPos;
  
mouse_pos2.mouse_pos.Form1->Top;
  
mouse_pos2.mouse_pos.Form1->Left;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Timer2Timer(TObject *Sender)
{
  
Label1->Caption cont_redraw;

  
Label1->Refresh();
  
cont_redraw 0;

}
//---------------------------------------------------------------------------

void __fastcall TForm1::sButton1Click(TObject *Sender)
{
  
SALIR false;


 for(;;)
 {
   
cont_redraw++;
   
Muestra_Mapa();
   if(
SALIR == true) break;
  }
}
//---------------------------------------------------------------------------

void __fastcall TForm1::sButton2Click(TObject *Sender)
{
  
SALIR true;
}
//--------------------------------------------------------------------------- 
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
mapa gps en php?? foetus PHP 1 19-03-2008 06:29:19
Escribir/Leer sectores,bajo nivel CD-Regrabable aprendiz2 API de Windows 1 10-04-2007 19:26:31
Mapa galustiza C++ Builder 4 20-12-2006 16:02:08
Mapa Embebido urush30 Providers 1 06-06-2004 08:36:43
Un editor de mapa de bits soul6301 Varios 4 03-06-2004 22:13:36


La franja horaria es GMT +2. Ahora son las 19:08:27.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi