Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #31  
Antiguo 29-10-2007
Avatar de Héctor Randolph
[Héctor Randolph] Héctor Randolph is offline
Miembro Premium
 
Registrado: dic 2004
Posts: 882
Poder: 22
Héctor Randolph Va por buen camino
Conseguí hacerlo funcionar en Delphi 7, aquí está la prueba

Para corregir el problema con los arreglos, la explicación que da la ayuda es la siguiente:

Cita:
[Error] title.pas(72): Array type required
[Error] title.pas(115): Array type required
Cita:
We try to apply an index to a pointer to integer - that would be legal in C, but is not in Delphi.

In The Delphi language, we must tell the compiler that we intend P to point to an array of integers.
A continuación pongo el código que tuve que modificar:

Código Delphi [-]
//  AL_DATAFILEptr = ^AL_DATAFILE;
  AL_DATAFILE = RECORD
    dat : AL_PTR;    { pointer to the data  }
    ftype : AL_INT;    { object type  }
    size : AL_INT;    { size of the object  }
    prop : AL_DATAFILE_PROPERTYptr; { object properties  }
  END;
  type
  TDataFile_Array = array [0..80] of AL_DATAFILE; // Se declara como un arreglo
  AL_DATAFILEptr =^TDataFile_Array; // Apuntador al arreglo



Código Delphi [-]
(* information about an entire joystick *)
//  AL_JOYSTICK_INFOptr = ^AL_JOYSTICK_INFO;
  AL_JOYSTICK_INFO = RECORD
    flags : AL_INT;
    num_sticks : AL_INT;
    num_buttons : AL_INT;
    stick : ARRAY [0..(AL_MAX_JOYSTICK_STICKS)-1] OF AL_JOYSTICK_STICK_INFO;
    button : ARRAY [0..(AL_MAX_JOYSTICK_BUTTONS)-1] OF AL_JOYSTICK_BUTTON_INFO;
  END;
type
  TJoyInfo_Array = array [0..100] of AL_JOYSTICK_INFO; // Se declara como un arreglo
  AL_JOYSTICK_INFOptr = ^TJoyInfo_Array; // Apuntador al arreglo

Por último envía un error en tiempo de ejecución en la línea que pone el título en la ventana, simplemente la comenté.

Código Delphi [-]
//al_set_window_title ('Allegro.pas Demo Game');

Ahora sí puedo intentar hacer algo con la librería.

Saludos.
Responder Con Cita
 



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
Rich Edit demo mateamargo OOP 3 01-10-2007 07:26:32
VCLSKIN 2.6 demo bohemioloco Varios 4 25-11-2006 13:55:04
Demo en un ejecutable Kreyser Varios 2 18-10-2005 11:59:55
Demo de delphi 2005 mazinger Varios 2 18-12-2004 09:23:09
Demo Ulises Varios 6 14-06-2003 19:23:54


La franja horaria es GMT +2. Ahora son las 10:15:54.


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