First commit 11/11/1991

This commit is contained in:
jdg committed 2021-09-08 21:11:45 +02:00
commit cb15a500e4
30 files changed
+8439

No files matched your search

BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+341
View File
@@ -0,0 +1,341 @@
#include <math.h> // Para getch();
#include <dos.h> // Para getch();
#include <stdio.h> // Para getch();
#include <conio.h> // Para getch();
#include <graphics.h> // Para outtextxy(...); y cleardevice(...);
#include "..\libs\make_bot\make_bot.h" // Fuciones de MAKE_BOTON
#define LINEFREC 2
#define MatrizPoint 56
#define BackGRID 0
/*
#define GRID_Y 6
#define GRID_X 6
*/
#define GRID_Y 4
#define GRID_X 4
#define PriGRID_Y 247
#define PriGRID_X 11
typedef struct
{
int x, y;
char ndigitos;
char AX, AY;
char C1, C2, C3;
} p_graphics;
extern void Carga_Puntero(void);
extern int Numero_Digital( long numero, p_graphics *ND );
extern void Fuente_Amplia( char *Frase, p_graphics *FA );
int Espera_TeclaRatonFrec(void);
//((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1), ( y_raton - ( PriGRID_Y - 8 ) )/GRID_Y )
int PerfilX[4096];
int oldPerfilX, oldPerfilY;
void TrazaPerfiles(void);
void TrazaGrafica(void);
char cruz = 1;
int main(void){
p_graphics Numeros = { 20, 20, 6, 3, 3, EGA_RED, EGA_BLACK, EGA_DARKGRAY };
p_graphics Letras = { 15, 102, 14, 1, 1, EGA_BLACK, EGA_RED, EGA_DARKGRAY };
char Buffer[80];
int numero=0;
float num = 0;
for ( numero=0; numero < 640; numero++ )
{
num += 0.5;
PerfilX[ numero ] = 15 + 10*sin( num );
}
Initialize( 9, 2 ); // Inicializa el Modo Gr fico
// carga_botones("Frec.img"); // Carga botones del fichero "Frec.img"
Imprime_Estaticos( 1, "Frec.img"); // Imprime botones estaticos 'Seccion 1'
/// Dibujamos la malla
TrazaGrafica();
PunteroRaton = 1;
inicializa_raton_grafico( 0, 0, 640, 480 );
float vez=1, numerof=0;
while( 1 )
{
Espera_TeclaRatonFrec();
if ( cruz == 0 ) Anclar_Raton();
// if ( y_raton >= (PriGRID_Y - 8) ) numero = 10101;
Numero_Digital( numerof, &Numeros );
/*********************************************************************************************************\
|***/ oldPerfilX = PerfilX[ ((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1) ]; /*|
|**/ oldPerfilY = ((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1); /**|
|*/ PerfilX[ ((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1) ] = ( y_raton - ( PriGRID_Y - 8 ) )/GRID_Y; /***|
\*********************************************************************************************************/
TrazaPerfiles();
switch ((int)(vez))
{
case 1:
sprintf( Buffer, "X: %2d, Y: %2d |", ((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1), ( y_raton - ( PriGRID_Y - 8 ) )/GRID_Y );
break;
case 2:
sprintf( Buffer, "X: %2d, Y: %2d |", ((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1), ( y_raton - ( PriGRID_Y - 8 ) )/GRID_Y );
break;
case 3:
sprintf( Buffer, "X: %2d, Y: %2d |", ((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1), ( y_raton - ( PriGRID_Y - 8 ) )/GRID_Y );
break;
case 4:
sprintf( Buffer, "X: %2d, Y: %2d |", ((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1), ( y_raton - ( PriGRID_Y - 8 ) )/GRID_Y );
vez = 1;
break;
}
if ( (int(vez*100))%100 == 0 )
Fuente_Amplia( Buffer, &Letras );
vez+=1;
if( kbhit() )
{
switch( getch() )
{
case '+':
numerof += 0.05;
break;
case '-':
numerof -= 0.05;
break;
case 27:
restorecrtmode();
return 0;
break;
}
num = 0;
for ( numero=0; numero < 640; numero++ )
{
num += numerof;
PerfilX[ numero ] = 15 + 10*sin( num );
}
TrazaGrafica();
}
}
// Imprime_Secuencia(1); // Imprime secuencia 1.
/*
while(1){ // Bucle infinito
switch( Comprueba_Secuencia( 1 ) ) { // Iniciamos comprobacion
case 0: // No se pulso ningun BOTON
while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER
break;
case -1: // Hay una tecla especial en BUFFER
getch(); // La eliminamos
break;
case 1:
Ayuda();
cleardevice();
Imprime_Estaticos( 1, "botones.p1"); // Devolvemos el aspecto inicial
Imprime_Secuencia(1);
break;
case 2:
restorecrtmode();
return 0;
default:
break;
}
}
*/
getch();
restorecrtmode();
return 0;
}
int Espera_TeclaRatonFrec(void){
char Que;
int bot_izq, bot_der;
activa_raton();
//char cruz = 1;
do{
asm mov AX, 3
asm int 0x33
asm mov x_raton, cx
asm mov y_raton, dx
asm mov bot_izq, bx
asm mov bot_der, bx
bot_izq = bot_izq & 1;
bot_der = (bot_izq >> 1 ) & 1;
if ( y_raton >= (PriGRID_Y - 8) )
{
if ( !cruz ) {
cruz = 1;
PunteroRaton = 2;
Carga_Puntero();
if ( ( (x_raton - (PriGRID_X-1) )%GRID_X ) >= GRID_X/2 && ( ( (x_raton - PriGRID_X)%GRID_X ) != 0 ) )
x_raton += (GRID_X - ( (x_raton - (PriGRID_X-1))%GRID_X ) );
else
x_raton -= ( ( (x_raton - (PriGRID_X-1))%GRID_X ) );
y_raton = PriGRID_Y - 8;
} else {
if ( x_raton > 622 )
x_raton = 622; else
if ( ( (x_raton - (PriGRID_X-1) )%GRID_X ) >= GRID_X/2 && ( ( (x_raton - PriGRID_X)%GRID_X ) != 0 ) )
x_raton += (GRID_X - ( (x_raton - (PriGRID_X-1))%GRID_X ) );
else
x_raton -= ( ( (x_raton - (PriGRID_X-1))%GRID_X ) );
if ( y_raton > 459 )
y_raton = 459; else
if ( ( (y_raton - ( PriGRID_Y - 8 ) )%GRID_Y ) >= GRID_Y/2 && ( ( (y_raton - ( PriGRID_Y - 8 ) )%GRID_Y ) != 0 ) )
y_raton += (GRID_Y - ( (y_raton - ( PriGRID_Y - 8 ) )%GRID_Y ) );
else
y_raton -= ( ( (y_raton - ( PriGRID_Y - 8 ) )%GRID_Y ) );
}
asm mov ax, 4
asm mov cx, x_raton
asm mov dx, y_raton
asm int 0x33
} else
if ( cruz ) {
cruz = 0;
PunteroRaton = 1;
Carga_Puntero();
}
}while( bot_izq == 0 && bot_izq == 0 && !MB_TeclaPulsada() );
/////////////////////////////////////////
// RETURN Derecho Izquierdo //
// //
// 0 0 0 //
// 1 1 0 //
// 2 0 1 //
// 3 1 1 //
// //
/////////////////////////////////////////
if ( bot_der ==0 && bot_izq ==0 ) Que = 0;
if ( bot_der ==1 && bot_izq ==0 ) Que = 1;
if ( bot_der ==0 && bot_izq ==1 ) Que = 2;
if ( bot_der ==1 && bot_izq ==1 ) Que = 3;
desactiva_raton();
return Que;
}
void TrazaPerfiles(void)
{
int X = x_raton+6;//((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)*GRID_X + PriGRID_X;
int Y = y_raton+8;
int Desde_Y, Hasta_Y;
if ( y_raton < (PriGRID_Y - 8) ) return;
// Calculo desde donde, hasta donde tengo que borrar para hacelerar el borrado.
// ( esta nueva optimizaci¢n acelera el tiempo de retardo:
// en el mejor caso: un 98.4 %
// en el peor caso: un 0.0 %
// tiempo medio acelerado ( teu: un 6i.j %
Desde_Y = Hasta_Y = oldPerfilX;
if ( Hasta_Y < PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)+1] ) Hasta_Y = PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)+1]*GRID_Y+PriGRID_Y; else
if ( Hasta_Y < PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)-1] ) Hasta_Y = PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)-1]*GRID_Y+PriGRID_Y; else
// if ( Hasta_Y = PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)-1] )
Hasta_Y = Hasta_Y*GRID_Y+PriGRID_Y;
if ( Desde_Y > PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)+1] ) Desde_Y = PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)+1]*GRID_Y+PriGRID_Y; else
if ( Desde_Y > PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)-1] ) Desde_Y = PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)-1]*GRID_Y+PriGRID_Y; else
Desde_Y = Desde_Y*GRID_Y+PriGRID_Y;
setcolor( BackGRID );
// Borro las franjas adyacentes al punto perfilado:
if ( (((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)-1) >=0 ) line( X - ( GRID_X - 1 ), PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)-1]*GRID_Y+PriGRID_Y, (X+1), oldPerfilX*GRID_Y+PriGRID_Y );
line( (X+1), oldPerfilX*GRID_Y+PriGRID_Y, X + ( GRID_X + 1 ), PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)+1]*GRID_Y+PriGRID_Y );
// putpixel( X - ( GRID_X - 1 ), PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)-1]*GRID_Y+PriGRID_Y, MatrizPoint );
// putpixel( (X+1), oldPerfilX*GRID_Y+PriGRID_Y, MatrizPoint );
// putpixel( X + ( GRID_X + 1 ), PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)+1]*GRID_Y+PriGRID_Y, MatrizPoint );
// Retrazo los puntos de la matriz anulada
{
auto int x, y;
for( x= ( (((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)-1) >=0 ) ?
X - ( GRID_X - 1 ):
( X - 1 );
x<= (x_raton > 622) ? ( X + 1 ) :
( X + ( GRID_X + 1 ) ); x+=GRID_X)
// /*
for( y=Desde_Y; y<=Hasta_Y; y+=GRID_Y)
putpixel( x, y, MatrizPoint );
} // Destruccion de x, y
// Ahora dibujo las lineas correspondientes al perfil izq. y derch.
setcolor( LINEFREC );
if ( (((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)-1) >=0 ) line( X - ( GRID_X - 1 ), PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)-1]*GRID_Y+PriGRID_Y, (X+1), Y );
if ( x_raton <= 622 ) line( (X+1), Y, X + ( GRID_X + 1 ), PerfilX[((( x_raton - ( PriGRID_X - 1 ) )/GRID_X)+1)+1]*GRID_Y+PriGRID_Y );
}
void TrazaGrafica(void)
{
int x, y;
setfillstyle( SOLID_FILL, BackGRID );
bar( PriGRID_X, PriGRID_Y, 631, 467 );
/*
for( x=PriGRID_X; x<=631; x+=GRID_X)
for( y=PriGRID_Y; y<=467; y+=GRID_Y)
putpixel( x, y, MatrizPoint );
*/
//for( x=6 - ( GRID_X - 1 ); x<=631; x+=GRID_X)
for( x= ( 6 - ( 1 - PriGRID_X )%GRID_X - ( GRID_X - 1 ) ) + GRID_X; x<=631; x+=GRID_X)
for( y=PriGRID_Y; y<=467; y+=GRID_Y)
putpixel( x, y, MatrizPoint );
setcolor( LINEFREC );
for( x= ( 6 - ( 1 - PriGRID_X )%GRID_X - ( GRID_X - 1 ) ) + GRID_X; x<=631; x+=GRID_X)
if ( (x-PriGRID_X)/GRID_X >= 0 )
line( x, PerfilX[ (x-PriGRID_X)/GRID_X ]*GRID_Y+PriGRID_Y, x+GRID_X, PerfilX[ ( (x-PriGRID_X)/GRID_X ) + 1 ]*GRID_Y+PriGRID_Y);
}
BIN
View File
Binary file not shown.
+20
View File
@@ -0,0 +1,20 @@
­1
* Cuadro de ondas
& 0, 190, 640, 480, 7, 63, 56, 2, 2
& 5, 195, 635, 235, 1, 56, 63, 1, 2
& 5, 241, 635, 475, 0, 56, 63, 1, 2
* Cuadro de numeros
& 0, 0, 250, 130, 7, 63, 56, 2, 2
& 8, 8, 242, 92, 0, 56, 63, 2, 2
& 8, 97, 242, 122, 0, 56, 63, 2, 2
* | 397, 50, 2, 4, 0, 63, MMMMMMMMM-MMMMMMMMM-MMMMMMMMM-,
* x y fuente tama¤o orientacion color texto
BIN
View File
Binary file not shown.
+123
View File
@@ -0,0 +1,123 @@
#include <graphics.h>
#include <stdlib.h>
#include <alloc.h>
#include <conio.h>
#include <dos.h>
typedef struct
{
int Ex, Ey, Ez;
char Ecolor;
} CAMPO_de_ESTRELLAS;
CAMPO_de_ESTRELLAS *Cestrellas, *o;
void Actualiza(CAMPO_de_ESTRELLAS *Cest);
void Star3d(CAMPO_de_ESTRELLAS *Cest);
void pon_estrella(CAMPO_de_ESTRELLAS *Cest);
void llena_campo(CAMPO_de_ESTRELLAS *Cest);
void deinit_star(void);
void init_star(void);
void init_star(void)
{
randomize();
if ( ( Cestrellas = (CAMPO_de_ESTRELLAS *)malloc( sizeof(CAMPO_de_ESTRELLAS)*200 ) ) == NULL ) return;
if ( ( o = (CAMPO_de_ESTRELLAS *)malloc( sizeof(CAMPO_de_ESTRELLAS)*200 ) ) == NULL ) return;
llena_campo(Cestrellas);
}
void deinit_star(void)
{
free( Cestrellas );
free( o );
}
void llena_campo(CAMPO_de_ESTRELLAS *Cest)
{
int estrellas;
for ( estrellas = 0; estrellas < 200; estrellas++ )
pon_estrella( &Cest[estrellas] );
}
void pon_estrella(CAMPO_de_ESTRELLAS *Cest)
{
Cest -> Ex = random(320)+1;
Cest -> Ey = random(240)+1;
Cest -> Ez = 400 ;
Cest -> Ecolor = EGA_WHITE;
}
void Star3d(CAMPO_de_ESTRELLAS *Cest)
{
Star3d( Cestrellas );
while( !kbhit() ) Actualiza(Cest);
}
void Actualiza(CAMPO_de_ESTRELLAS *Cest)
{
int Ex, Ey, conta;
static float FactorMovimientoX = 0, FactorMovimientoY = 0, ox = 0, oy = 0;
static float x=0.1, y=0.1;
static char color = 0;
for( conta=0; conta<200; conta++ )
{
if ( o[conta].Ex+ox> 10 && o[conta].Ex+ox < 635 && o[conta].Ey+oy+100 >325 && o[conta].Ey+oy+100 < 470 )
putpixel ( o[conta].Ex+ox, o[conta].Ey+oy+100, 0 );
// putpixel ( o[conta].Ex+ox+5, o[conta].Ey+oy+(317/2), 0 );
Ex = ( ((256*Cest[conta].Ex)/Cest[conta].Ez))+320;
Ey = ( ((256*Cest[conta].Ey)/Cest[conta].Ez))+320;//240;
Cest[conta].Ez = Cest[conta].Ez - 5 ;
o[conta].Ex = Ex;
o[conta].Ey = Ey;
color++;
if ( color > 10 )
{
if ( Cest[conta].Ecolor == EGA_WHITE )
Cest[conta].Ecolor = EGA_LIGHTGRAY;
else if ( Cest[conta].Ecolor == EGA_LIGHTGRAY )
Cest[conta].Ecolor = EGA_DARKGRAY;
else
Cest[conta].Ecolor = EGA_WHITE;
color = 0;
}
if ( Ex>635 && Ey>470+100 )
pon_estrella ( &Cest[conta] );
if ( Cest[conta].Ez <= 20 || Ex>635 || Ey>470 || Ex<5 || Ey<0 )
// if ( Cest[conta].Ez <= 20 || Ex>635 || Ey>470 || Ex<5 || Ey<317 )
pon_estrella ( &Cest[conta] );
if ( Ex+FactorMovimientoX > 10 && Ex+FactorMovimientoX < 635 && Ey+FactorMovimientoY+100 >325 && Ey+FactorMovimientoY+100 < 470 )
putpixel ( Ex+FactorMovimientoX, Ey+FactorMovimientoY+100, Cest[conta].Ecolor );
// putpixel ( Ex+FactorMovimientoX+5, Ey+FactorMovimientoY+(317/2), Cest[conta].Ecolor );
}
ox = FactorMovimientoX;
oy = FactorMovimientoY;
FactorMovimientoX+= x;
FactorMovimientoY+= y;
if ( FactorMovimientoX > 100 ) x = -0.1;
if ( FactorMovimientoX < -100 ) x = 0.1;
if ( FactorMovimientoY > 100 ) y = -0.1;
if ( FactorMovimientoY < -100 ) y = 0.1;
}
BIN
View File
Binary file not shown.
+417
View File
@@ -0,0 +1,417 @@
#include <graphics.h>
char cargar [18] [18] =
{
14,14,14,14,14,3,3,3,3,3,3,3,3,3,3,3,3,3,
14,14,14,14,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
14,14,14,14,3,0,0,0,0,0,0,0,0,0,0,0,3,3,
14,14,14,14,14,0,1,1,1,1,1,1,1,1,1,0,3,3,
14,3,14,14,14,14,1,1,1,1,1,1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,3,3,3,3,3,3,3,3,3,3,3,3
};
char led_on [18] [18] =
{
3,3,3,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,
3,3,0,7,7,7,7,0,3,3,3,3,3,3,3,3,3,3,
3,0,7,11,13,13,11,7,0,3,3,3,3,3,3,3,3,3,
0,7,11,13,11,11,11,11,8,0,3,3,3,3,3,3,3,3,
0,7,11,11,11,11,11,11,8,0,3,3,3,3,3,3,3,3,
0,7,11,11,11,11,11,13,8,0,3,3,3,3,3,3,3,3,
0,7,11,11,11,11,13,13,8,0,3,3,3,3,3,3,3,3,
3,0,8,11,13,13,13,8,0,3,3,3,3,3,3,3,3,3,
3,3,0,8,8,8,8,0,3,3,3,3,3,3,3,3,3,3,
3,3,3,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
};
void ponicono(int x,int y,char matriz[18][18], char pos)
{
int veces1,veces2;
for (veces1=0;veces1<=17;veces1++)
{
for (veces2=0;veces2<=17;veces2++)
{
switch( pos )
{
case 1:
if ( matriz[veces1][veces2] != 3 )
putpixel(x+veces1,y+veces2,matriz[veces1][veces2]);
break;
case 2:
if ( matriz[17-veces2][veces1] != 3 )
putpixel(x+veces1,y+veces2,matriz[17-veces2][veces1]);
break;
case 3:
if ( matriz[17-veces1][veces2] != 3 )
putpixel(x+veces1,y+veces2,matriz[17-veces1][veces2]);
break;
case 4:
if ( matriz[veces2][veces1] != 3 )
putpixel(x+veces1,y+veces2,matriz[veces2][veces1]);
break;
}
}
}
}
+17
View File
@@ -0,0 +1,17 @@
#define MODULO extern
MODULO char CREDITS [18] [18];
MODULO char help [18] [18];
MODULO char led_on [18] [18];
MODULO char led_off [18] [18];
MODULO char salir [18] [18];
MODULO char salvar [18] [18];
MODULO char cargar [18] [18];
MODULO char flecha [18] [18];
MODULO char TipoOnda [11] [18] [18];
#undef MODULO
void ponicono(int x,int y,char matriz[18][18], char pos);
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+64
View File
@@ -0,0 +1,64 @@
#ifdef __cplusplus
#define __CPPARGS ...
#else
#define __CPPARGS
#endif
#define INTR 0X1C /* The clock tick interrupt */
#define OK 1
#define ERROR -1
#define oAnchoVentana 626
#define oAltoVentana 156
#define oVentanas 5
#define oFinalOnda oAnchoVentana * oVentanas
#define inicioMGx 7
#define inicioMGy 127
#define GRANDEo 1
#define MINIo 0
#define alcanceRatonY 292
#define alcanceRatonX 626
#define factorCorreccionRatonY -9
#define mAltoCuadro 20
#define inicioMmGy 290
#define ON 1
#define OFF 0
#define Salvar 1
#define Cargar 2
typedef struct {
// N§'s grandes
char nBorde, nRelleno, nFondo,
// Letras digitales
lFondo, lLetra,
// Onda osciloscopio
oMatrix, oOnda, oSelect,
// Onda Generada
gMatrix, gOnda,
// Cuadro MiniOnda
mOnda, mFondo, mMarco,
// Textos
Texto, F_Texto, VisorLCD;
} CFG_FREC;
extern CFG_FREC cfgFREC;
typedef struct
{
int x, y;
char ndigitos;
char AX, AY;
char C1, C2, C3;
} p_graphics;
extern p_graphics Numeros;
extern p_graphics Letras;
extern void Carga_Puntero (void);
extern char Optar( char *texto1, char *texto2, char *texto3 );
extern char file_browser( char *comodin_name, char *texto1, char Cargar_Salvar );
extern int Numero_Digital( long numero, p_graphics *ND );
extern void Fuente_Amplia( char *Frase, p_graphics *FA );
extern int statusBoton;
+280
View File
@@ -0,0 +1,280 @@
*
* ATENCION, ESTE ES EL CàDIGO FUENTE DE MIS LIBRERIAS PARA GENERAR FONDOS
* Y PULSADORES.
*
* VERSION DEL CODIGO COMPILABLE EN TIEMPO DE EJECUCION
*
* UTILICE EL PROGRAMA MK_BOTON.EXE PARA CONVERTIR A C++
* Y COMPILARLO JUNTO AL CODIGO FUENTE DE LA APLICACION.
*
* El autor de este programa vende LAS LIBRERIAS que el mismo a fabricado
* y con las que estan ello este programa:
*
* MAKE_BOTON 5.000 ptas ( Crea Pulsadores y FX's sin esfuerzo )
* WAVE_GENER 5.000 ptas ( Muestreador y retocador completo )
* FX_PACK 5.000 ptas ( N§s Grandes, Letras Despl, MouseP... )
* WAVE_PLAY 3.500 ptas ( Librerias de reproducci¢n de waves
* de hasta 32 TeraBytes con solo 8 Kb )
* XMS_MEMMGR 3.500 ptas ( Clase para manejar la XMS )
* B_DATOS 5.000 ptas ( Clase " la gestion de bases de datos )
*
* Ú---> 15.000 <---Â---> 15.000 <---Ä---> 15.000 <---Â---> 15.000 <---¿
* Ã---> 15.000 <---´ TODO EL KIT POR SOLO Ã---> 15.000 <---´
* À---> 15.000 <---Á---> 15.000 <---Ä---> 15.000 <---Á---> 15.000 <---Ù
* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
* Û Û
* Û Pantalla Principal Û
* Û Û
* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
­1
* Cuadro de ondas
& 0, 120, 640, 480, 7, 63, 56, 2, 2
& 5, 125, 635, 284, 0, 56, 63, 1, 2
& 5, 288, 635, 313, 1, 56, 63, 1, 2
& 5, 317, 635, 475, 0, 56, 63, 1, 2
* Cuadro de numeros
& 0, 0, 240, 120, 7, 63, 56, 2, 2
& 8, 8, 232, 82, 0, 56, 63, 2, 2
& 8, 87, 232, 112, 0, 56, 63, 2, 2
* Cuadro de Botone
*
* COMIENZA EL JUEGO... ( JD EL GENIO DE GENIOS... )
*
*
#5
!1, 33
* Boton Seleccion Generador/Osciloscopio
$ 240, 0, 315, 24, 7, 63, 56, 2, 2, 00, 00
* Boton ejecutar accion GENERAR/OBTENER onda
$ 315, 0, 340, 24, 7, 63, 56, 2, 2, 00, 00
* ????????????????????????????????????
$ 240, 24, 315, 48, 7, 63, 56, 2, 2, 00, 00
* ????????????????????????????????????
$ 315, 24, 340, 48, 7, 63, 56, 2, 2, 00, 00
* Boton Salvar
$ 240, 48, 340, 72, 7, 63, 56, 2, 2, 00, 00
* Boton Cargar
$ 240, 72, 340, 96, 7, 63, 56, 2, 2, 00, 00
* Boton Salir
$ 240, 96, 340, 120, 7, 63, 56, 2, 2, 83, 00
* Boton Ayuda on-Line
$ 340, 0, 365, 30, 7, 63, 56, 2, 2, 00, 00
* Boton Creditos
$ 340, 30, 365, 60, 7, 63, 56, 2, 2, 00, 00
* Boton REGISTRO / MI LICENCIA
$ 340, 60, 365, 120, 7, 63, 56, 2, 2
* Cuadro/Boton Amplitud
& 540, 0, 615, 24, 7, 63, 56, 2, 2
$ 542, 2, 613, 22, 0, 56, 63, 2, 2, 00, 00
& 540, 24, 615, 48, 7, 63, 56, 2, 2
$ 542, 26, 613, 46, 0, 56, 63, 2, 2, 00, 00
* Cuadro/Boton unidad
& 611, 0, 640, 24, 7, 63, 56, 2, 2
$ 613, 2, 638, 22, 0, 56, 63, 2, 2, 00, 00
& 611, 24, 640, 48, 7, 63, 56, 2, 2
$ 613, 26, 638, 46, 0, 56, 63, 2, 2, 00, 00
* Botones de cursor y acciones mas precisas para estos
*
$ 615, 48, 640, 72, 7, 63, 56, 2, 2, 00, 73
* --------->>>>>> Flecha derecha
$ 615, 72, 640, 96, 7, 63, 56, 2, 2, 00, 77
* Marcar Parte de la onda
$ 615, 96, 640, 120, 7, 63, 56, 2, 2, 00, 81
* ^^^^^ Flecha arriba
$ 590, 48, 615, 72, 7, 63, 56, 2, 2, 00, 72
* Centrar cero
$ 590, 72, 615, 96, 7, 63, 56, 2, 2, 00, 00
* \/ \/ \/ \/ \/ Flecha abajo
$ 590, 96, 615, 120, 7, 63, 56, 2, 2, 00, 80
*
$ 565, 48, 590, 72, 7, 63, 56, 2, 2, 00, 71
* <<<<<<-------- Flecha izquierda
$ 565, 72, 590, 96, 7, 63, 56, 2, 2, 00, 75
* Ground ( Tierra )
$ 565, 96, 590, 120, 7, 63, 56, 2, 2, 00, 79
* Selecciona la onda completa
$ 540, 48, 565, 120, 7, 63, 56, 2, 2, 00, 00
* Creacion de onda predefinida
* Estancar proceso
$ 365, 0, 395, 24, 7, 63, 56, 2, 2, 00, 00
* Retroceder tipo de onda
$ 395, 0, 424, 24, 7, 63, 56, 2, 2, 00, 00
* Onda pred. 1, 2, 3
$ 424, 0, 453, 24, 7, 63, 56, 2, 2, 00, 00
$ 453, 0, 482, 24, 7, 63, 56, 2, 2, 00, 00
$ 482, 0, 511, 24, 7, 63, 56, 2, 2, 00, 00
* Avanzar tipo de onda
$ 511, 0, 540, 24, 7, 63, 56, 2, 2, 00, 00
$ 365, 24, 424, 48, 7, 63, 56, 2, 2, 00, 00
*
$ 424, 24, 482, 48, 7, 63, 56, 2, 2, 00, 00
*
$ 482, 24, 540, 48, 7, 63, 56, 2, 2, 00, 00
* | 397, 50, 2, 4, 0, 63, MMMMMMMMM-MMMMMMMMM-MMMMMMMMM-,
­2
| 240, 50, 2, 6, 0, 63, Salvar,
| 241, 51, 2, 6, 0, 0, Salvar,
| 240, 74, 2, 6, 0, 63, Cargar,
| 241, 75, 2, 6, 0, 0, Cargar,
| 240, 98, 2, 6, 0, 63, Salir,
| 241, 99, 2, 6, 0, 0, Salir,
| 240, 99, 2, 6, 0, 63, _,
| 241, 100, 2, 6, 0, 0, _,
| 614, 108, 2, 2, 0, 63, Marca,
| 615, 109, 2, 2, 0, 0, Marca,
| 563, 107, 2, 4, 0, 63, GND,
| 564, 108, 2, 4, 0, 0, GND,
| 382, 1, 2, 4, 1, 63, CRT,
| 383, 2, 2, 4, 1, 0, CRT,
!2, 1
$ 204, 274, 276, 291, 7, 56, 63, -2, 1, 00, 30
* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
* Û Û
* Û Casilla de pregunta ( OPTAR por.... ACEPTAR CANCELAR Û
* Û Û
* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
­100
& 200, 212, 440, 267, 7, 56, 63, 2, 1
& 205, 217, 435, 262, 7, 63, 56, -2, 1
* Boton Aceptar
& 200, 270, 280, 295, 7, 63, 56, 2, 1
* Boton Cancelar
& 360, 270, 440, 295, 7, 63, 56, 2, 1
­101
| 200, 274, 2, 5, 0, 63, Aceptar,
| 201, 275, 2, 5, 0, 0, Aceptar,
| 200, 274, 2, 5, 0, 14, A,
| 201, 275, 2, 5, 0, 0, A,
| 340, 274, 2, 5, 0, 63, Cancelar,
| 341, 275, 2, 5, 0, 0, Cancelar,
| 340, 274, 2, 5, 0, 14, C,
| 341, 275, 2, 5, 0, 0, C,
!3, 2
* Boton Aceptar
$ 204, 274, 276, 291, 7, 56, 63, -2, 1, 00, 30
* Boton Cancelar
$ 364, 274, 436, 291, 7, 56, 63, -2, 1, 00, 46
* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
* Û Û
* Û File Browser Û
* Û Û
* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
!4, 4
*Cuadro Cancelar
$ 377, 169, 391, 221, 7, 56, 63, 0, 1, 00, 46
*Boton Aceptar
$ 377, 223, 391, 276, 7, 56, 63, 0, 1, 00, 30
* Subir
$ 377, 278, 391, 303, 7, 56, 63, 0, 1, 00, 72
* Bajar
$ 377, 305, 391, 330, 7, 56, 63, 0, 1, 00, 80
* x y fuente tama¤o orientacion color texto
* Men£ para Cargar o Salvar
­10
*Cuadro Total
& 240, 140, 400, 340, 7, 63, 56, 2, 1
& 243, 143, 397, 337, 7, 56, 63, -2, 1
*Cuadro Informativo
& 250, 150, 391, 164, 7, 56, 63, -0, 1
*Cuadro introduccion nuevos datos
& 250, 169, 375, 180, 0, 56, 63, 0, 1
*Cuadro de muestreo
& 250, 185, 375, 330, 0, 56, 63, 0, 1
*Cuadro Cancelar
& 377, 169, 391, 221, 7, 56, 63, 0, 1
*Boton Aceptar
& 377, 223, 391, 276, 7, 56, 63, 0, 1
* Subir
& 377, 278, 391, 303, 7, 56, 63, 0, 1
* Bajar
& 377, 305, 391, 330, 7, 56, 63, 0, 1
|377, 169, 2, 4, 1, 63, Cancelar,
|378, 170, 2, 4, 1, 0, Cancelar,
|377, 169, 2, 4, 1, 2, C ,
|378, 170, 2, 4, 1, 0, C ,
|377, 223, 2, 4, 1, 63, Aceptar ,
|378, 224, 2, 4, 1, 0, Aceptar ,
|377, 223, 2, 4, 1, 2, A ,
|378, 224, 2, 4, 1, 0, A ,
|377, 288, 2, 4, 0, 63, -,
|378, 289, 2, 4, 0, 0, -,
|377, 315, 2, 4, 0, 63, +,
|378, 316, 2, 4, 0, 0, +,
********************************************************************************
**** Prueba del pulsador derecho... *******************************************
********************************************************************************
!5, 7
* Boton Cerrar seleccion derecho
$ 0, 0, 25, 52, 7, 63, 56, 2, 2, 00, 00
* Boton seleccion DISPERSION
$ 30, 0, 105, 24, 7, 63, 56, 2, 2, 00, 00
$ 50, 3, 103, 21, 0, 56, 63, 2, 1, 00, 00
* Boton seleccion PRESICIàN
$ 30, 29, 105, 52, 7, 63, 56, 2, 2, 00, 00
$ 50, 32, 103, 49, 0, 56, 63, 2, 1, 00, 00
* Subir selecci¢n
$ 110, 0, 135, 24, 7, 63, 56, 2, 2, 00, 00
* Bajar selecci¢n
$ 110, 29, 135, 52, 7, 63, 56, 2, 2, 00, 00
* TODO EL CUADRO MIDE: (0, 0) - (135, 52)
********************************************************************************
********************************************************************************
********************************************************************************
BIN
View File
Binary file not shown.
+577
View File
@@ -0,0 +1,577 @@
#include <io.h>
#include <dos.h>
#include <dir.h>
#include <direct.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <alloc.h>
#include <conio.h>
#include <stdlib.h>
#include <graphics.h>
#include "..\..\libs\make_bot\make_bot.h"
#include "frec.h"
extern CFG_FREC cfgFREC;
////////////////////////////////////////////////////////////////////////////
/***************************************************************************\
| Critical Disk Error handling routines (C) 1995 Jason Speight. |
| void interrupt critical_error_handler(__CPPARGS) is the interrupt which |
| captures disk io errors. (int 0x24, if you're interested!) Such errors |
| are : Disk not inserted in drive, seek error reading from a drive, general|
| disk failure etc. The only things the interrupt does is : |
| Suppress the dos ABORT,RETRY,FAIL,IGNORE statement |
| Sets a variable erroroccurred to the dos error statement. (!=0) |
| |
| StartCEH() and StopCEH() start and stop the error handler. YOU MUST |
| STOPCEH BEFORE THE EXIT OF THE PROGRAM. or else when you get a disk |
| error, the int 24 issued bu DOS points to the middle of nowhere! *HANG* |
| |
| diskerror() is my routine to display a disk IO error. It also sets the |
| global variable erroroccurred to 0 for future use. This procedure also |
| needs access to "SCRNHNDL.H" and "BOXES.H" |
| |
| BTW, anybody know how to trap the message "PLEASE INSERT DISK FOR DRIVE x"|
\***************************************************************************/
void interrupt critical_error_handler(.../*__CPPARGS*/); // interrupt prototype
void interrupt (*old_int24)(.../*__CPPARGS*/); // interrupt function pointer
void startceh();
void stopceh();
int erroroccurred=0;
////////////////////////////////////////////////////////////////////////////
typedef struct {
char files[13] ; //200 files, 12 byte filename (+1 for terminator!)
long filesize ; //Try as static.. free up that ram, bud. (Use HUGE mem model)
unsigned char attrs ;
} SFile;
SFile *S_File;
void FileDownRow(void);
void FileUpRow(void) ;
void PrintWholeScreen_Files(void);
void PrintSelectRow( char Hide_Show );
unsigned char FileRow = 0; int FileCurrTopRow = 0;
unsigned int maxfiles=0;
unsigned int rasterscan(char *fm);
char Archivo[13];
void PrintVisor(void);
char Optar( char *texto1, char *texto2, char *texto3 );
int InputCadenaG(char *s, int numalp, int lmax, int cc, int cf, int left, int up, int right, int down);
char file_browser( char *comodin_name, char *texto1, char Cargar_Salvar );
char file_browser( char *comodin_name, char *texto1, char Cargar_Salvar ){
int ok = 0, inst = 0;
struct textsettingstype textinfo;
char oldpath[229]=" -- NONE -- "; //internal. do not change
unsigned char olddrive=255; //impossible drive name
char olddisk, key;
startceh();
FileRow = FileCurrTopRow = 0;
olddrive = getdisk();
getcwd( oldpath, 229 );
void *C_Texto;
C_Texto = malloc( JD_imagesize(240, 140, 400, 340) );
S_File = (SFile *)malloc( sizeof(SFile) * 201 );
if( C_Texto == NULL || S_File == NULL ) {
closegraph();
cprintf("\n\rSALIENDO");
cprintf("\n\rImposible encontrar %ldKbytes en el Heap", ( JD_imagesize(240, 140, 400, 340) + sizeof(SFile)*201 ) );
return 0;
}
rasterscan( comodin_name );
gettextsettings(&textinfo);
getimage( 240, 140, 400, 340, C_Texto);
Imprime_Estaticos( 10, "FREC.IMG"); // Imprime botones estaticos 'Seccion 20'
settextstyle( SMALL_FONT, HORIZ_DIR, 4);
setcolor( 1 );
outtextxy( 250+( ( 141 - textwidth(texto1) ) / 2 ), 150, texto1 );
PrintWholeScreen_Files();
PrintSelectRow( 1 );
while(!ok){ // Bucle infinito
switch( Comprueba_Secuencia( 4, NULL ) ) { // Iniciamos comprobacion de 2¦ sec
case 0: // No se pulso ningun BOTON
// Pero el raton fue presionado en
// algun sitio...
break;
case -2: // Hay una tecla normal en BUFFER
switch( key = getch() ) { // La utilizamos
// ESC ( CANCELAR )
case 27:
inst = 0;
ok = 1;
break;
case 13:
switch( S_File[FileRow + FileCurrTopRow].attrs )
{
// Si directorio: cambiamos simplemente
case FA_DIREC:
chdir( S_File[FileRow + FileCurrTopRow].files );
FileRow = FileCurrTopRow = 0;
rasterscan( comodin_name );
PrintWholeScreen_Files();
PrintSelectRow( 1 );
break;
// Si unidad comprobamos que podemos cambiar y como directorio...
case 255:
erroroccurred=0;
olddisk=getdisk();
setdisk( (S_File[FileRow + FileCurrTopRow].files[0] - 'A') );
if (erroroccurred) {
setdisk(olddisk);
} else {
FileRow = FileCurrTopRow = 0;
rasterscan( comodin_name );
PrintWholeScreen_Files();
PrintSelectRow( 1 );
}
break;
default:
if ( strcmp(Archivo, S_File[FileRow+FileCurrTopRow].files) == 0 )
{
if ( Cargar_Salvar == 0 ) {
if ( access(Archivo, 0) != 0) break;
sprintf( comodin_name, "%c:\\", getdisk() + 'A' );
getcurdir(0,comodin_name+3);
strcat(comodin_name, "\\");
strcat(comodin_name, Archivo);
inst = 1;
ok = 1;
}
}
strcpy(Archivo, S_File[FileRow+FileCurrTopRow].files);
PrintVisor();
break;
}
break;
default:
strcpy( Archivo, "\0" );
ungetch(key);
InputCadenaG(Archivo, 0, 12, 0, cfgFREC.F_Texto, 252, 171, 373, 178);
if (Cargar_Salvar == 0)
{
// Comprobamos que existe el fichero
if ( access(Archivo, 0) != 0)
strcpy( Archivo, "\0" );
}
PrintVisor();
break;
}
break;
case -1: // Hay una tecla especial en BUFFER
getch(); // La eliminamos
break;
// Boton Aceptar
case 2:
if ( Cargar_Salvar == 0 ) {
if ( access(Archivo, 0) != 0) break;
sprintf( comodin_name, "%c:\\", getdisk() + 'A' );
getcurdir(0,comodin_name+3);
strcat(comodin_name, "\\");
strcat(comodin_name, Archivo);
inst = 1;
ok = 1;
} else {
if ( access(Archivo, 0) == 0)
if ( Optar( "Fichero Existe", "¨ Reemplazarlo ?","" ) == 0 ) break;
sprintf( comodin_name, "%c:\\", getdisk() + 'A' );
getcurdir(0,comodin_name+3);
strcat(comodin_name, "\\");
strcat(comodin_name, Archivo);
inst = 1;
ok = 1;
}
break;
// Boton Cancelar
case 1:
inst = 0;
ok = 1;
break;
// Boton Subir
case 3:
FileUpRow();
break;
// Boton Bajar
case 4:
FileDownRow();
break;
default:
while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER
break;
}
}
putimage( 240, 140, C_Texto, COPY_PUT);
free ( C_Texto );
free ( S_File );
settextstyle(textinfo.font, textinfo.direction, textinfo.charsize );
settextjustify(textinfo.horiz, textinfo.vert);
setdisk(olddrive);
chdir(oldpath);
stopceh();
return inst;
}
unsigned int rasterscan(char *fm) {
struct ffblk ffblk;
char done=0;
unsigned int olddisk;
maxfiles = 0;
// build a disk drive availiable list
olddisk=getdisk();
for (int i=1;i<27;i++) if (_chdrive(i) == 0)
{
sprintf( S_File[maxfiles].files, "%c:", (char)('A' + i - 1) );
S_File[maxfiles].filesize=0;
S_File[maxfiles].attrs=255; // Unidad
if (ffblk.ff_attrib & 16) S_File[maxfiles].filesize=0;
maxfiles++;
}
setdisk(olddisk);
// drivelist[2]='N'; //stop access to B drive until I sort out pahntom dive probs
//Ok, Drive B may be a phantom drive. If you try to access drive B, then
//the program looses controll. Bummer!
// needs debugging. (always ignores drive b...)
// asm int 0x11
// asm mov equipmentlist,ax
// drivelist[2]='N';
// if ((equipmentlist & 16)) drivelist[2]='Y';
done = findfirst("*.*",&ffblk,FA_DIREC);
while (!done) {
if (ffblk.ff_attrib == 0x10) {
strcpy(S_File[maxfiles].files,ffblk.ff_name);
S_File[maxfiles].filesize=ffblk.ff_fsize;
S_File[maxfiles].attrs=ffblk.ff_attrib;
if (ffblk.ff_attrib & 16) S_File[maxfiles].filesize=0;
maxfiles++;
}
done = findnext(&ffblk);
if (maxfiles==200) done=!done; //stop to prevent internal crashes.
}
done = findfirst(fm,&ffblk,FA_DIREC);
while (!done) {
if (ffblk.ff_attrib != 0x10) {
strcpy(S_File[maxfiles].files,ffblk.ff_name);
S_File[maxfiles].filesize=ffblk.ff_fsize;
S_File[maxfiles].attrs=ffblk.ff_attrib;
if (ffblk.ff_attrib & 16) S_File[maxfiles].filesize=0;
maxfiles++;
}
done = findnext(&ffblk);
if (maxfiles==200) done=!done; //stop to prevent internal crashes.
}
if (maxfiles==0) { //no files to browse
strcpy(S_File[0].files," -- NONE -- ");
S_File[0].filesize=-1;
maxfiles=1;}
strcpy(S_File[200].files," -- NONE -- ");
S_File[200].filesize=-1;
return maxfiles;
}
void PrintWholeScreen_Files(void )
{
int OldFileRow = FileRow ;
char Contador;
setfillstyle( SOLID_FILL, 0 );
bar(252, 187, 374, 327);
PrintSelectRow ( 0 );
for ( FileRow = 0; FileRow < 14; FileRow++ )
if ( ( FileRow + FileCurrTopRow ) < maxfiles )
PrintSelectRow ( 0 );
FileRow = OldFileRow;
}
void PrintSelectRow( char Hide_Show )
{
char Buffer[80];
char Buff1[80];
char Buff2[80];
if ( Hide_Show==0 )
{
setfillstyle( SOLID_FILL, 0 );
bar(252, 188 + ( FileRow * 10 ) , 373, 187 + 10 + ( FileRow * 10 ) );
setcolor( cfgFREC.Texto );
} else {
setfillstyle( SOLID_FILL, cfgFREC.F_Texto );
bar(252, 188 + ( FileRow * 10 ) , 373, 187 + 10 + ( FileRow * 10 ) );
setcolor(0);
}
switch( S_File[FileRow + FileCurrTopRow].attrs )
{
case FA_DIREC:
sprintf(Buffer, "%-13s", S_File[FileRow+FileCurrTopRow].files );
sprintf(Buff1 , " < DIR >" );
break;
case 255:
sprintf(Buffer, "%-8s", strncpy( Buff1, S_File[FileRow+FileCurrTopRow].files, 8) );
sprintf(Buff1 , " >DRIVER<" );
break;
default:
sprintf(Buffer, "%-13s", S_File[FileRow+FileCurrTopRow].files);
// outtextxy( 252 , 187 + ( FileRow * 10 ) , Buffer );
sprintf(Buff1 , " %7lu", S_File[FileRow+FileCurrTopRow].filesize );
break;
}
outtextxy( 252 , 187 + ( FileRow * 10 ) , Buffer );
outtextxy( 252 , 187 + ( FileRow * 10 ) , Buff1 );
}
void FileDownRow(void)
{
// ¨¨ Estoy en la linea fisica 000 ???
if ( (FileRow + FileCurrTopRow) != (maxfiles - 1) ) {
// Linea 0, Baja Con retroceso multiple
if ( FileRow == 13 ) {
FileCurrTopRow += 14;
while ( (FileCurrTopRow + FileRow) > maxfiles ) FileCurrTopRow--;
FileRow = 0;
PrintWholeScreen_Files();
PrintSelectRow( 1 );
} else {
PrintSelectRow( 0 );
FileRow++;
PrintSelectRow( 1 );
}
}
}
void FileUpRow(void)
{
// ¨¨ Estoy en la linea fisica 000 ???
if ( (FileRow + FileCurrTopRow) != 0 ) {
// Linea 0, Baja Con retroceso multiple
if ( FileRow == 0 ) {
FileCurrTopRow -= 14;
if ( FileCurrTopRow < 0 ) FileCurrTopRow = 0;
FileRow = 0;
PrintWholeScreen_Files();
FileRow = 13;
PrintSelectRow( 1 );
} else {
PrintSelectRow( 0 );
FileRow--;
PrintSelectRow( 1 );
}
}
}
/*
void diskerror(void) {
char message[30];
pushscreen();
draw3dboxup(19,10,43,6);
draw3dboxdn(21,11,39,4);
switch (erroroccurred) {
case 1 : strcpy(message,"Write Protected Disk"); break;
case 2 : strcpy(message,"Drive Not Ready"); break;
case 3 : strcpy(message,"Unknown Command"); break;
case 4 : strcpy(message,"Data Error (CRC)"); break;
case 5 : strcpy(message,"Bad Request Structure Length"); break;
case 6 : strcpy(message,"Seek Error"); break;
case 7 : strcpy(message,"Unknown Media Type"); break;
case 8 : strcpy(message,"Sector Not Found"); break;
case 9 : strcpy(message,"Printer Out Of Paper"); break;
case 10: strcpy(message,"Write Fault"); break;
case 11: strcpy(message,"Read Fault"); break;
case 12: strcpy(message,"General Failure"); break;
default: strcpy(message,"Unknown Error");
}
printcentered(12,"Error - Press any key to continue",0x74);
printcentered(13,message,0x70);
getch();
popscreen();
erroroccurred=0;
}
*/
void interrupt critical_error_handler(.../*__CPPARGS*/) {
asm push ax //preserve only modified register
asm mov ax,di //di holds error code ranging from 0 to 0x0c
// asm inc ax
asm mov erroroccurred,ax //increase erroroccurred for ease of programming
asm mov al,0x20
asm out 0x20,al //send interrupt clear flag
// asm pushf // I think I dont need this line in....
asm pop ax //restore ax
}
void startceh() {
old_int24 = _dos_getvect( 0x24 );
_dos_setvect( 0x24, critical_error_handler);
}
void stopceh() {
_dos_setvect(0x24,old_int24);
}
void PrintVisor(void)
{
setfillstyle( SOLID_FILL, 0 );
bar(252, 171, 373, 178);
setcolor( cfgFREC.Texto );
outtextxy(252, 169, strupr(Archivo) );
}
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
int InputCadenaG(char *s, int numalp, int lmax, int cc, int cf, int left, int up, int right, int down)
{
int ls; // longitud cadena
char *s1; // puntero a cadena inicial
int c, ok = 0;
s1 = s; // inicio cadena
ls = strlen ( s ); // Longitud de actual
s += ls; // se coloca en el final
setfillstyle(SOLID_FILL, cf);
do{
bar(left, up, right, down);
setcolor(cc);
outtextxy( left, up-2, s1 );
if ( ls < lmax ) {
setcolor(4);
outtextxy( left+textwidth( s1 ), up-2, "<");
}
switch( c = getch() ) // obtiene tecla
{
case 0:
case 13:
ok = 1; // 13 = INTRO || Especiales
break;
case 8:
if ( ls > 0 ) { // 8 = Back Space
ls--;
s--;
*s = '\0';
}
break;
case 27:
*s='\0';
ok = 1;
break;
default:
if ( !numalp && c >= 32 && c <= 254 && ls < lmax)
{
*s++ = toupper(c);
ls++;
*s = '\0';
} else
if ( numalp && isdigit(c) && ls < lmax) {
*s++ = c;
ls++;
*s = '\0';
}
break;
}
}while(!ok);
ok = 1;
*s = ' ';
while( ok ) {
if(*s==' ') { *s = '\0'; s--;
} else { s++; ok = 0; }
}
*s = '\0';
while(kbhit()) getch(); // Vacia Buffer impidiendo falsas
// pulsaciones...
return ls;
}
+144
View File
@@ -0,0 +1,144 @@
#include <dos.h>
#include <stdio.h>
#include <string.h>
#include <alloc.h>
#include <conio.h>
#include <stdlib.h>
#include <graphics.h>
#include "..\..\libs\make_bot\make_bot.h"
#include "frec.h"
char Optar( char *texto1, char *texto2, char *texto3 );
int Muestra_Mensaje(int Mensaje, char *file);
//void redefine_cursor_raton(int r_e);
extern CFG_FREC cfgFREC;
char Optar( char *texto1, char *texto2, char *texto3 ){
int ok = 0, inst = 0;
struct textsettingstype textinfo;
void *C_Texto, *C_Aceptar, *C_Cancelar;
C_Texto = malloc( JD_imagesize(200, 212, 440, 267) );
C_Aceptar = malloc( JD_imagesize(200, 270, 280, 295) );
C_Cancelar = malloc( JD_imagesize(360, 270, 440, 295) );
if( C_Texto == NULL || C_Aceptar == NULL || C_Cancelar == NULL) {
closegraph();
cprintf("\n\rSALIENDO");
cprintf("\n\rImposible encontrar %ldKbytes en el Heap",
( JD_imagesize(118, 160, 521, 335) +
JD_imagesize(118, 160, 521, 335) +
JD_imagesize(118, 160, 521, 335)
)
);
exit(SIN_MEMORIA);
}
gettextsettings(&textinfo);
settextstyle(SMALL_FONT, HORIZ_DIR, 5 );
// settextjustify(CENTER_TEXT, CENTER_TEXT);
getimage(200, 212, 440, 267, C_Texto);
getimage(200, 270, 280, 295, C_Aceptar);
getimage(360, 270, 440, 295, C_Cancelar);
Imprime_Estaticos(100, "FREC.DAT"); // Imprime botones estaticos 'Seccion 20'
Imprime_Secuencia(3); // Imprime secuencia 4.
Imprime_Estaticos(101, "FREC.DAT"); // Imprime textos estaticos 'Seccion 5'
setcolor( cfgFREC.Texto );
outtextxy( 210+( ( 230 - textwidth(texto1) ) / 2 ), 220, texto1 );
outtextxy( 210+( ( 230 - textwidth(texto2) ) / 2 ), 235, texto2 );
outtextxy( 210+( ( 230 - textwidth(texto3) ) / 2 ), 250, texto3 );
while(!ok){ // Bucle infinito
switch( Comprueba_Secuencia( 3, NULL ) ) { // Iniciamos comprobacion de 2¦ sec
case 0: // No se pulso ningun BOTON
// Pero el raton fue presionado en
// algun sitio...
break;
case -2: // Hay una tecla normal en BUFFER
switch( getch() ) { // La utilizamos
// ESC ( CANCELAR )
case 14:
inst = 0;
ok = 1;
break;
default:
break;
}
break;
case -1: // Hay una tecla especial en BUFFER
getch(); // La eliminamos
break;
// Boton Aceptar
case 1:
inst = 1;
ok = 1;
break;
// Boton Cancelar
case 2:
inst = 0;
ok = 1;
break;
default:
while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER
break;
}
}
putimage(200, 212, C_Texto, COPY_PUT);
putimage(200, 270, C_Aceptar, COPY_PUT);
putimage(360, 270, C_Cancelar, COPY_PUT);
free ( C_Texto );
free ( C_Aceptar );
free ( C_Cancelar );
settextstyle(textinfo.font, textinfo.direction, textinfo.charsize );
settextjustify(textinfo.horiz, textinfo.vert);
return inst;
}
int Muestra_Mensaje(int Mensaje, char *file) {
void *Imagen;
if ( (Imagen = malloc( JD_imagesize(200, 212, 440, 267) ) ) == NULL ) {
Espera_TeclaRaton();
Anclar_Raton();
return -1;
} else {
getimage( 200, 212, 440, 267, Imagen );
Imprime_Estaticos( Mensaje, file);
// Fichero_bot( Mensaje );
Espera_TeclaRaton();
Anclar_Raton();
putimage( 200, 212, Imagen, COPY_PUT);
free(Imagen);
return 1;
}
}
+715
View File
@@ -0,0 +1,715 @@
#include <graphics.h>
#include <stdio.h>
#include <math.h>
#include "dibujos.h"
#define _FREC_F_H
#include "FREC_F.h"
#undef _FREC_F_H
#include "FREC.h"
int SaltosMatrixX = 10, // Saltos en la Matrix X
SaltosMatrixY = 10; // Saltos en la Matrix Y
int IncrementoMarca = 2; // Incrementos en el despl. de marcas
long MRK_begin=20, MRK_end=50, // Marcas de comienzo y final originales
oldMRK_begin = MRK_begin, // >>>>>>>>>>>>>>>>>>>>>>>>>>>
oldMRK_end = MRK_end; // >>> marcas de arrastre >>>
char GenOsc = GENERADOR, // determina para quien son los controles
GenOscf[2] = { OFF, OFF }; // quien est  funcionando ahora
int Desplazamiento = 0, // Desplazamiento virtual de la onda
mAnchoMarco = 125; // Ancho a mostrar ( reducido )
long oDesde = 0, // Inicio de la onda a mostrar
oHasta = (mAnchoMarco*5); // Fin de la onda a mostrar
int oAncho = oAnchoVentana, // Ancho de la ventana de visualizaci¢n
oAlto = oAltoVentana; // Alto de la ventana de vizualizaci¢n
// Cero de la onda Generada
int ceroOGenerada = ( oAltoVentana / 2 ) + 2;
char Tonda = -1; // Tipo de onda a tratar
int Dispersion = 1; // Dispercion entre puntos
/***************************************************************************\
|* *|
|* SeleccionaControles *|
|* *|
|* Descripci¢n: *|
|* Selecciona para quien trabajaran casi todos los controles *|
|* para el generador o el osciloscopio. *|
|* *|
|* Entradas: (ninguna) *|
|* Salidas: (ninguna) *|
|* *|
\***************************************************************************/
void SeleccionaControles(void)
{
// Borramos la zona de funcion
setfillstyle( SOLID_FILL, EGA_LIGHTGRAY );
bar( 318, 3, 337, 21 );
if ( GenOsc == GENERADOR )
{
GenOsc = OSCILOSCOPIO;
ponicono( 319, 3, flecha, 1 ); // Flecha dentro
// Led Off / On
if ( GenOscf[OSCILOSCOPIO] == OFF )
ponicono( 245, 7, led_off, 1 );
else
ponicono( 245, 7, led_on, 1 );
} else {
GenOsc = GENERADOR;
ponicono( 319, 3, flecha, 3 ); // Flecha fuera
// Led Off / On
if ( GenOscf[GENERADOR] == OFF )
ponicono( 245, 7, led_off, 1 );
else
ponicono( 245, 7, led_on, 1 );
}
}
/***************************************************************************\
|* *|
|* EnviaRecibe *|
|* *|
|* Descripci¢n: *|
|* Activa/Desactiva la funci¢n de enviar/recibir onda. *|
|* ( seg£n este seleccionado osciloscopio/generador ) *|
|* *|
|* Entradas: (ninguna) *|
|* Salidas: (ninguna) *|
|* *|
\***************************************************************************/
void EnviaRecibe(void)
{
// Enviar/Recibir onda SI / NO
GenOscf[ GenOsc ] = !GenOscf[ GenOsc ];
if ( GenOscf[ GenOsc ] == OFF )
ponicono( 245, 7, led_off, 1 );
else
ponicono( 245, 7, led_on, 1 );
}
/***************************************************************************\
|* *|
|* DesplazaMarca *|
|* *|
|* Descripci¢n: *|
|* Realiza la funci¢n de dezplazamiento de la marca, con *|
|* los cursores, y selecci¢n de toda la onda. *|
|* *|
|* Entradas: *|
|* Incremento en el desplazamiento (puede se negativo) *|
|* Marca a desplazar: INICIO, FIN, TODO (marca toda la onda) *|
|* *|
|* Salidas: (ninguna) *|
|* *|
\***************************************************************************/
void DesplazaMarca( char IncrementoMarca, char InicioFin )
{
if ( InicioFin == INICIO )
{
if ( IncrementoMarca > 0 )
{
MRK_begin += IncrementoMarca;
while ( MRK_begin > MRK_end ) MRK_begin--;
if ( MRK_begin > (oAnchoVentana * oVentanas) )
MRK_begin = (oAnchoVentana * oVentanas);
Dibuja_OndaSeleccionada( !PINTA );
} else
if ( IncrementoMarca < 0 )
{
MRK_begin += IncrementoMarca;
if ( MRK_begin < 0 )
MRK_begin = 0;
Dibuja_OndaSeleccionada( !PINTA );
}
} else if ( InicioFin == FIN )
{
if ( IncrementoMarca > 0 )
{
MRK_end +=IncrementoMarca;
if ( MRK_end > (oAnchoVentana * oVentanas) )
MRK_end = (oAnchoVentana * oVentanas);
Dibuja_OndaSeleccionada( !PINTA );
} else
if ( IncrementoMarca < 0 )
{
MRK_end +=IncrementoMarca;
while ( MRK_end < MRK_begin ) MRK_end ++;
if ( MRK_end < 0 )
MRK_end = 0;
Dibuja_OndaSeleccionada( !PINTA );
}
} else {
Dibuja_OndaSeleccionada(PINTA);
MRK_begin = 0;
MRK_end = oAnchoVentana * oVentanas;
Dibuja_OndaSeleccionada(PINTA);
}
}
/***************************************************************************\
|* *|
|* Dibuja_OndaSeleccionada *|
|* *|
|* Descripci¢n: *|
|* Dibuja la onda seleccionada. *|
|* *|
|* Entradas: *|
|* PINTA Redibuja la selecci¢n completa. *|
|* !PINTA Solo dibuja lo que ha cambiado. *|
|* *|
|* Salidas: (ninguna) *|
|* *|
\***************************************************************************/
void Dibuja_OndaSeleccionada( char QueHago )
{
float xActual;
int xReal, yReal;
float ReduccionX;//, ReduccionYmini;
static float oldHasta, oldDesde;
//static long OldDesplazamiento;
static char PintaBorra = PINTA;
char tmp, buffer[80];
if ( QueHago != PINTA )
{
tmp = PintaBorra;
PintaBorra = PINTA;
}
// Calculamos el factor de reducci¢n para el ancho de la ventana
if ( PintaBorra == PINTA )
ReduccionX = (float)(oHasta - oDesde) / (float)oAnchoVentana;
else
ReduccionX = (float)( oldHasta - oldDesde ) / (float)oAnchoVentana;
// ReduccionYmini = (float) oAlto / (float)oAltoVentana;
setwritemode( XOR_PUT );
setcolor( cfgFREC.oSelect );
for ( xActual = (PintaBorra == PINTA ? (oDesde + 5 * Desplazamiento ) : oldDesde ), xReal = 0; xReal < oAnchoVentana; xActual += ReduccionX, xReal ++ )
if ( QueHago == PINTA )
{
if ( xActual >= (PintaBorra == PINTA ? MRK_begin : oldMRK_begin ) && xActual <= (PintaBorra == PINTA ? MRK_end : oldMRK_end) )
line ( xReal + inicioMGx, inicioMGy + SaltosMatrixY, xReal + inicioMGx, inicioMGy+oAltoVentana - SaltosMatrixY );
} else {
// Dibuja solo lo necesario de la onda marcada...
if (
( xActual >= oldMRK_begin && xActual < MRK_begin ) ||
( xActual < oldMRK_begin && xActual >= MRK_begin ) ||
( xActual > oldMRK_end && xActual <= MRK_end ) ||
( xActual <= oldMRK_end && xActual > MRK_end )
)
line ( xReal + inicioMGx, inicioMGy + SaltosMatrixY, xReal + inicioMGx, inicioMGy+oAltoVentana - SaltosMatrixY );
}
setwritemode( COPY_PUT );
if ( PintaBorra == PINTA )
{
oldHasta = oHasta + 5*Desplazamiento;
oldDesde = oDesde + 5*Desplazamiento;
oldMRK_begin = MRK_begin;
oldMRK_end = MRK_end;
PintaBorra = BORRA;
} else PintaBorra = PINTA;
if ( QueHago != PINTA )
{
PintaBorra = tmp;
sprintf( buffer, "Selct: %05ld", ( MRK_end-MRK_begin ) );
Fuente_Amplia( buffer, &Letras );
}
};
/***************************************************************************\
|* *|
|* DesplazaOnda *|
|* *|
|* Descripci¢n: *|
|* Mueve la onda en cualquier direcci¢n o la centra vertic. *|
|* *|
|* Entradas: *|
|* Lugar a donde ser  movida. ARRIBA, ABAJO, IZQUIERDA *|
|* DERECHA, CENTRAR. *|
|* *|
|* Salidas: (ninguna) *|
|* *|
\***************************************************************************/
void DesplazaOnda( char Lugar )
{
int oldCero = ceroOGenerada, xM;
float xActual;
int xReal;
float ReduccionX, ReduccionYmini;
switch( Lugar )
{
case DERECHA:
// Limpiamos la zona antigua
setwritemode( XOR_PUT );
setcolor( cfgFREC.mMarco );
rectangle( 8 + Desplazamiento, inicioMmGy, 8 + mAnchoMarco + Desplazamiento, inicioMmGy + mAltoCuadro );
Desplazamiento += 5; if ( ( mAnchoMarco + Desplazamiento ) > oAnchoVentana ) Desplazamiento = oAnchoVentana - mAnchoMarco;
rectangle( 8 + Desplazamiento, inicioMmGy, 8 + mAnchoMarco + Desplazamiento, inicioMmGy + mAltoCuadro );
setwritemode( COPY_PUT );
// Tras desplazar redibujamos la onda
DibujaOnda(oDesde + 5 * Desplazamiento, oHasta + 5 * Desplazamiento, oAnchoVentana, oAltoVentana, GRANDEo );
break;
case IZQUIERDA:
// Limpiamos la zona antigua
setwritemode( XOR_PUT );
setcolor( cfgFREC.mMarco );
rectangle( 8 + Desplazamiento, inicioMmGy, 8 + mAnchoMarco + Desplazamiento, inicioMmGy + mAltoCuadro );
Desplazamiento -= 5; if ( Desplazamiento < 0 ) Desplazamiento = 0;
rectangle( 8 + Desplazamiento, inicioMmGy, 8 + mAnchoMarco + Desplazamiento, inicioMmGy + mAltoCuadro );
setwritemode( COPY_PUT );
// Tras desplazar redibujamos la onda
DibujaOnda(oDesde + 5 * Desplazamiento, oHasta + 5 * Desplazamiento, oAnchoVentana, oAltoVentana, GRANDEo );
break;
case ARRIBA:
case ABAJO:
case CENTRAR:
// Tras desplazar redibujamos la onda
// Con una nueva funcion que tenga en cuenta la nueva funci¢n.
switch( Lugar )
{
case ARRIBA: ceroOGenerada -= 5; break;
case CENTRAR: ceroOGenerada = ( oAltoVentana / 2 ) + 2; break;
case ABAJO: ceroOGenerada += 5; break;
}
// Calculamos el factor de reducci¢n para el ancho de la ventana
ReduccionX = (float)( oHasta - oDesde ) / (float)oAnchoVentana;
for ( xActual = oDesde + 5 * Desplazamiento, xReal = 0; xReal < oAnchoVentana; xActual += ReduccionX, xReal ++ )
{
if ( oOndaGenerada[xReal] >= inicioMGy && oOndaGenerada[xReal] <= inicioMGy + oAltoVentana )
// Si vez es cero no restauramos el viejo contenido, ya que no existe
putpixel( xReal + inicioMGx, oOndaGenerada[xReal], cOndaGenerada[xReal] );
// Borramos la linea del cero antigua
if ( ( inicioMGy+oldCero ) >= inicioMGy && ( inicioMGy + oldCero ) <= ( inicioMGy + oAltoVentana) )
if ( oldCero % SaltosMatrixY )
putpixel( xReal + inicioMGx, oldCero + inicioMGy, EGA_BLACK );
else
putpixel( inicioMGx + xReal, inicioMGy + oldCero, ( ( xReal % SaltosMatrixX ) ? EGA_BLACK : cfgFREC.gMatrix ));
// Colocamos la nueva
if ( ( inicioMGy+ceroOGenerada ) >= inicioMGy && ( inicioMGy + ceroOGenerada ) <= ( inicioMGy + oAltoVentana) )
if ( ceroOGenerada % SaltosMatrixY )
putpixel( xReal + inicioMGx, ceroOGenerada + inicioMGy, cfgFREC.gMatrix );
else
putpixel( xReal + inicioMGx, ceroOGenerada + inicioMGy, ( ( xReal % SaltosMatrixX ) ? cfgFREC.gMatrix : EGA_BLACK ));
oOndaGenerada[xReal] = OndaGenerada[(int)xActual] + ceroOGenerada + inicioMGy;
if ( oOndaGenerada[xReal] >= inicioMGy && oOndaGenerada[xReal] <= ( inicioMGy + oAltoVentana ) )
{
cOndaGenerada[xReal] = (char)getpixel( xReal + inicioMGx, oOndaGenerada[xReal] );
putpixel( xReal + inicioMGx, oOndaGenerada[xReal], cfgFREC.gOnda );
}
} // BUCLE FOR
// DibujaOnda(oDesde + 5 * Desplazamiento, oHasta + 5 * Desplazamiento, oAnchoVentana, oAltoVentana, GRANDEo );
Redibuja_MiniOnda();
break;
}
}
/***************************************************************************\
|* *|
|* ReajusteTierra *|
|* *|
|* Descripci¢n: *|
|* Ajusta el nivel de continua *|
|* *|
|* Entradas: *|
|* Ajuste hacia ARRIBA - ABAJO *|
|* *|
|* Salidas: (ninguna) *|
|* *|
\***************************************************************************/
void ReajusteTierra( char aDonde )
{
int x;
for ( x = 0; x < (oAnchoVentana * oVentanas); x++ )
if ( aDonde == ARRIBA)
OndaGenerada[ x ] --;
else
if ( aDonde == ABAJO )
OndaGenerada[ x ] ++;
DibujaOnda(oDesde + 5 * Desplazamiento, oHasta + 5 * Desplazamiento, oAnchoVentana, oAltoVentana, GRANDEo );
Redibuja_MiniOnda();
};
/***************************************************************************\
|* *|
|* DibujaOnda *|
|* *|
|* Descripci¢n: *|
|* Dibuja la onda, teniendo encuenta lo que hay detras *|
|* *|
|* Entradas: *|
|* Origen de la onda *|
|* Final de la onda *|
|* Ancho de la ventana *|
|* Alto de la ventana *|
|* Tipo de Onda ( GRANDE / REDUCIDA ) *|
|* *|
|* *|
|* Salidas: (ninguna) *|
|* *|
\***************************************************************************/
void DibujaOnda( int Desde, int Hasta, int Ancho, int Alto, char GrandeMini )
{
static char vez1 = 0;
static char vez2 = 0;
float xActual;
int xReal, yReal;
float ReduccionX, ReduccionYmini;
// Si esta activada la funci¢n de selecci¢n...
// Borramos la marca
if ( statusBoton == 17 && GrandeMini == GRANDEo )
Dibuja_OndaSeleccionada(PINTA);
// Calculamos el factor de reducci¢n para el ancho de la ventana
ReduccionX = (float)( Hasta - Desde ) / (float)oAnchoVentana;
ReduccionYmini = (float) Alto / (float)oAltoVentana;
for ( xActual = Desde, xReal = 0; xReal < Ancho; xActual += ReduccionX, xReal ++ )
{
if ( GrandeMini == GRANDEo )
{
if ( oOndaGenerada[xReal] >= inicioMGy
&& oOndaGenerada[xReal] <= inicioMGy + oAltoVentana
// Si vez es cero no restauramos el viejo contenido, ya que no existe
&& ( vez1 != 0 ) )
putpixel( xReal + inicioMGx, oOndaGenerada[xReal], cOndaGenerada[xReal] );
else vez1 = 1;
oOndaGenerada[xReal] = OndaGenerada[(int)xActual] + ceroOGenerada + inicioMGy;
if ( oOndaGenerada[xReal] >= inicioMGy
&& oOndaGenerada[xReal] <= ( inicioMGy + oAltoVentana ) )
{
cOndaGenerada[xReal] = (char)getpixel( xReal + inicioMGx, oOndaGenerada[xReal] );
putpixel( xReal + inicioMGx, oOndaGenerada[xReal], cfgFREC.gOnda );
}
} else {
if ( mOndaGenerada[xReal] >= inicioMmGy
&& mOndaGenerada[xReal] <= ( inicioMmGy + mAltoCuadro )
// Si vez es cero no restauramos el viejo contenido, ya que no existe
&& ( vez2 != 0 ) )
putpixel( xReal + inicioMGx, mOndaGenerada[xReal], cfgFREC.mFondo );
else vez2 = 1;
mOndaGenerada[xReal] = (int)( ( OndaGenerada[(int)xActual] + ceroOGenerada ) * ReduccionYmini + inicioMmGy );
if ( mOndaGenerada[xReal] >= inicioMmGy
&& mOndaGenerada[xReal] <= ( inicioMmGy + mAltoCuadro ) )
putpixel( xReal + inicioMGx, mOndaGenerada[xReal], cfgFREC.mOnda );
} // SI GrandeMini
} // BUCLE FOR
// Redibujamos la marca
if ( statusBoton == 17 && GrandeMini == GRANDEo )
Dibuja_OndaSeleccionada(PINTA);
}
/***************************************************************************\
|* *|
|* Redibuja_MiniOnda *|
|* *|
|* Descripci¢n: *|
|* Dibuja la minionda, teniendo en cuenta no machacar el *|
|* cuadro de desplazamiento *|
|* *|
|* Entradas: (ninguna) *|
|* *|
|* Salidas: (ninguna) *|
|* *|
\***************************************************************************/
void Redibuja_MiniOnda(void)
{
// Cuadro onda visible
setcolor( cfgFREC.mMarco ); setwritemode( XOR_PUT );
rectangle( 8 + Desplazamiento, inicioMmGy, 8 + mAnchoMarco + Desplazamiento, inicioMmGy + mAltoCuadro );
setwritemode( COPY_PUT );
DibujaOnda( 0, oFinalOnda, oAnchoVentana, mAltoCuadro, MINIo );
// Cuadro onda visible
setcolor( cfgFREC.mMarco ); setwritemode( XOR_PUT );
rectangle( 8 + Desplazamiento, inicioMmGy, 8 + mAnchoMarco + Desplazamiento, inicioMmGy + mAltoCuadro );
setwritemode( COPY_PUT );
}
/***************************************************************************\
|* *|
|* ReajustaTipoOnda *|
|* *|
|* Descripci¢n: *|
|* Inicia la creaci¢n/tratamiento de un tipo de onda *|
|* ya predefinido... *|
|* *|
|* Entradas: *|
|* PorDonde_ Punto de la onda a retocar, (amplitud-periodo) *|
|* (indirectamente recibe tambien el tipo de onda predefinida) *|
|* *|
|* Salidas: (ninguna) *|
|* *|
\***************************************************************************/
void ReajustaTipoOnda( int PorDonde )
{
float xReal, xVirtual, xAux;
float xVirtual2;
static int count = 0, Tampl = 50;
static float Tperd = 0.05;
switch( Tonda )
{
case -1:
switch( PorDonde )
{
case ARRIBA:
case ABAJO:
for ( xReal = MRK_begin; xReal <= MRK_end; xReal++ )
{
if ( PorDonde == ARRIBA )
{
OndaGenerada[ xReal ] *= 2;
OndaGenerada[ xReal ] ++;
} else {
OndaGenerada[ xReal ] --;
OndaGenerada[ xReal ] /= 2;
}
}
count = 0;
break;
case IZQUIERDA:
for ( xReal = xVirtual = MRK_begin; xReal <= MRK_end && xVirtual <= MRK_end; xReal++, xVirtual += IncrementoMarca )
OndaGenerada[ xReal ] = OndaGenerada[ xVirtual ];
if ( xReal != MRK_end )
for ( xReal, xVirtual = MRK_begin; xReal <= MRK_end; xReal++, xVirtual++ )
OndaGenerada[ xReal ] = OndaGenerada[ xVirtual ];
count = 0;
break;
case DERECHA:
for ( xReal = MRK_end; xReal >= MRK_begin; xReal-=(IncrementoMarca+count) )
for ( xVirtual = (IncrementoMarca+count); xVirtual > 0 && (xReal-xVirtual+1)>=MRK_begin; xVirtual-- )
OndaGenerada[ xReal - xVirtual + 1 ] = OndaGenerada[ xReal ];
count = (count++) % 32;
break;
}
break;
case 2:
switch( PorDonde )
{
case ARRIBA:
case ABAJO:
Tampl += (PorDonde == ARRIBA) ? 1 : -1;
break;
case IZQUIERDA:
case DERECHA:
Tperd += (PorDonde == IZQUIERDA) ? 0.01 : -0.01;
break;
case CENTRAR:
Tampl = 50;
Tperd = 0.05;
break;
}
for ( xReal = MRK_begin; xReal <= MRK_end; xReal++ )
OndaGenerada[ xReal ] = (int)(sin( xReal * Tperd ) * Tampl);
break;
case 3:
switch( PorDonde )
{
case ARRIBA:
case ABAJO:
Tampl += (PorDonde == ARRIBA) ? 1 : -1;
break;
case IZQUIERDA:
case DERECHA:
if ( Tperd <= 1 )
Tperd += (PorDonde == IZQUIERDA) ? -0.1 : 0.1;
else
Tperd += (PorDonde == IZQUIERDA) ? -1 : 1;
if ( Tperd <= 0.1 ) Tperd = 0.1;
break;
case CENTRAR:
Tampl = 50;
Tperd = 0.5;
break;
}
count = 0;
for ( xReal = MRK_begin; xReal <= MRK_end; )
{
count = !count;
if ( Tperd >= 1 )
for ( xVirtual= ( !count ? (-1) : 1 ) * ( Tampl / 2 ); xReal <= MRK_end && (xVirtual*( !count ? (1) : (-1) )) < (Tampl/2) ; xVirtual += ( !count ? 1 : (-1) ) * Dispersion )
for ( xAux = Tperd; xReal <= MRK_end && xAux>=0; xReal++, xAux-- )
OndaGenerada[ xReal ] = (int)xVirtual;
else
for ( xVirtual= ( !count ? (-1) : 1 ) * ( Tampl / 2 ); xReal <= MRK_end && (xVirtual*( !count ? (1) : (-1) )) < (Tampl/2) ; xReal+=Tperd, xVirtual += ( !count ? 1 : (-1) ) * Dispersion )
OndaGenerada[ xReal ] = (int)xVirtual;
}
break;
case 1:
case 4:
switch( PorDonde )
{
case ARRIBA:
case ABAJO:
Tampl += (PorDonde == ARRIBA) ? 1 : -1;
break;
case IZQUIERDA:
case DERECHA:
Tperd += (PorDonde == IZQUIERDA) ? -1 : 1;
if ( Tperd <= 0 ) Tperd = 1;
break;
case CENTRAR:
Tampl = 50;
Tperd = 50;
break;
}
count = 0;
for ( xReal = MRK_begin; xReal <= MRK_end; )
{
count = !count;
// Pinto la linea Continua 'Positiva'
for ( xVirtual = 0; xReal <= MRK_end && xVirtual <= Tperd; xReal++, xVirtual++ )
OndaGenerada[ xReal ] = ( !count ? (-1) : 1 ) * ( Tampl / 2 );
if( Tonda == 4 )
for ( xVirtual= ( !count ? (-1) : 1 ) * ( Tampl / 2 ); xReal <= MRK_end && (xVirtual*( !count ? (1) : (-1) )) < (Tampl/2) ; xReal++, xVirtual += ( !count ? 1 : (-1) ) * Dispersion)
OndaGenerada[ xReal ] = xVirtual;
}
break;
case 6:
case 7:
case 8:
case 9:
switch( PorDonde )
{
case ARRIBA:
case ABAJO:
Tampl += (PorDonde == ARRIBA) ? 1 : -1;
break;
case IZQUIERDA:
case DERECHA:
Tperd += (PorDonde == IZQUIERDA) ? 0.0005 : -0.0005;
if ( Tperd < 0.0005 ) Tperd = 0.0005;
break;
case CENTRAR:
Tampl = 50;
Tperd = 0.05;
break;
}
count = Tonda==6 ? 0 : -1;
for ( xReal = MRK_begin; xReal <= MRK_end; )
{
xVirtual = 0;
while ( xVirtual*Tperd < ( ( (Tonda==6) || (Tonda==8) )?(M_PI):(M_PI+.5*M_PI)) ) xVirtual++;
for ( ; (xVirtual*Tperd) < (( (Tonda==6) || (Tonda==8) )?(M_PI+0.5*M_PI):(M_PI*2)) && xReal <= MRK_end; xVirtual++, xReal++ )
OndaGenerada[ xReal ] = (int)( sin(xVirtual*Tperd)*Tampl ) + (Tampl/2);
if ( Tonda != 8 && Tonda != 9 )
for ( xVirtual= ( !count ? (-1) : 1 ) * ( Tampl/2 ); xReal <= MRK_end && (xVirtual*( !count ? (1) : (-1) )) < (Tampl/2) ; xReal++, xVirtual += ( !count ? 1 : (-1) ) * Dispersion)
OndaGenerada[ xReal ] = xVirtual;
}
break;
}
DibujaOnda(oDesde + 5 * Desplazamiento, oHasta + 5 * Desplazamiento, oAnchoVentana, oAltoVentana, GRANDEo );
}
/***************************************************************************\
|* *|
|* Retoca_Punto *|
|* *|
|* Descripci¢n: *|
|* Retoca el punto dado como par metro con el consiguiente *|
|* arrastre de puntos adyacentes, hasta que los adyacentes *|
|* disten del punto anterior, como m ximo, disperici¢n / 2 *|
|* *|
|* *|
|* Entradas: Punto del periodo a retocar Px *|
|* Punto de la amplitud a '' Ay *|
|* *|
|* Salidas: (ninguna) *|
|* *|
\***************************************************************************/
void Retoca_Punto( int Px, int Ay )
{
int old_Px; // Variables guia de la onda
char inc; // Infome sobre el incremento de la onda ( ASCENDENTE / DESCENDENTE )
old_Px = Px;
OndaGenerada[Px] = Ay; // Ajustamos el nuevo valor de un punto ( usr des )
// 1§ Acerco por la derecha del punto a retocar
while ( abs( OndaGenerada[old_Px+1] - OndaGenerada[old_Px] ) > Dispersion && old_Px < oAnchoVentana*oVentanas )
{
if ( OndaGenerada[old_Px+1] > OndaGenerada[old_Px] ) inc = -1; else inc = 1;
while ( abs( OndaGenerada[old_Px+1] - OndaGenerada[old_Px] ) > Dispersion )
OndaGenerada[old_Px+1] += inc;
old_Px ++;
};
old_Px = Px;
// 2§ Acerco por la izquierda del punto a retocar
while ( abs( OndaGenerada[old_Px] - OndaGenerada[old_Px-1] ) > Dispersion && old_Px > 0 )
{
if ( OndaGenerada[old_Px] > OndaGenerada[old_Px-1] ) inc = 1; else inc = -1;
while ( abs( OndaGenerada[old_Px] - OndaGenerada[old_Px-1] ) > Dispersion )
OndaGenerada[old_Px-1] += inc;
old_Px --;
};
DibujaOnda(oDesde + 5 * Desplazamiento, oHasta + 5 * Desplazamiento, oAnchoVentana, oAltoVentana, GRANDEo );
}
+75
View File
@@ -0,0 +1,75 @@
#define MODULO extern
#if defined (_FREC_F_H)
#undef MODULO
#define MODULO
#endif
#define GENERADOR 1 // selecciona el GENERADOR
#define OSCILOSCOPIO 0 // selecciona el OSCILOSCOPIO
#define ON 1 // activado
#define OFF 0 // desactivado
#define INICIO -1 // Seleccion de marca Inicio
#define TODO 0 // TODA
#define FIN 1 // Fin
#define IZQUIERDA 3 // Desplazamientos Arriba
#define DERECHA 4 // Desplazamientos Arriba
#define ARRIBA 0 // Desplazamientos Arriba
#define CENTRAR 1 // Centrar
#define ABAJO 2 // Abajo
#define PINTA -125 // Pinta
#define BORRA -126 // Borra
extern int SaltosMatrixX, // Saltos en la Matrix X
SaltosMatrixY; // Saltos en la Matrix Y
extern long MRK_begin, MRK_end, // Marcas de comienzo y final originales
oldMRK_begin, // >>>>>>>>>>>>>>>>>>>>>>>>>>>
oldMRK_end; // >>> marcas de arrastre >>>
extern char GenOsc, // para quien son los controles
GenOscf[2]; // quien est  funcionando ahora
extern int IncrementoMarca; // incremento al desplazar la marca
// Variables para la onda GENERADA
MODULO int *OndaGenerada; // OndaGrande ( Puntero a la onda completa )
MODULO int *oOndaGenerada; // Fondo de la Onda GRANDEo y MINIo
MODULO char *cOndaGenerada; // Fondo Mini Onda
MODULO int *mOndaGenerada; // Fondo de la Onda GRANDEo y MINIo
extern long oDesde, // Inicio de la onda a mostrar
oHasta; // Fin de la onda a mostrar
extern int oAncho, // Ancho de la ventana de visualizaci¢n
oAlto; // Alto de la ventana de vizualizaci¢n
extern int ceroOGenerada; // Cero de la onda Generada
extern int Desplazamiento, // Desplazamiento virtual de la onda
mAnchoMarco; // Ancho a mostrar ( reducido )
extern char Tonda; // Tipo de onda a tratar
extern int Dispersion; // Dispercion entre puntos
void EnviaRecibe( void );
void Redibuja_MiniOnda( void );
void DesplazaOnda( char Lugar );
void SeleccionaControles( void );
void ReajusteTierra( char aDonde );
void Retoca_Punto( int Px, int Ax );
void ReajustaTipoOnda( int PorDonde );
void Dibuja_OndaSeleccionada( char QueHago );
void DesplazaMarca( char IncrementoMarca, char InicioFin );
void DibujaOnda( int Desde, int Hasta, int Ancho, int Alto, char GrandeMini );
+223
View File
@@ -0,0 +1,223 @@
#include <dos.h>
#include <dir.h>
#include <math.h>
#include <conio.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <alloc.h>
#include <graphics.h>
#include "..\..\libs\make_bot\make_bot.h"
#include "frec.h"
#include "dibujos.h"
#include "frec_f.h"
extern CFG_FREC cfgFREC;
extern int Dispersion; // En el juego la dispersi¢n es la velocidad
extern int Sensibilidad; // Para sensibilidad > 1, dos jugadores.....
typedef struct
{
int *x;
int *y;
char direccion;
char vidas;
} JUGADORES;
JUGADORES J1;// = { 40, ( oAltoVentana / 2 ) + 2 + 135, 6, 3 };
JUGADORES J2;// = { 600, ( oAltoVentana / 2 ) + 2 + 135, 4, 3 };
void LimpiaTablero(void);
int MoverJugador( JUGADORES *Jug, int color );
void AnalizaTeclas( JUGADORES *J1, JUGADORES *J2 );
int numero;
void JuegoTRON(void)
{
int muertes = 0;
char Buffer[80];
// Asignamos memoria para las lineas
if ( ( J1.x = (int *)malloc( 1502*sizeof( int ) ) ) == NULL ) return;
if ( ( J1.y = (int *)malloc( 1502*sizeof( int ) ) ) == NULL ) return;
if ( ( J2.x = (int *)malloc( 1502*sizeof( int ) ) ) == NULL ) return;
if ( ( J2.y = (int *)malloc( 1502*sizeof( int ) ) ) == NULL ) return;
LimpiaTablero();
/**************************************************************************/
setcolor( 13 );
rectangle( 9, 134, 626, 275 );
/**************************************************************************/
numero = 1500;
J1.x[numero] = 40; J2.x[numero] = 600;
J1.y[numero] = J2.y[numero] = ( oAltoVentana / 2 ) + 2 + 135;
J1.direccion = 6; J2.direccion = 4;
J1.vidas = J2.vidas = 3;
sprintf( Buffer, "Puntos: %d - %d", J1.vidas, J2.vidas );
Fuente_Amplia( Buffer, &Letras );
// Comienza el juego mientras a alguno le quede alguna vida
while( J1.vidas > 0 && J2.vidas > 0 )
{
numero--;
if ( numero < 0 )
{
J1.x[1501] = J1.x[numero+1];
J1.y[1501] = J1.y[numero+1];
J2.x[1501] = J2.x[numero+1];
J2.y[1501] = J2.y[numero+1];
for ( numero = 0; numero < 1500; numero++ )
{
putpixel( J1.x[numero], J1.y[numero], EGA_BLACK );
putpixel( J2.x[numero], J2.y[numero], EGA_BLACK );
}
numero = 1500;
fflush(stdin);
}
Numero_Digital( numero, &Numeros );
AnalizaTeclas( &J1, &J2 );
// Movemos al 1er Jugador
if ( MoverJugador( &J1, cfgFREC.gOnda ) ) { J1.vidas--; muertes = 1; }
// Movemos al 2¦ Jugador
if ( MoverJugador( &J2, cfgFREC.mFondo ) ) { J2.vidas--; muertes = 1; }
if ( muertes != 0 )
{
muertes = 0;
for ( ; numero <= 1500; numero++ )
{
putpixel( J1.x[numero], J1.y[numero], EGA_BLACK );
putpixel( J2.x[numero], J2.y[numero], EGA_BLACK );
}
numero = 1500;
J1.x[numero] = 40; J2.x[numero] = 600;
J1.y[numero] = J2.y[numero] = ( oAltoVentana / 2 ) + 2 + 135;
J1.direccion = 6; J2.direccion = 4;
// Inicializamos el tablero
LimpiaTablero();
sprintf( Buffer, "Puntos: %d - %d", J1.vidas, J2.vidas );
Fuente_Amplia( Buffer, &Letras );
fflush(stdin);
}
delay( Dispersion * 2 );
};
free( J1.x );
free( J1.y );
free( J2.x );
free( J2.y );
bar( 9, 134, 626, 275 );
LimpiaTablero();
DesplazaOnda( CENTRAR );
}
int MoverJugador( JUGADORES *Jug, int color )
{
int Estado = 0; // 0 VIVO 1 MUERTO
// Imprimimos 1pixel de cola para el jugador
putpixel( Jug -> x[numero+1], Jug -> y[numero+1], color );
// Movemos al jugador
switch( Jug -> direccion )
{
case 8:
Jug -> y[numero] = Jug -> y[numero+1] - 1;
Jug -> x[numero] = Jug -> x[numero+1] ;
break;
case 2:
Jug -> y[numero] = Jug -> y[numero+1] + 1;
Jug -> x[numero] = Jug -> x[numero+1] ;
break;
case 4:
Jug -> x[numero] = Jug -> x[numero+1] - 1;
Jug -> y[numero] = Jug -> y[numero+1] ;
break;
case 6:
Jug -> x[numero] = Jug -> x[numero+1] + 1;
Jug -> y[numero] = Jug -> y[numero+1] ;
break;
}
// Miramos si esta fuera de los limites para matarlo
if ( Jug -> x[numero] < 10 || Jug -> x[numero] > 625 || Jug -> y[numero] < 135 || Jug -> y[numero] > 274 )
return 1;
// Miramos si ha chocado con sigo mismo o con el compa¤ero
color = getpixel( Jug -> x[numero], Jug -> y[numero] );
if ( color == cfgFREC.gOnda || color == cfgFREC.mFondo )
return 1;
return 0;
}
void LimpiaTablero(void)
{
int yM, xM;
setfillstyle( SOLID_FILL, EGA_BLACK );
setcolor( EGA_BLACK );
bar( 10, 135, 625, 274 );
// Dibujamos matrix, linea del cero
for ( xM = 0; ( xM + inicioMGx ) < ( oAnchoVentana + inicioMGx ); xM += SaltosMatrixX )
for ( yM = 0; ( yM + inicioMGy ) < ( oAltoVentana + inicioMGy ); yM += SaltosMatrixY )
putpixel( xM + inicioMGx, yM + inicioMGy, cfgFREC.gMatrix );
}
void AnalizaTeclas( JUGADORES *J1, JUGADORES *J2 )
{
// vemos si la tecla del BUFFER es para nosotros
if ( kbhit() )
switch( getch() )
{
// Teclas del 1er Jugador
case 'D':
case 'd':
J1 -> direccion = 4;
break;
case 'G':
case 'g':
J1 -> direccion = 6;
break;
case 'R':
case 'r':
J1 -> direccion = 8;
break;
case 'F':
case 'f':
J1 -> direccion = 2;
break;
// Teclas del 2§ Jugador
case 0 :
switch( getch() )
{
case 75:
J2 -> direccion = 4;
break;
case 77:
J2 -> direccion = 6;
break;
case 72:
J2 -> direccion = 8;
break;
case 80:
J2 -> direccion = 2;
break;
}
}
}
+1161
View File
File diff suppressed because it is too large. Load diff
BIN
View File
Binary file not shown.
+2141
View File
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
edit frec.img
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+2130
View File
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
edit frec.img
+9
View File
@@ -0,0 +1,9 @@
#FREC
*11/11/1991*
ToDo: wwtcf?
![screenshot](/FREC.png "Screenshot")