First commit 09/04/1995

This commit is contained in:
2021-09-03 17:50:32 +02:00
commit e0a9c4f8c9
120 changed files with 13455 additions and 0 deletions

161
CD_IN/PRUEBA_B.CPP Normal file
View File

@ -0,0 +1,161 @@
///////////////////////////// FICHEROS A INCLUIR /////////////////////////////
extern int Fichero_cd_in2(char Dinamicos_Estaticos);
#include <dos.h>
#include <mem.h>
#include <alloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h> // Para getch();
#include <graphics.h> // Para outtextxy(...); y cleardevice(...);
#include "d:\program\src_dos\libs\make_bot\make_bot.h" // Fuciones de MAKE_BOTON
#include "cd_icons.h"
#include "cd_error.h"
// #include "cd_raton.h"
extern int far _Cdecl Svga256_fdriver[];
int huge DetectVGA256()
{
return 2;
}
extern void Inicializa_Dibujo(void);
extern void Inicializa_Iconos(void);
extern void Coloca_Iconos_Dos_Windows(void);
extern char far *Icono; // 18
void InicializaSVGA(void);
extern char dac[256*3];
extern "C" void APAGA_PANTALLA(char *);
extern "C" void ENCIENDE_PANTALLA(char *);
extern void Menu_de_Edicion(void);
extern void Coloca_Iconos(int Start_Icon);
// extern unsigned char *P_Raton1, *P_Raton2, *P_Raton3, *P_Raton4;
// void *Pantalla;
int main(void/*int argc, char *argv[]*/){
InicializaSVGA();
/*<2A>*/ memset( dac, 0, 256*3 ); /*<2A>*/
unsigned Segt = FP_SEG(dac), Off = FP_OFF(dac);
/*<2A>*/ asm mov ax, 0x1012 ; /*<2A>*/
/*<2A>*/ asm mov bx, 0 ; /*<2A>*/
/*<2A>*/ asm mov cx, 256 ; /*<2A>*/
/*<2A>*/ asm mov es, Segt ; /*<2A>*/
/*<2A>*/ asm mov dx, Off ; /*<2A>*/
/*<2A>*/ asm int 0x10 ; /*<2A>*/
if( //carga_botones("cd_in.img") // Carga botones del fichero "botones.p1"
Fichero_cd_in2(0)
!= 1 ) {
Fichero_cd_in2(112);
// Imprime_Estaticos( 112, "cd_in.img");
Espera_Tecla_o_Raton();
closegraph();
cprintf("\n\rError en la CARGA DE BOTONES");
exit(112);
}
Fichero_cd_in2(1);
// Imprime_Estaticos( 1, "cd_in.img"); // Imprime botones estaticos 'Seccion 1'
Imprime_Secuencia(1); // Imprime secuencia 1.
Fichero_cd_in2(2);
// Imprime_Estaticos( 2, "cd_in.img"); // Imprime botones estaticos 'Seccion 2'
// para los textos
/*<2A>*/ PunteroRaton = 100; /*<2A>*/
/*<2A>*/ inicializa_raton_grafico( 0, 0, 618, 460); /*<2A>*/
/*<2A>*/ if ( PunteroRaton != 100 ) { /*<2A>*/
/*<2A>*/ closegraph(); /*<2A>*/
/*<2A>*/ cprintf("Memoria_Insuficiente para el RATON\n\r");/*<2A>*/
/*<2A>*/ exit(1); /*<2A>*/
/*<2A>*/ } /*<2A>*/
Inicializa_Iconos();
Coloca_Iconos_Dos_Windows();
Coloca_Iconos(1);
ENCIENDE_PANTALLA(dac);
/*
if ( (Pantalla = malloc( JD_imagesize(0, 0, 21, 21) )) == NULL ) {
Imprime_Estaticos( SIN_CVN, "cd_in.img"); // Imprime botones estaticos 'Seccion 2'
Espera_Tecla_o_Raton();
closegraph();
cprintf("\n\rError en la asignaci<63>n de memoria para la mascara del raton");
exit(2);
}
*/
True_Push = ON; // Activa el TRUE PUSH ( PRESION REAL )
Menu_de_Edicion();
/*
free(P_Raton1);
free(P_Raton2);
free(P_Raton3);
free(P_Raton4);
*/
APAGA_PANTALLA(dac);
closegraph();
/*
farfree(Icono);
free(Pantalla);
*/
Libera_Raton_Animado();
cprintf("Gracias por utilizar mi Software\n\r");
cprintf(" Jos<6F> David Guill<6C>n\n\r");
cprintf("\n\r");
return 0;
}
void InicializaSVGA(void) {
int Gd = DETECT, Gm;
int Drv, errorcode;
installuserdriver("Svga256",DetectVGA256);
/* If driver is linked with file, remove comments */
registerfarbgidriver(Svga256_fdriver);
errorcode = registerfarbgifont(small_font_far);
/* report any registration errors */
if (errorcode < 0)
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* terminate with an error code */
}
initgraph(&Gd,&Gm,"");
/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Presione una tecla para finalizar:");
getch();
exit(1); /* return with error code */
}
}