164 lines
8.5 KiB
C
164 lines
8.5 KiB
C
// ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
|
||
// Û Errores devueltos por las Funciones Û
|
||
// ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
|
||
|
||
#define OK 1
|
||
#define SIN_MEMORIA 5
|
||
#define ERROR_ABRIENDO 6
|
||
#define ERROR_CERRANDO 7
|
||
|
||
#define ON 1
|
||
#define OFF 0
|
||
|
||
#define EOL 10 // Fin de linea
|
||
|
||
#define MB_TeclaPulsada() ( *(unsigned *) MK_FP(0x40,0x1A) != *(unsigned *) MK_FP(0x40,0x1C) )
|
||
// ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
|
||
// Û Funciones propias de MAKE_BOTON Û
|
||
// ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
|
||
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
// ± Carga los botones del fichero *f_datos, devolviendo los ±
|
||
// ± errores indicados en #define xxxxx X ±
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
int carga_botones(char *f_datos);
|
||
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
// ± Despliega los datos que fueron cargados. ±
|
||
// ± ±
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
void despliega_datos(void);
|
||
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
// ± Imprime los botones estaticos de la secuencia Sec_st, en el ±
|
||
// ± fichero file. ±
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
int Imprime_Estaticos(int Sec_st, char *file);
|
||
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
// ± Imprime los botones din micos de la secuencia Sec_num. ±
|
||
// ± ±
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
void Imprime_Secuencia(int Sec_num);
|
||
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
// ± ±
|
||
// ± Imprime un borde completo de color Color sobre el boton Boton, ±
|
||
// ± de la secuencia n£mero Sec_num. ±
|
||
// ± ±
|
||
// ± NOTA: ±
|
||
// ± Si color es negativo se imprimiran los bordes normales. ±
|
||
// ± ±
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
void Imprime_Bordes(int Sec_num, int Boton, int Color);
|
||
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
// ± Comprueba la pulsaci¢n de los botones de la secuencia Sec_num ±
|
||
// ± ±
|
||
// ± Devuelve el n£mero de boton pulsado, 0 si no se pulso ninguno ±
|
||
// ± y deja en el buffer las teclas pulsadas si no corresponden con ±
|
||
// ± con las teclas asignadas a los botones. ±
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
int Comprueba_Secuencia(int Sec_num);
|
||
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
// ± Libera la memoria que ha sido asignada por Make_Boton. ±
|
||
// ± ±
|
||
// ± NOTA: ±
|
||
// ± DESPUES DE LIBERAR TODA LA MEMORIA DE M_B, NO SE DEBE ±
|
||
// ± UTILIZAR NINGUNA FUNCION SIN RECARGAR PRIMERO LOS BOTONES DE ±
|
||
// ± DE UN ARCHIVO CON ESTOS... ±
|
||
// ± ±
|
||
// ± FUNCION EXTRAIDA PARA USO COMUN, ESPECIALMENTE POR CD_out ±
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
void Libera_Memoria(void);
|
||
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
// ± ±
|
||
// ± Si True_Push se pone a ON, cuando se pulse un boton se hundira ±
|
||
// ± realmente, pero solo si hay suficiente memoria. ±
|
||
// ± ±
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
extern char True_Push;
|
||
|
||
// ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
|
||
// Û Funciones para el control de la Pantalla Û
|
||
// ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
// ± ±
|
||
// ± Sirve para averiguar el tama¤o necesitado por GetImage para ±
|
||
// ± obtener una imagen 256c, para los BGI no compatibles KERNEL. ±
|
||
// ± ±
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
unsigned long JD_imagesize(int left, int top, int right, int bottom);
|
||
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
// ± ±
|
||
// ± Igual a InitGraph, pero realiza un mayor numero de comproba_ ±
|
||
// ± ciones, saliendo si ocurre algun error y mostrandolo... ±
|
||
// ± ±
|
||
// ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||
void Initialize(int GraphDriver, int GraphMode); // Inicializa el Modo Gr fico
|
||
|
||
// ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
|
||
// Û Funciones para el control del Raton Û
|
||
// ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
|
||
|
||
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
||
// ° °
|
||
// ° Muestra el cursor del Raton. - No sirve con el raton animado °
|
||
// ° °
|
||
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
||
void activa_raton(void);
|
||
|
||
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
||
// ° °
|
||
// ° Desactiva el cursor del Raton. No sirve con el raton animado °
|
||
// ° °
|
||
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
||
void desactiva_raton(void);
|
||
|
||
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
||
// ° °
|
||
// ° Regresa con una pulsaci¢n de tecla o la posici¢n en la cual °
|
||
// ° se pulso el raton. °
|
||
// ° °
|
||
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
||
int Espera_Tecla_o_Raton(void); // <->
|
||
|
||
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
||
// ° °
|
||
// ° Sostiene el raton hasta que se suelte el boton presionado... °
|
||
// ° °
|
||
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
||
void Anclar_Raton(void);
|
||
|
||
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
||
// ° °
|
||
// ° Libera la memoria asignada al Raton Animado. °
|
||
// ° °
|
||
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
||
void Libera_Raton_Animado(void);
|
||
|
||
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
||
// ° °
|
||
// ° Inicializa el Raton en el modo Gr fico... °
|
||
// ° °
|
||
// ° x1, y1, x2, y2. Son los topes del RATON °
|
||
// ° °
|
||
// ° °
|
||
// ° °
|
||
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
||
void inicializa_raton_grafico(int x1, int y1, // Inicializa el Raton
|
||
int x2, int y2); // devolviendo raton = 1
|
||
|
||
|
||
|
||
extern char Push;
|
||
extern char raton; // Indica si hay un Raton = 1
|
||
extern char PunteroRaton; // ¨ Se modifica el puntero ?
|
||
extern int x_raton, y_raton; // Tras Espera_Tecla_o_Raton(); devuelve
|
||
// extern int boton_izq, boton_der; // las coordenadas y botones pulsados...
|
||
|
||
extern unsigned char BLANCO, GRIS_CLARO, NEGRO, UNKNOW, AZUL;
|