Backup proyecto Joyfe - Borland

This commit is contained in:
2025-06-16 22:54:10 +02:00
commit d61829a1a7
130 changed files with 11881 additions and 0 deletions

50
super/MOUSE.H Normal file
View File

@ -0,0 +1,50 @@
/***************************************************************************
Microsoft Mouse Driver v1.0 for BGI graphics modes
By Erik Kangas
July 1992
v1.5
**************************************************************************/
extern "C" {
int _Cdecl MouseInit(); // Must be called first, sets up env.
void _Cdecl MouseClose(); // Must be called at end, fixes env.
int _Cdecl MHidden(); // Number of layers of hiding
int _Cdecl MActive(); // Is mouse driver present?
void _Cdecl MLeftPressed(); // gets Mspressed for left button
void _Cdecl MRightPressed(); // gets Mspressed for right button
void _Cdecl MLeftReleased(); // gets Msreleased for left button
void _Cdecl MRightReleased(); // gets Msreleased for right button
void _Cdecl MSetXRange(int,int); // set cursor range horiz & vert
void _Cdecl MSetYRange(int,int); // does not range check the values!
void _Cdecl MSetPos(int,int); // set cursor pixel position
void _Cdecl MGetStatus(); // Set button status and cur. position
void _Cdecl MHideCursor(); // don't display cursor
void _Cdecl MShowCursor(); // display cursor
void _Cdecl MSetMode(int); // set mouse display mode
void _Cdecl MAssignCursor(void far *);// assign new cursor design
};
extern int _Cdecl Mspressed; // #times a button pressed
extern int _Cdecl Msreleased; // #times a button released
extern int _Cdecl Msbutton; // 1=left button, 2=right button
extern int _Cdecl Msx; // horiz. screen position
extern int _Cdecl Msy; // vert. screen position
extern void _Cdecl *McursorArrow; // default cursor definition block
#define LeftMButton 1
#define RightMButton 2
#define MCopy_Put 0 // Mouse cursor display modes
#define MXor_Put 1
#define MAnd_Put 2
#define MOr_Put 3
#define MNot_Put 4

BIN
super/MOUSEL.OBJ Normal file

Binary file not shown.

109
super/SUPER.BAK Normal file
View File

@ -0,0 +1,109 @@
#include <dos.h>
#include <math.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <graphics.h>
#include <c:\super\mouse.h>
int GraphDriver; /* The Graphics device driver */
int GraphMode; /* The Graphics mode value */
int ErrorCode; /* Reports any graphics errors */
void Initialize(void);
void Report(void);
int gprintf(int xloc, int yloc, char *fmt, ... );
int huge detectVESA(void);
/* *** here we go *** */
int main()
{
Initialize(); /* Initialize Graphics mode */
setfillstyle(1,245);
bar(0,0,getmaxx(),getmaxy());
Report(); /* Tell the world what we found */
MouseInit();
setcolor (124);
MShowCursor();
line (100,100,800,800);
setcolor(150);
// Pause(); /* Give em a change to see it */
getch();
MouseClose();
closegraph(); /* Go home */
return(0);
}
// ************************************************************************
// ************************************************************************
// FUNCIONES DEL PROGRAMA
// ************************************************************************// ************************************************************************// ************************************************************************
// ************************************************************************
int huge detectVESA(void)
{ return(2); }
/* Initialize the graphics system and report any errors occur. */
void Initialize(void)
{
GraphDriver = installuserdriver("bgi256v2",detectVESA);
if (grOk != graphresult() )
{
printf("Error installing VESA driver");
exit(1);
}
GraphDriver = DETECT;
initgraph( &GraphDriver, &GraphMode, "c:\\c\\bgi" );
ErrorCode = graphresult();
if (ErrorCode != grOk) /* Check if error occured */
{
printf(" Graphics System Error: %s\n",grapherrormsg(ErrorCode));
exit(1);
}
}
void Report(void)
{
char *driver, *mode;
driver = getdrivername();
mode = getmodename(GraphMode);
gprintf(10,10,"Graphics device : %-20s (%d)",driver,GraphDriver);
gprintf(10,20,"Graphics mode : %-20s (%d)",mode,GraphMode);
gprintf(10,30,"Screen resolution : %d x %d",getmaxx(),getmaxy());
gprintf(10,40,"Colors available : %d",getmaxcolor()+1);
}
/*GPRINTF: Used like PRINTF except the output is sent to the */
/*screen in graphics mode at the specified co-ordinate. */
int gprintf( int xloc, int yloc, char *fmt, ... )
{
va_list argptr; /* Argument list pointer */
char str[140]; /* Buffer to build sting into */
int cnt; /* Result of SPRINTF for return */
va_start( argptr, format ); /* Initialize va_ functions */
cnt = vsprintf( str, fmt, argptr ); /* prints string to buffer */
outtextxy( xloc, yloc, str ); /* Send string in graphics mode */
yloc += textheight( "H" ) + 2; /* Advance to next line */
va_end( argptr ); /* Close va_ functions */
return( cnt ); /* Return the conversion count */
}

