Yet another 16-bit fix for BGI and GRX. GrColor is not used in libbcc.h because including the grx headers is not and should not be a requirement for using GRX's BGI and the GrColor type may be unavailable. Compiled and tested with BCC / DOS only. What if I try to port GRX to BCC / WIN32 after -pre4?
diff -Nru3 grx245-1/include/grx20.h grx/include/grx20.h --- grx245-1/include/grx20.h Mon Jun 17 23:13:06 2002 +++ grx/include/grx20.h Wed Jul 10 09:54:56 2002 @@ -135,7 +135,7 @@ /* ================================================================== */
/* need unsigned 32 bit integer for color stuff */ -#ifdef __TURBOC__ +#if defined(__TURBOC__) && defined(__MSDOS__) /* TCC && BCC are 16 bit compilers */ typedef unsigned long int GrColor; #else diff -Nru3 grx245-1/include/libbcc.h grx/include/libbcc.h --- grx245-1/include/libbcc.h Wed Jul 10 10:03:20 2002 +++ grx/include/libbcc.h Wed Jul 10 09:59:36 2002 @@ -339,7 +339,11 @@ extern int __gr_color; /* drawing color */ extern int __gr_colorbg; /* background color */ extern int __gr_colorfill; /* fill color */ -extern int __gr_WR; /* Write mode */ +#if defined(__TURBOC__) && defined(__MSDOS__) +extern unsigned long __gr_WR; /* Write mode, type */ +#else +extern unsigned int __gr_WR; /* must match GrColor */ +#endif extern int __gr_Xasp; /* Aspect ratio */ extern int __gr_Yasp; extern int __gr_fpatno; diff -Nru3 grx245-1/src/bgi/bccgrx.c grx/src/bgi/bccgrx.c --- grx245-1/src/bgi/bccgrx.c Wed Jul 10 10:03:20 2002 +++ grx/src/bgi/bccgrx.c Wed Jul 10 09:59:36 2002 @@ -42,7 +42,7 @@ int __gr_color; /* drawing color */ int __gr_colorbg; /* background color */ int __gr_colorfill; /* fill color */ -int __gr_WR = GrWRITE; /* Write mode */ +GrColor __gr_WR = GrWRITE; /* Write mode */ int __gr_lstyle = SOLID_LINE; /* Actual line style */ int __gr_fpatno = SOLID_FILL; /* Actual filling pattern */ int __gr_Xasp = 10000; /* Aspect ratio */ diff -Nru3 grx245-1/src/bgi/putimage.c grx/src/bgi/putimage.c --- grx245-1/src/bgi/putimage.c Sat Dec 22 14:02:42 2001 +++ grx/src/bgi/putimage.c Wed Jul 10 09:49:54 2002 @@ -40,7 +40,7 @@ void putimage(int left, int top, void *bitmap, int op) { GrContext *gc; - int gr_op; + GrColor gr_op;
_DO_INIT_CHECK; GrSetContext(NULL);
Dimitar Zhekov escribió:
Yet another 16-bit fix for BGI and GRX. GrColor is not used in libbcc.h because including the grx headers is not and should not be a requirement for using GRX's BGI and the GrColor type may be unavailable. Compiled and tested with BCC / DOS only. What if I try to port GRX to BCC / WIN32 after -pre4?
Well if you want, why not. But if you have the time it will be better work in the "official" (mingw) version, there are big problems with te win32 driver, see http://www.gnu.de/software/GRX/problems.html (some of them are resolved more or less in 2.4.5).
If you like I can send simple instructions to install and go with mingw.
Regards, M.Alvarez.
Mariano Alvarez Fernandez schrieb:
Well if you want, why not. But if you have the time it will be better work in the "official" (mingw) version, there are big problems with te win32 driver, see http://www.gnu.de/software/GRX/problems.html (some of them are resolved more or less in 2.4.5).
If you like I can send simple instructions to install and go with mingw.
I'd appreciate to get these instructions too. Many thanks for all your work.
Waldemar Schultz escribió:
Mariano Alvarez Fernandez schrieb:
Well if you want, why not. But if you have the time it will be better work in the "official" (mingw) version, there are big problems with te win32 driver, see http://www.gnu.de/software/GRX/problems.html (some of them are resolved more or less in 2.4.5).
If you like I can send simple instructions to install and go with mingw.
I'd appreciate to get these instructions too. Many thanks for all your work.
Hi Waldemar (and thanks).
Chances are you know now better than I, how to install Mingw, but here are the instructions. Note I use an old version, but I prefer it because is an all-in-one package and probably the most used version.
------------------
These is a how-to for people who want to make the GRX win32 version, but don't know about the mingw compiler:
1.- First, download the mingw distribution:
ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/gcc-2.95.2/ gcc-2.95.2-msvcrt.exe
ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/gcc-2.95.2/ mingw32-docs-html.exe
ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/gcc-2.95.2/fixes/ quote-fix-msvcrt.exe
2.- Create a \MINGW dir and decompress the three files on it (The files are not instalers, only auto-decompress files)
3.- Create a \MINGW\SETVAR.BAT file with the line:
SET PATH=C:\MINGW\BIN;%PATH%
4.- Open a DOS window and execute \MINGW\SETVAR
5.- Go to the dir you have the GRX 2.4.x distribution.
Go to the src subdir and execute "make -f makefile.w32" Go to the test subdir and execute "make -f makefile.w32" Go to the test\bgi subdir and execute "make -f makefile.w32"
Hope this help, M.Alvarez
Dimitar Zhekov escribió:
What if I try to port GRX to BCC / WIN32 after -pre4?
10.07.2002 20:06:49, Mariano Alvarez Fernandez malfer@telefonica.net wrote:
Well if you want, why not. But if you have the time it will be better work in the "official" (mingw) version, there are big problems with te win32 driver, see...
You know, Win32 is not really on the top of my TODO list, so I'd rather try to write an (s)vga(gl)lib frame driver. Having the GRX programs suid root irritates me a lot.
when I have the time I prefer to work in the framebuffer version (have you checked it?).
No. A lot's to be desired from the NVidia/RIVA framebuffer driver, so I use svgalib.
E-gards: Jimmy