114
super/SUPER.C Normal file
View File

@ -0,0 +1,114 @@
#include <dos.h>
#include <math.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <graphics.h>
#include <c:\super\mouse.h>
int GraphDriver; /* The Graphics device driver */
int GraphMode; /* The Graphics mode value */
int ErrorCode; /* Reports any graphics errors */
void Initialize(void);
void Report(void);
int gprintf(int xloc, int yloc, char *fmt, ... );
int huge detectVESA(void);
/* *** here we go *** */
int main()
{
Initialize(); /* Initialize Graphics mode */
for (int a=1;a<256;a++){
setfillstyle(1,a);
bar(0,0,getmaxx(),getmaxy());
gprintf (100,100,"%d",a);
//getch();
delay(2000);
}
Report(); /* Tell the world what we found */
MouseInit();
setcolor (124);
MShowCursor();
line (100,100,800,800);
setcolor(150);
// Pause(); /* Give em a change to see it */
getch();
MouseClose();
closegraph(); /* Go home */
return(0);
}
// ************************************************************************
// ************************************************************************
// FUNCIONES DEL PROGRAMA
// ************************************************************************// ************************************************************************// ************************************************************************
// ************************************************************************
int huge detectVESA(void)
{ return(2); }
/* Initialize the graphics system and report any errors occur. */
void Initialize(void)
{
GraphDriver = installuserdriver("bgi256v2",detectVESA);
if (grOk != graphresult() )
{
printf("Error installing VESA driver");
exit(1);
}
GraphDriver = DETECT;
initgraph( &GraphDriver, &GraphMode, "c:\\c\\bgi" );
ErrorCode = graphresult();
if (ErrorCode != grOk) /* Check if error occured */
{
printf(" Graphics System Error: %s\n",grapherrormsg(ErrorCode));
exit(1);
}
}
void Report(void)
{
char *driver, *mode;
driver = getdrivername();
mode = getmodename(GraphMode);
gprintf(10,10,"Graphics device : %-20s (%d)",driver,GraphDriver);
gprintf(10,20,"Graphics mode : %-20s (%d)",mode,GraphMode);
gprintf(10,30,"Screen resolution : %d x %d",getmaxx(),getmaxy());
gprintf(10,40,"Colors available : %d",getmaxcolor()+1);
}
/*GPRINTF: Used like PRINTF except the output is sent to the */
/*screen in graphics mode at the specified co-ordinate. */
int gprintf( int xloc, int yloc, char *fmt, ... )
{
va_list argptr; /* Argument list pointer */
char str[140]; /* Buffer to build sting into */
int cnt; /* Result of SPRINTF for return */
va_start( argptr, format ); /* Initialize va_ functions */
cnt = vsprintf( str, fmt, argptr ); /* prints string to buffer */
outtextxy( xloc, yloc, str ); /* Send string in graphics mode */
yloc += textheight( "H" ) + 2; /* Advance to next line */
va_end( argptr ); /* Close va_ functions */
return( cnt ); /* Return the conversion count */
}

BIN
super/SUPER.DSK Normal file

Binary file not shown.

BIN
super/SUPER.PRJ Normal file

Binary file not shown.