Grx
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1999 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1998 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1997 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1996 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1995 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1994 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
March 2005
- 5 participants
- 9 discussions
Hello Frank,
I will write this in the list.
I am using Bloodshed GNU Pascal Compiler v1.9.2 and I have downloaded
GRX246s in order to add graphics capability running on win2k.
I have read the accompanying readme files but still do not understand
how to set this up.
Regards
Dennis
-----Original Message-----
From: Frank Heckenbach [mailto:frank@g-n-u.de]
Sent: Wednesday, March 23, 2005 12:23 PM
To: Dennis Fitzpatrick; grx(a)gnu.de
Subject: Re: pascal
Hello Dennis.
Please write in the list, so others may be able to help as well.
(Including Windows users, which I don't use myself.)
> I am still getting nowhere on using GRX. I am running on win2k
and
> the make command does not work.
We need more information to help. Which GRX and GPC versions? What is
the error message? Etc.
Frank
--
Frank Heckenbach, frank(a)g-n-u.de
http://fjf.gnu.de/
GnuPG and PGP keys: http://fjf.gnu.de/plan (7977168E)
1
0
Hello Dennis.
Please write in the list, so others may be able to help as well.
(Including Windows users, which I don't use myself.)
> I am still getting nowhere on using GRX. I am running on win2k
> and the make command does not work.
We need more information to help. Which GRX and GPC versions? What
is the error message? Etc.
Frank
--
Frank Heckenbach, frank(a)g-n-u.de
http://fjf.gnu.de/
GnuPG and PGP keys: http://fjf.gnu.de/plan (7977168E)
1
0
I am attempting t install grx246 on my mandrake10.1 system, with no luck
todate.
I have changed the optimisation levels from o2 to o1 to prevent the REG
errors,
but now using
./configure --di-svgalib --enable-direct-mouse
make -f makefile.lnx
I get the errors:-
make[1]: Entering directory `/home/carlton/grx246/src'
gcc -o ../bin/modetest utilprog/modetest.o ../lib/unix/libgrx20.a -lm
../lib/unix/libgrx20.a(vtable.o)(.data+0x0): undefined reference to
`_GrVideoDriverSVGALIB'
collect2: ld returned 1 exit status
make[1]: *** [../bin/modetest] Error 1
make[1]: Leaving directory `/home/carlton/grx246/src'
make: *** [libs] Error 2
Using the --di-svgalib I assumed should disable svga options, so why the
rederence to GrVideoDriversSVGAlib?????
any clues - I really need to get this up and running ASAP
TIA
Carlton
2
1
Hi there,
I am running BloodShed Pascal GNU complier but I would like to add
some Graphics capability. It was recommended that I download the GRX
library which I have done. I have read the readme files but I am unsure
on how to set up GRX.
Any help would be appreciated.
Regards
Dennis
2
1
jediecowarrior(a)msn.com wrote:
(Please reply in the list!)
> Thanks for the advice. I located grx-2.4.6, but now get the errors
> (Where does it look for the vga.h file?)
> vdrivers/svgalib.c:20:17: vga.h: No such file or directory
It tries to build the svgalib version. You probably want the X11
version. After unpacking and before making, do this (you can check
which options you want, run `./configure --help'):
./configure --enable-jpeg --enable-png-z --with-fontpath
Frank
--
Frank Heckenbach, frank(a)g-n-u.de
http://fjf.gnu.de/
GnuPG and PGP keys: http://fjf.gnu.de/plan (7977168E)
1
0
help,
I am attempting to build grx 2.3 on my mandrake 10.1 (official) linux
system, however, I get the following errors.
any ideas on a solution. Do I need to install gcc version 2.7.1 or 2.8.1 ?
Thanks in advance.
[root@localhost grx-2.3]# make -f makefile.lnx
make -C src STATIC=1 -f makefile.lnx
make[1]: Entering directory `/usr/src/grx-2.3/src'
gcc -c -O6 -Wall -DLFB_BY_NEAR_POINTER -pipe -fomit-frame-pointer -I.
-I./include -I../include -I../addons/print utils/shiftscl.c -o
utils/shiftscl.o
utils/shiftscl.c: In function `_GR_shift_scanline':
utils/shiftscl.c:30: error: can't find a register in class `CREG' while
reloading `asm'
utils/shiftscl.c:86: error: can't find a register in class `CREG' while
reloading `asm'
make[1]: *** [utils/shiftscl.o] Error 1
make[1]: Leaving directory `/usr/src/grx-2.3/src'
make: *** [static_libs] Error 2
[root@localhost grx-2.3]# gcc --version
gcc (GCC) 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@localhost grx-2.3]# make --version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
[root@localhost grx-2.3]#
2
1
Re: polytest.pas:63: error: type mismatch in argument 1 of `GetCPUTime'
by Maurice Lombardi 08 Mar '05
by Maurice Lombardi 08 Mar '05
08 Mar '05
Shutian Ma a écrit:
> Dear Maurice,
>
> I re-installed gpc with gcc, and I can compile some
> demos, not all. You may know the following problem.
>
> Thank you for your help.
>
> Shutian
>
> [shma@localhost pascal]$ make -f makefile.lnx
> gpc --automake -O1 -Wall -o polytest polytest.pas
> -L../lib/unix ../lib/unix/libg
> rx20.a -lvga -lm
> polytest.pas: In procedure `SpeedTest':
> polytest.pas:63: error: type mismatch in argument 1 of
> `GetCPUTime'
> /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/units/gpc.pas:198:
> error: routin
> e declaration
> polytest.pas:87: error: type mismatch in argument 1 of
> `GetCPUTime'
> /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/units/gpc.pas:198:
> error: routin
> e declaration
> polytest.pas:111: error: type mismatch in argument 1
> of `GetCPUTime'
> /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/units/gpc.pas:198:
> error: routin
> e declaration
> make: *** [polytest] Error 1
> [shma@localhost pascal]$
> --- Maurice Lombardi
> <Maurice.Lombardi(a)ujf-grenoble.fr> wrote:
Yes. It was a change in recent versions of gpc (introduction of
CInteger / CCardinal to secure interface with C programs) which has not (yet)
been mirrored in this test.
Apply the following diff
--- polytest.pas.orig 2003-05-27 21:38:34.000000000 +0000
+++ polytest.pas 2005-03-08 11:57:56.000000000 +0000
@@ -57,7 +57,7 @@
sy : Integer = (GrSizeY - 2*hh) div 32;
ii,jj : Integer;
color : GrColor;
- t1,t2,t3,mu1,mu2,mu3: Integer;
+ t1,t2,t3,mu1,mu2,mu3: CInteger;
begin
GrClearScreen(black);
t1 := GetCPUTime(mu1);
While I am here, I think to an other problems.
There have been several diffs with respect to grx-2.4.6 on the gpc or grx lists
pertaining to pascal, many related to changes in the syntax of the compiler,
for interfaces to assembly / C modules.
I attach those I have applied (in order).
There are also other diffs pertaining mainly to the win32 driver,
which I have not applied, nor kept track of, because I use djgpp.
Some are in the grx247p1.zip prerelease.
Maurice
--
Maurice Lombardi
Laboratoire de Spectrometrie Physique,
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 63 54 95
mailto:Maurice.Lombardi@ujf-grenoble.fr
diff -u -r grx246.orig/configure grx246/configure
--- grx246.orig/configure Wed Oct 16 22:39:58 2002
+++ grx246/configure Mon Apr 26 04:02:04 2004
@@ -6,9 +6,10 @@
# to do with it, just ignore it and follow the normal install
# instructions.
#
-# Copyright (C) 2001-2002 Frank Heckenbach <frank(a)pascal.gnu.de>
+# Copyright (C) 2001-2002,2004 Frank Heckenbach <frank(a)pascal.gnu.de>
+# Peter Gerwinski <peter(a)gerwinski.de>
#
-# Parts copied from GCC's configure script,
+# Parts copied from some version of GCC's configure script,
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
@@ -48,6 +49,7 @@
HAVE_LIBPNG=n
NEED_ZLIB=n
HAVE_LIBTIFF=n
+HAVE_UNIX_TOOLS=n
INCLUDE_BMP_CODE=y
INCLUDE_PRINTING_CODE=y
INCLUDE_GPC_SUPPORT=n
@@ -146,7 +148,8 @@
--silent silent operation
--prefix=PREFIX install files in PREFIX [$default_prefix]
--target=TARGET configure for TARGET [$default_target]
- possible values: DJGPP, X11, svgalib
+ possible values: DJGPP, X11, svgalib, w32
+ or GCC-style ("i386-mingw32") for cross-compiling
--enable-jpeg include JPEG support [no]
--enable-png include PNG support [no]
--enable-z or use zlib [no]
@@ -192,12 +195,23 @@
done
case "`echo "$target" | tr A-Z a-z`" in
- djgpp) cfgsection=GRXVDJ2; target_makefile=makefile.dj2;;
- x | x11) cfgsection=GRXVX11; target_makefile=makefile.x11;;
- svgalib) cfgsection=GRXVLNX; target_makefile=makefile.lnx;;
- *) echo "$0: invalid target" >&2; exit 1;;
+ *djgpp*) cfgsection=GRXVDJ2; target_makefile=makefile.dj2;;
+ x | x11) cfgsection=GRXVX11; target_makefile=makefile.x11;;
+ svgalib) cfgsection=GRXVLNX; target_makefile=makefile.lnx;;
+ *w32 | *mingw*) cfgsection=GRXVW32; target_makefile=makefile.w32;;
+ *) echo "$0: invalid target" >&2; exit 1;;
esac
+if echo "$target" | tr A-Z a-z | grep "[a-z0-9]-[a-z0-9]" > /dev/null; then
+ CROSS_PLATFORM="`echo "$target" | tr A-Z a-z`-"
+ installdir="$prefix/$target"
+ # Cross-compiling is usually done from a Unix-like platform.
+ HAVE_UNIX_TOOLS=y
+else
+ CROSS_PLATFORM=""
+ installdir="$prefix"
+fi
+
if [ $USE_SVGALIB_DRIVER != y ] && [ $USE_FRAMEBUFFER_DRIVER != y ]; then
echo "$0: either \`--enable-svgalib' or \`--enable-framebuffer' must be set" >&2
exit 1
@@ -245,19 +259,21 @@
if sed -e "/^HAVE_LIBTIFF=/s/=.*/=$HAVE_LIBTIFF/;
/^HAVE_LIBJPEG=/s/=.*/=$HAVE_LIBJPEG/;
/^HAVE_LIBPNG=/s/=.*/=$HAVE_LIBPNG/;
+ /^HAVE_UNIX_TOOLS=/s/=.*/=$HAVE_UNIX_TOOLS/;
/^NEED_ZLIB=/s/=.*/=$NEED_ZLIB/;
/^INCLUDE_PRINTING_CODE=/s/=.*/=$INCLUDE_PRINTING_CODE/;
/^INCLUDE_BMP_CODE=/s/=.*/=$INCLUDE_BMP_CODE/;
/^INCLUDE_GPC_SUPPORT=/s/=.*/=$INCLUDE_GPC_SUPPORT/;
/^INCLUDE_SHARED_SUPPORT=/s/=.*/=$INCLUDE_SHARED_SUPPORT/;
/^INCLUDE_BGI_SUPPORT=/s/=.*/=$INCLUDE_BGI_SUPPORT/;
+ /^CROSS_PLATFORM=/s/=.*/=$CROSS_PLATFORM/;
/^USE_DIRECT_MOUSE_DRIVER=/s/=.*/=$USE_DIRECT_MOUSE_DRIVER/;
/^USE_SVGALIB_DRIVER=/s/=.*/=$USE_SVGALIB_DRIVER/;
/^USE_FRAMEBUFFER_DRIVER=/s/=.*/=$USE_FRAMEBUFFER_DRIVER/;
/^SET_SUIDROOT=/s/=.*/=$SET_SUIDROOT/;
/^USE_INOUTP_FRAMEDRIVERS=/s/=.*/=$USE_INOUTP_FRAMEDRIVERS/;
/^ifdef $cfgsection\$/,/^endif\$/{
- /^INSTALLDIR=/s|=.*|=$prefix|;
+ /^INSTALLDIR=/s|=.*|=$installdir|;
/^X11BASE=/s|=.*|=$x11base|;
$subst_fontpath;
/^X11LIBS=/s/\$/$lsocket/;
diff -u -r grx246.orig/makedefs.grx grx246/makedefs.grx
--- grx246.orig/makedefs.grx Wed Jul 16 04:09:42 2003
+++ grx246/makedefs.grx Mon Apr 26 03:58:39 2004
@@ -36,12 +36,19 @@
# Specify if you want to include BGI support
INCLUDE_BGI_SUPPORT=y
+# For cross-compiling, specify prefix for tools including the trailing dash
+# (e.g. "i386-mingw32-" for using i386-mingw32-gcc instead of just gcc)
+CROSS_PLATFORM=""
+
+# Specify if you want to use Unix tools on DOS-like platforms
+HAVE_UNIX_TOOLS=n
+
### SYSTEM SETTINGS ##################################################
-CC = gcc
-AR = ar
-RANLIB = ranlib
-STRIP = strip
+CC = $(CROSS_PLATFORM)gcc
+AR = $(CROSS_PLATFORM)ar
+RANLIB = $(CROSS_PLATFORM)ranlib
+STRIP = $(CROSS_PLATFORM)strip
# Different systems / setups may generate .o files
# this tag files will show what version is present
@@ -85,7 +92,7 @@
# place libgrx20.a and libgrx20.so in lib/unix
GRX_LIB_SUBDIR=unix
-# Set here the default destination dir for install and uninstall targets
+# Set here the destination dir for install and uninstall targets
INSTALLDIR=/usr/local
# Set the default GRX font path
@@ -154,6 +161,9 @@
# Put libgrx20.a to lib/dj2
GRX_LIB_SUBDIR=dj2
+# Set here the destination dir for install and uninstall targets
+INSTALLDIR=$(DJDIR)
+
# If you want to use 'upx.exe' compressor
# disable the echo line and enable upx line.
EXE_COMPRESS = -echo
@@ -184,8 +194,8 @@
# Put libgrx20.a to lib/win32
GRX_LIB_SUBDIR=win32
-# Set here your MINGW dir for install and uninstall targets
-MINGWDIR=C:\MINGW
+# Set here the destination dir for install and uninstall targets
+INSTALLDIR=C:\MINGW
# Set the default GRX font path
#GRX_DEFAULT_FONT_PATH=c:/grxfonts
diff -u -r grx246.orig/pascal/bgi/makefile.dj2 grx246/pascal/bgi/makefile.dj2
--- grx246.orig/pascal/bgi/makefile.dj2 Sun Dec 23 02:29:08 2001
+++ grx246/pascal/bgi/makefile.dj2 Mon Apr 26 03:58:47 2004
@@ -32,9 +32,11 @@
$(COMPILER) $(CCOPT) -o $*.exe $*.pas $(UNITPATH) $(LIBS)
clean:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f *.o *.exe *.gpi *.gpm
+else
if exist *.o del *.o
if exist *.exe del *.exe
if exist *.gpi del *.gpi
if exist *.gpm del *.gpm
-
-
+endif
diff -u -r grx246.orig/pascal/bgi/makefile.w32 grx246/pascal/bgi/makefile.w32
--- grx246.orig/pascal/bgi/makefile.w32 Sun Dec 23 02:30:18 2001
+++ grx246/pascal/bgi/makefile.w32 Mon Apr 26 03:58:47 2004
@@ -33,9 +33,11 @@
$(COMPILER) $(CCOPT) -o $*.exe $*.pas $(UNITPATH) $(LIBS)
clean:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f *.o *.exe *.gpi *.gpm
+else
if exist *.o del *.o
if exist *.exe del *.exe
if exist *.gpi del *.gpi
if exist *.gpm del *.gpm
-
-
+endif
diff -u -r grx246.orig/pascal/makefile.dj2 grx246/pascal/makefile.dj2
--- grx246.orig/pascal/makefile.dj2 Wed Jun 11 00:21:24 2003
+++ grx246/pascal/makefile.dj2 Mon Apr 26 03:58:47 2004
@@ -35,9 +35,11 @@
$(COMPILER) $(CCOPT) -o $*.exe $*.pas $(LIBS)
clean:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f *.o *.exe *.gpi *.gpm
+else
if exist *.o del *.o
if exist *.exe del *.exe
if exist *.gpi del *.gpi
if exist *.gpm del *.gpm
-
-
+endif
diff -u -r grx246.orig/pascal/makefile.w32 grx246/pascal/makefile.w32
--- grx246.orig/pascal/makefile.w32 Wed Jun 11 00:21:24 2003
+++ grx246/pascal/makefile.w32 Mon Apr 26 03:58:47 2004
@@ -35,9 +35,11 @@
$(COMPILER) $(CCOPT) -o $*.exe $*.pas $(LIBS)
clean:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f *.o *.exe *.gpi *.gpm
+else
if exist *.o del *.o
if exist *.exe del *.exe
if exist *.gpi del *.gpi
if exist *.gpm del *.gpm
-
-
+endif
diff -u -r grx246.orig/src/makefile.dj2 grx246/src/makefile.dj2
--- grx246.orig/src/makefile.dj2 Wed Jul 31 22:34:34 2002
+++ grx246/src/makefile.dj2 Mon Apr 26 04:11:02 2004
@@ -20,8 +20,13 @@
GRX20ln = libgrx20.a
GRX20ST = ../lib/$(GRX_LIB_SUBDIR)/$(GRX20ln)
+ifeq ($(HAVE_UNIX_TOOLS),y)
+GRX20STdos = $(GRX20ST)
+INSTALLDIRdos = $(INSTALLDIR)
+else
GRX20STdos = $(subst /,\,$(GRX20ST))
-DJDIRdos = $(subst /,\,$(DJDIR))
+INSTALLDIRdos = $(subst /,\,$(INSTALLDIR))
+endif
OX=.o
OP=
@@ -120,6 +125,9 @@
all: $(GRX20ST) $(UTILP)
clean:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f */*.o ../addons/*.o ../addons/*/*.o $(TAG)
+else
if exist bgi\*.o del bgi\*.o
if exist draw\*.o del draw\*.o
if exist fdrivers\*.o del fdrivers\*.o
@@ -141,79 +149,153 @@
if exist ..\addons\print\*.o del ..\addons\print\*.o
if exist ..\addons\bmp\*.o del ..\addons\bmp\*.o
if exist $(TAG) del $(TAG)
+endif
cleanall: clean
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f $(GRX20STdos) ../bin/*.exe
+else
if exist $(GRX20STdos) del $(GRX20STdos)
if exist ..\bin\*.exe del ..\bin\*.exe
+endif
install: $(GRX20ST)
- copy $(GRX20STdos) $(DJDIRdos)\lib
- copy ..\include\grx20.h $(DJDIRdos)\include
- copy ..\include\grxkeys.h $(DJDIRdos)\include
- copy ..\include\libbcc.h $(DJDIRdos)\include
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ cp $(GRX20STdos) $(INSTALLDIRdos)/lib
+ cp ../include/grx20.h ../include/grxkeys.h \
+ ../include/libbcc.h $(INSTALLDIRdos)/include
+ifeq ($(INCLUDE_PRINTING_CODE),y)
+ cp ../addons/print/grxprint.h $(INSTALLDIRdos)/include
+endif
+ifeq ($(INCLUDE_GPC_SUPPORT),y)
+ mkdir -p $(INSTALLDIRdos)/units
+ cp ../pascal/grx.pas ../pascal/bgi/graph.pas $(INSTALLDIRdos/units
+endif
+else
+ copy $(GRX20STdos) $(INSTALLDIRdos)\lib
+ copy ..\include\grx20.h $(INSTALLDIRdos)\include
+ copy ..\include\grxkeys.h $(INSTALLDIRdos)\include
+ copy ..\include\libbcc.h $(INSTALLDIRdos)\include
ifeq ($(INCLUDE_PRINTING_CODE),y)
- copy ..\addons\print\grxprint.h $(DJDIRdos)\include
+ copy ..\addons\print\grxprint.h $(INSTALLDIRdos)\include
endif
ifeq ($(INCLUDE_GPC_SUPPORT),y)
- if not exist $(DJDIRdos)\units\nul mkdir $(DJDIRdos)\units
- copy ..\pascal\grx.pas $(DJDIRdos)\units
- copy ..\pascal\bgi\graph.pas $(DJDIRdos)\units
+ if not exist $(INSTALLDIRdos)\units\nul mkdir $(INSTALLDIRdos)\units
+ copy ..\pascal\grx.pas $(INSTALLDIRdos)\units
+ copy ..\pascal\bgi\graph.pas $(INSTALLDIRdos)\units
+endif
endif
uninstall:
- if exist $(DJDIRdos)\lib\$(GRX20ln) del $(DJDIRdos)\lib\$(GRX20ln)
- if exist $(DJDIRdos)\include\grx20.h del $(DJDIRdos)\include\grx20.h
- if exist $(DJDIRdos)\include\grxkeys.h del $(DJDIRdos)\include\grxkeys.h
- if exist $(DJDIRdos)\include\libbcc.h del $(DJDIRdos)\include\libbcc.h
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f $(INSTALLDIRdos)/lib/$(GRX20ln) $(INSTALLDIRdos)/include/grx20.h \
+ $(INSTALLDIRdos)/include/grxkeys.h $(INSTALLDIRdos)/include/libbcc.h
+ifeq ($(INCLUDE_PRINTING_CODE),y)
+ rm -f $(INSTALLDIRdos)/include/grxprint.h
+endif
+ifeq ($(INCLUDE_GPC_SUPPORT),y)
+ rm -f $(INSTALLDIRdos)/units/grx.pas $(INSTALLDIRdos)/units/graph.pas
+endif
+else
+ if exist $(INSTALLDIRdos)\lib\$(GRX20ln) del $(INSTALLDIRdos)\lib\$(GRX20ln)
+ if exist $(INSTALLDIRdos)\include\grx20.h del $(INSTALLDIRdos)\include\grx20.h
+ if exist $(INSTALLDIRdos)\include\grxkeys.h del $(INSTALLDIRdos)\include\grxkeys.h
+ if exist $(INSTALLDIRdos)\include\libbcc.h del $(INSTALLDIRdos)\include\libbcc.h
ifeq ($(INCLUDE_PRINTING_CODE),y)
- if exist $(DJDIRdos)\include\grxprint.h del $(DJDIRdos)\include\grxprint.h
+ if exist $(INSTALLDIRdos)\include\grxprint.h del $(INSTALLDIRdos)\include\grxprint.h
endif
ifeq ($(INCLUDE_GPC_SUPPORT),y)
- if exist $(DJDIRdos)\units\grx.pas del $(DJDIRdos)\units\grx.pas
- if exist $(DJDIRdos)\units\graph.pas del $(DJDIRdos)\units\graph.pas
+ if exist $(INSTALLDIRdos)\units\grx.pas del $(INSTALLDIRdos)\units\grx.pas
+ if exist $(INSTALLDIRdos)\units\graph.pas del $(INSTALLDIRdos)\units\graph.pas
+endif
endif
install-info:
- copy ..\doc\grx*um.inf $(DJDIRdos)\info\grx.inf
- install-info $(DJDIRdos)\info\grx.inf $(DJDIRdos)\info\dir
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ cp ../doc/grx*um.inf $(INSTALLDIRdos)/info/grx.inf
+ install-info $(INSTALLDIRdos)/info/grx.inf $(INSTALLDIRdos)/info/dir
+else
+ copy ..\doc\grx*um.inf $(INSTALLDIRdos)\info\grx.inf
+ install-info $(INSTALLDIRdos)\info\grx.inf $(INSTALLDIRdos)\info\dir
+endif
uninstall-info:
- if exist $(DJDIRdos)\info\grx.inf del $(DJDIRdos)\info\grx.inf
- install-info -r $(DJDIRdos)\info\grx.inf $(DJDIRdos)\info\dir
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f $(INSTALLDIRdos)/info/grx.inf
+ install-info -r $(INSTALLDIRdos)/info/grx.inf $(INSTALLDIRdos)/info/dir
+else
+ if exist $(INSTALLDIRdos)\info\grx.inf del $(INSTALLDIRdos)\info\grx.inf
+ install-info -r $(INSTALLDIRdos)\info\grx.inf $(INSTALLDIRdos)\info\dir
+endif
install-bin: $(UTILP)
- copy ..\bin\bin2c.exe $(DJDIRdos)\bin
- copy ..\bin\fnt2c.exe $(DJDIRdos)\bin
- copy ..\bin\vesainfo.exe $(DJDIRdos)\bin
- copy ..\bin\modetest.exe $(DJDIRdos)\bin
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ cp ../bin/bin2c.exe ../bin/fnt2c.exe ../bin/vesainfo.exe \
+ ../bin/modetest.exe $(INSTALLDIRdos)/bin
+else
+ copy ..\bin\bin2c.exe $(INSTALLDIRdos)\bin
+ copy ..\bin\fnt2c.exe $(INSTALLDIRdos)\bin
+ copy ..\bin\vesainfo.exe $(INSTALLDIRdos)\bin
+ copy ..\bin\modetest.exe $(INSTALLDIRdos)\bin
+endif
uninstall-bin:
- if exist $(DJDIRdos)\bin\bin2c.exe del $(DJDIRdos)\bin\bin2c.exe
- if exist $(DJDIRdos)\bin\fnt2c.exe del $(DJDIRdos)\bin\fnt2c.exe
- if exist $(DJDIRdos)\bin\vesainfo.exe del $(DJDIRdos)\bin\vesainfo.exe
- if exist $(DJDIRdos)\bin\modetest.exe del $(DJDIRdos)\bin\modetest.exe
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f $(INSTALLDIRdos)/bin/bin2c.exe $(INSTALLDIRdos)/bin/fnt2c.exe \
+ $(INSTALLDIRdos)/bin/vesainfo.exe $(INSTALLDIRdos)/bin/modetest.exe
+else
+ if exist $(INSTALLDIRdos)\bin\bin2c.exe del $(INSTALLDIRdos)\bin\bin2c.exe
+ if exist $(INSTALLDIRdos)\bin\fnt2c.exe del $(INSTALLDIRdos)\bin\fnt2c.exe
+ if exist $(INSTALLDIRdos)\bin\vesainfo.exe del $(INSTALLDIRdos)\bin\vesainfo.exe
+ if exist $(INSTALLDIRdos)\bin\modetest.exe del $(INSTALLDIRdos)\bin\modetest.exe
+endif
ifdef GRX_DEFAULT_FONT_PATH
+ifeq ($(HAVE_UNIX_TOOLS),y)
+FONTPATHdos = $(GRX_DEFAULT_FONT_PATH)
+else
FONTPATHdos = $(subst /,\,$(GRX_DEFAULT_FONT_PATH))
+endif
install-fonts:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ mkdir -p $(FONTPATHdos)
+ cp ../fonts/* $(FONTPATHdos)
+else
if not exist $(FONTPATHdos)\nul mkdir $(FONTPATHdos)
copy ..\fonts\*.* $(FONTPATHdos)
+endif
uninstall-fonts:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f $(FONTPATHdos)/*
+else
del $(FONTPATHdos)\*.*
endif
+endif
dep:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f depend.tmp
+else
if exist depend.tmp del depend.tmp
+endif
gcc -MM $(CCOPT) $(INCDIR) $(ALL_O:.o=.c) >depend.tmp
sed 's#^.*: \(.*\)\.c#\1.o: \1.c#g' <depend.tmp >depend.dj2
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f depend.tmp
+else
if exist depend.tmp del depend.tmp
+endif
depend.b: depend.new
sed "s#\.o:#.obj:#g" <depend.new >depend.b
sed "s#\.o:#.asm:#g" <depend.new >>depend.b
$(GRX20ST): $(TAG) $(ALL_O)
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f $(GRX20STdos)
+else
if exist $(GRX20STdos) del $(GRX20STdos)
+endif
$(AR) -r $(GRX20ST) $(STD_Oa)
$(AR) -r $(GRX20ST) $(STD_Ob)
ifeq ($(INCLUDE_BGI_SUPPORT),y)
@@ -229,7 +311,11 @@
$(DOS_DJGPP_V2):
$(MAKE) -f makefile.dj2 clean
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ if [ ! -r $(DOS-DJGPP_V2) ]; then rm -f $(SYSTEM_TAG_PREFIX).*; fi
+else
if not exist $(DOS_DJGPP_V2) del $(SYSTEM_TAG_PREFIX).*
+endif
echo DOS_DJGPP_V2_TARGET > $(DOS_DJGPP_V2)
$(ALL_O): $(TAG)
diff -u -r grx246.orig/src/makefile.w32 grx246/src/makefile.w32
--- grx246.orig/src/makefile.w32 Sat Mar 22 00:14:14 2003
+++ grx246/src/makefile.w32 Mon Apr 26 04:10:58 2004
@@ -19,7 +19,11 @@
GRX20ln = libgrx20.a
GRX20ST = ../lib/$(GRX_LIB_SUBDIR)/$(GRX20ln)
+ifeq ($(HAVE_UNIX_TOOLS), y)
+GRX20STdos = $(GRX20ST)
+else
GRX20STdos = $(subst /,\,$(GRX20ST))
+endif
OX=.o
OP=
@@ -96,6 +100,9 @@
all: $(GRX20ST) $(UTILPC) $(UTILPW)
clean:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f */*.o ../addons/*.o ../addons/*/*.o $(TAG)
+else
if exist bgi\*.o del bgi\*.o
if exist draw\*.o del draw\*.o
if exist fdrivers\*.o del fdrivers\*.o
@@ -117,69 +124,133 @@
if exist ..\addons\print\*.o del ..\addons\print\*.o
if exist ..\addons\bmp\*.o del ..\addons\bmp\*.o
if exist $(TAG) del $(TAG)
+endif
cleanall: clean
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f $(GRX20STdos) ../bin/*.exe
+else
if exist $(GRX20STdos) del $(GRX20STdos)
if exist ..\bin\*.exe del ..\bin\*.exe
+endif
install: $(GRX20ST)
- copy $(GRX20STdos) $(MINGWDIR)\lib
- copy ..\include\grx20.h $(MINGWDIR)\include
- copy ..\include\grxkeys.h $(MINGWDIR)\include
- copy ..\include\libbcc.h $(MINGWDIR)\include
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ cp $(GRX20STdos) $(INSTALLDIR)/lib
+ cp ../include/grx20.h ../include/grxkeys.h \
+ ../include/libbcc.h $(INSTALLDIR)/include
+ifeq ($(INCLUDE_PRINTING_CODE),y)
+ cp ../addons/print/grxprint.h $(INSTALLDIR)/include
+endif
+ifeq ($(INCLUDE_GPC_SUPPORT),y)
+ mkdir -p $(INSTALLDIR)/units
+ cp ../pascal/grx.pas ../pascal/bgi/graph.pas $(INSTALLDIR)/units
+endif
+else
+ copy $(GRX20STdos) $(INSTALLDIR)\lib
+ copy ..\include\grx20.h $(INSTALLDIR)\include
+ copy ..\include\grxkeys.h $(INSTALLDIR)\include
+ copy ..\include\libbcc.h $(INSTALLDIR)\include
ifeq ($(INCLUDE_PRINTING_CODE),y)
- copy ..\addons\print\grxprint.h $(MINGWDIR)\include
+ copy ..\addons\print\grxprint.h $(INSTALLDIR)\include
endif
ifeq ($(INCLUDE_GPC_SUPPORT),y)
- if not exist $(MINGWDIR)\units\nul mkdir $(MINGWDIR)\units
- copy ..\pascal\grx.pas $(MINGWDIR)\units
- copy ..\pascal\bgi\graph.pas $(MINGWDIR)\units
+ if not exist $(INSTALLDIR)\units\nul mkdir $(INSTALLDIR)\units
+ copy ..\pascal\grx.pas $(INSTALLDIR)\units
+ copy ..\pascal\bgi\graph.pas $(INSTALLDIR)\units
+endif
endif
uninstall:
- if exist $(MINGWDIR)\lib\$(GRX20ln) del $(MINGWDIR)\lib\$(GRX20ln)
- if exist $(MINGWDIR)\include\grx20.h del $(MINGWDIR)\include\grx20.h
- if exist $(MINGWDIR)\include\grxkeys.h del $(MINGWDIR)\include\grxkeys.h
- if exist $(MINGWDIR)\include\libbcc.h del $(MINGWDIR)\include\libbcc.h
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f $(INSTALLDIR)/lib/$(GRX20ln) $(INSTALLDIR)/include/grx20.h \
+ $(INSTALLDIR)/include/grxkeys.h $(INSTALLDIR)/include/libbcc.h
ifeq ($(INCLUDE_PRINTING_CODE),y)
- if exist $(MINGWDIR)\include\grxprint.h del $(MINGWDIR)\include\grxprint.h
+ rm -f $(INSTALLDIR)/include/grxprint.h
endif
ifeq ($(INCLUDE_GPC_SUPPORT),y)
- if exist $(MINGWDIR)\units\grx.pas del $(MINGWDIR)\units\grx.pas
- if exist $(MINGWDIR)\units\graph.pas del $(MINGWDIR)\units\graph.pas
+ rm -f $(INSTALLDIR)/units/grx.pas $(INSTALLDIR)/units/graph.pas
+endif
+else
+ if exist $(INSTALLDIR)\lib\$(GRX20ln) del $(INSTALLDIR)\lib\$(GRX20ln)
+ if exist $(INSTALLDIR)\include\grx20.h del $(INSTALLDIR)\include\grx20.h
+ if exist $(INSTALLDIR)\include\grxkeys.h del $(INSTALLDIR)\include\grxkeys.h
+ if exist $(INSTALLDIR)\include\libbcc.h del $(INSTALLDIR)\include\libbcc.h
+ifeq ($(INCLUDE_PRINTING_CODE),y)
+ if exist $(INSTALLDIR)\include\grxprint.h del $(INSTALLDIR)\include\grxprint.h
+endif
+ifeq ($(INCLUDE_GPC_SUPPORT),y)
+ if exist $(INSTALLDIR)\units\grx.pas del $(INSTALLDIR)\units\grx.pas
+ if exist $(INSTALLDIR)\units\graph.pas del $(INSTALLDIR)\units\graph.pas
+endif
endif
install-bin: $(UTILPC) $(UTILPW)
- copy ..\bin\bin2c.exe $(MINGWDIR)\bin
- copy ..\bin\fnt2c.exe $(MINGWDIR)\bin
- copy ..\bin\modetest.exe $(MINGWDIR)\bin
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ cp ../bin/bin2c.exe ../bin/fnt2c.exe \
+ ../bin/modetest.exe $(INSTALLDIR)/bin
+else
+ copy ..\bin\bin2c.exe $(INSTALLDIR)\bin
+ copy ..\bin\fnt2c.exe $(INSTALLDIR)\bin
+ copy ..\bin\modetest.exe $(INSTALLDIR)\bin
+endif
uninstall-bin:
- if exist $(MINGWDIR)\bin\bin2c.exe del $(MINGWDIR)\bin\bin2c.exe
- if exist $(MINGWDIR)\bin\fnt2c.exe del $(MINGWDIR)\bin\fnt2c.exe
- if exist $(MINGWDIR)\bin\modetest.exe del $(MINGWDIR)\bin\modetest.exe
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f $(INSTALLDIR)/bin/bin2c.exe $(INSTALLDIR)/bin/fnt2c.exe \
+ $(INSTALLDIR)/bin/modetest.exe
+else
+ if exist $(INSTALLDIR)\bin\bin2c.exe del $(INSTALLDIR)\bin\bin2c.exe
+ if exist $(INSTALLDIR)\bin\fnt2c.exe del $(INSTALLDIR)\bin\fnt2c.exe
+ if exist $(INSTALLDIR)\bin\modetest.exe del $(INSTALLDIR)\bin\modetest.exe
+endif
ifdef GRX_DEFAULT_FONT_PATH
+ifeq ($(HAVE_UNIX_TOOLS),y)
+FONTPATHdos = $(GRX_DEFAULT_FONT_PATH)
+else
FONTPATHdos = $(subst /,\,$(GRX_DEFAULT_FONT_PATH))
+endif
install-fonts:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ mkdir -p $(FONTPATHdos)
+ cp ../fonts/* $(FONTPATHdos)
+else
if not exist $(FONTPATHdos)\nul mkdir $(FONTPATHdos)
copy ..\fonts\*.* $(FONTPATHdos)
+endif
uninstall-fonts:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f $(FONTPATHdos)/*
+else
del $(FONTPATHdos)\*.*
endif
+endif
dep:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f depend.tmp
+else
if exist depend.tmp del depend.tmp
+endif
gcc -MM $(CCOPT) $(INCDIR) $(ALL_O:.o=.c) >depend.tmp
sed 's#^.*: \(.*\)\.c#\1.o: \1.c#g' <depend.tmp >depend.w32
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f depend.tmp
+else
if exist depend.tmp del depend.tmp
+endif
depend.b: depend.new
sed "s#\.o:#.obj:#g" <depend.new >depend.b
sed "s#\.o:#.asm:#g" <depend.new >>depend.b
$(GRX20ST): $(TAG) $(ALL_O)
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f $(GRX20STdos)
+else
if exist $(GRX20STdos) del $(GRX20STdos)
+endif
$(AR) -r $(GRX20ST) $(STD_Oa)
$(AR) -r $(GRX20ST) $(STD_Ob)
$(AR) -r $(GRX20ST) $(STD_Oc)
@@ -199,7 +270,12 @@
$(WIN32_GCC_i386_STATIC):
$(MAKE) -f makefile.w32 clean
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ if [ ! -r $(WIN32_GCC_i386_STATIC) ]; then \
+ rm -f $(SYSTEM_TAG_PREFIX).*; fi
+else
if not exist $(WIN32_GCC_i386_STATIC) del $(SYSTEM_TAG_PREFIX).*
+endif
echo WIN32_GCC_i386_STATIC_TARGET > $(WIN32_GCC_i386_STATIC)
$(ALL_O): $(TAG)
diff -u -r grx246.orig/test/bgi/makefile.dj2 grx246/test/bgi/makefile.dj2
--- grx246.orig/test/bgi/makefile.dj2 Thu Jun 7 21:08:40 2001
+++ grx246/test/bgi/makefile.dj2 Mon Apr 26 03:58:47 2004
@@ -51,8 +51,12 @@
$(CC) -S $(CCOPT) $(INCDIR) $*.c
clean:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f *.o *.exe
+else
if exist *.o del *.o
if exist *.exe del *.exe
+endif
depend.new:
$(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:.exe=.c) >depend.new
diff -u -r grx246.orig/test/bgi/makefile.w32 grx246/test/bgi/makefile.w32
--- grx246.orig/test/bgi/makefile.w32 Sat Aug 10 00:04:46 2002
+++ grx246/test/bgi/makefile.w32 Mon Apr 26 03:58:47 2004
@@ -49,8 +49,12 @@
$(CC) -S $(CCOPT) $(INCDIR) $*.c
clean:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f *.o *.exe
+else
if exist *.o del *.o
if exist *.exe del *.exe
+endif
#depend.new:
# $(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:.exe=.c) >depend.new
diff -u -r grx246.orig/test/makefile.dj2 grx246/test/makefile.dj2
--- grx246.orig/test/makefile.dj2 Mon Jun 17 22:09:10 2002
+++ grx246/test/makefile.dj2 Mon Apr 26 03:58:47 2004
@@ -74,8 +74,12 @@
$(CC) -S $(CCOPT) $(INCDIR) $*.c
clean:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f *.o *.exe
+else
if exist *.o del *.o
if exist *.exe del *.exe
+endif
depend.new:
$(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:.exe=.c) >depend.new
diff -u -r grx246.orig/test/makefile.w32 grx246/test/makefile.w32
--- grx246.orig/test/makefile.w32 Mon Jun 17 22:08:38 2002
+++ grx246/test/makefile.w32 Mon Apr 26 03:58:47 2004
@@ -84,8 +84,12 @@
$(CC) -S $(CCOPT) $(INCDIR) $*.c
clean:
+ifeq ($(HAVE_UNIX_TOOLS),y)
+ rm -f *.o *.exe
+else
if exist *.o del *.o
if exist *.exe del *.exe
+endif
depend.new:
$(CC) -MM $(CCOPT) $(INCDIR) $(PROGS:.exe=.c) >depend.new
--- grx246.orig/configure Sun Jun 6 21:11:25 2004
+++ grx246.new/configure Sun Jun 6 21:15:45 2004
@@ -202,15 +202,16 @@
*) echo "$0: invalid target" >&2; exit 1;;
esac
-if echo "$target" | tr A-Z a-z | grep "[a-z0-9]-[a-z0-9]" > /dev/null; then
- CROSS_PLATFORM="`echo "$target" | tr A-Z a-z`-"
- installdir="$prefix/$target"
- # Cross-compiling is usually done from a Unix-like platform.
- HAVE_UNIX_TOOLS=y
-else
- CROSS_PLATFORM=""
- installdir="$prefix"
-fi
+case "$target" in
+ *[A-Za-z0-9]-[A-Za-z0-9]*|mingw32)
+ CROSS_PLATFORM="`echo "$target" | tr A-Z a-z`-"
+ installdir="$prefix/$target"
+ # Cross-compiling is usually done from a Unix-like platform.
+ HAVE_UNIX_TOOLS=y;;
+ *)
+ CROSS_PLATFORM=""
+ installdir="$prefix";;
+esac
if [ $USE_SVGALIB_DRIVER != y ] && [ $USE_FRAMEBUFFER_DRIVER != y ]; then
echo "$0: either \`--enable-svgalib' or \`--enable-framebuffer' must be set" >&2
--- grx246.orig/makedefs.grx Sun Jun 6 21:11:25 2004
+++ grx246.new/makedefs.grx Sun Jun 6 21:12:54 2004
@@ -46,6 +46,7 @@
### SYSTEM SETTINGS ##################################################
CC = $(CROSS_PLATFORM)gcc
+PC = $(CROSS_PLATFORM)gpc
AR = $(CROSS_PLATFORM)ar
RANLIB = $(CROSS_PLATFORM)ranlib
STRIP = $(CROSS_PLATFORM)strip
--- grx246.orig/pascal/bgi/makefile.dj2 Sun Jun 6 21:11:25 2004
+++ grx246.new/pascal/bgi/makefile.dj2 Sun Jun 6 21:13:23 2004
@@ -16,7 +16,7 @@
LIBS= $(GRXLIBPATH) $(GRXLIB)
# Compiler and options on your system
-COMPILER = gpc --automake
+COMPILER = $(PC) --automake
PROGS= \
allmodes.exe \
--- grx246.orig/pascal/bgi/makefile.lnx Sun Dec 23 02:32:40 2001
+++ grx246.new/pascal/bgi/makefile.lnx Sun Jun 6 21:13:28 2004
@@ -15,7 +15,7 @@
LIBS= $(GRXLIBPATH) $(GRXLIB) -lvga -lm
# Compiler and options on your system
-COMPILER = gpc --automake
+COMPILER = $(PC) --automake
PROGS= \
allmodes \
--- grx246.orig/pascal/bgi/makefile.w32 Sun Jun 6 21:11:25 2004
+++ grx246.new/pascal/bgi/makefile.w32 Sun Jun 6 21:35:43 2004
@@ -16,7 +16,7 @@
LIBS= $(GRXLIBPATH) $(GRXLIB) -mwindows -mconsole
# Compiler and options on your system
-COMPILER = gpc --autobuild --gpc-main=GRXMain
+COMPILER = $(PC) --autobuild
PROGS= \
--- grx246.orig/pascal/bgi/makefile.x11 Sun Dec 23 02:31:34 2001
+++ grx246.new/pascal/bgi/makefile.x11 Sun Jun 6 21:13:28 2004
@@ -15,7 +15,7 @@
LIBS= $(GRXLIBPATH) $(GRXLIB) $(X11LIBS) -lm
# Compiler and options on your system
-COMPILER = gpc --automake
+COMPILER = $(PC) --automake
PROGS= \
xallmodes \
--- grx246.orig/pascal/makefile Wed Jun 11 00:21:24 2003
+++ grx246.new/pascal/makefile Sun Jun 6 21:35:33 2004
@@ -9,7 +9,7 @@
GRAPHICSLIB = -L/usr/lib
# Compiler and options on your system
-COMPILER = gpc --automake -Wall
+COMPILER = $(PC) --automake -Wall
# --------------------------------------------
# I Think, you don't need to change from here
--- grx246.orig/pascal/makefile.dj2 Sun Jun 6 21:11:25 2004
+++ grx246.new/pascal/makefile.dj2 Sun Jun 6 21:13:19 2004
@@ -15,7 +15,7 @@
LIBS= $(GRXLIBPATH) $(GRXLIB)
# Compiler and options on your system
-COMPILER = gpc --automake
+COMPILER = $(PC) --automake
PROGS= \
--- grx246.orig/pascal/makefile.lnx Wed Jun 11 00:21:24 2003
+++ grx246.new/pascal/makefile.lnx Sun Jun 6 21:13:23 2004
@@ -14,7 +14,7 @@
LIBS= $(GRXLIBPATH) $(GRXLIB) -lvga -lm
# Compiler and options on your system
-COMPILER = gpc --automake
+COMPILER = $(PC) --automake
PROGS= \
--- grx246.orig/pascal/makefile.w32 Sun Jun 6 21:11:25 2004
+++ grx246.new/pascal/makefile.w32 Sun Jun 6 21:35:53 2004
@@ -15,7 +15,7 @@
LIBS= $(GRXLIBPATH) $(GRXLIB) -mwindows -mconsole
# Compiler and options on your system
-COMPILER = gpc --autobuild --gpc-main=GRXMain
+COMPILER = $(PC) --autobuild
PROGS= \
--- grx246.orig/pascal/makefile.x11 Wed Jun 11 00:21:24 2003
+++ grx246.new/pascal/makefile.x11 Sun Jun 6 21:13:19 2004
@@ -14,7 +14,7 @@
LIBS= $(GRXLIBPATH) $(GRXLIB) $(X11LIBS) -lm
# Compiler and options on your system
-COMPILER = gpc --automake
+COMPILER = $(PC) --automake
PROGS= \
--- grx246.orig/pascal/modetest.pas Tue May 27 21:23:20 2003
+++ grx246.new/pascal/modetest.pas Sun Jun 6 21:34:04 2004
@@ -21,7 +21,7 @@
Write (i:3);
Write (f:3);
Write (gvm.Mode:6);
- Write (gvm.Width:5, 'x',gvm.Height:4, 'x', Ord(gvm.BPP):3);
+ Write (gvm.Width:5, 'x',gvm.Height:4, 'x', gvm.BPP:3);
WriteLn;
fivm := GrNextVideoMode(fivm)
end
--- grx246.orig/src/makefile.dj2 Sun Jun 6 21:11:25 2004
+++ grx246.new/src/makefile.dj2 Sun Jun 6 21:12:47 2004
@@ -278,7 +278,7 @@
else
if exist depend.tmp del depend.tmp
endif
- gcc -MM $(CCOPT) $(INCDIR) $(ALL_O:.o=.c) >depend.tmp
+ $(CC) -MM $(CCOPT) $(INCDIR) $(ALL_O:.o=.c) >depend.tmp
sed 's#^.*: \(.*\)\.c#\1.o: \1.c#g' <depend.tmp >depend.dj2
ifeq ($(HAVE_UNIX_TOOLS),y)
rm -f depend.tmp
--- grx246.orig/src/makefile.lnx Mon Jun 23 18:13:22 2003
+++ grx246.new/src/makefile.lnx Sun Jun 6 21:12:47 2004
@@ -263,7 +263,7 @@
endif
dep:
- gcc -MM $(CCOPT) $(INCDIR) $(O:.o=.c) \
+ $(CC) -MM $(CCOPT) $(INCDIR) $(O:.o=.c) \
| sed 's#^.*: \(.*\)\.c#\1.o: \1.c#g' >depend.lnx
$(O): %.o : %.c
--- grx246.orig/src/makefile.w32 Sun Jun 6 21:11:25 2004
+++ grx246.new/src/makefile.w32 Sun Jun 6 21:12:43 2004
@@ -233,7 +233,7 @@
else
if exist depend.tmp del depend.tmp
endif
- gcc -MM $(CCOPT) $(INCDIR) $(ALL_O:.o=.c) >depend.tmp
+ $(CC) -MM $(CCOPT) $(INCDIR) $(ALL_O:.o=.c) >depend.tmp
sed 's#^.*: \(.*\)\.c#\1.o: \1.c#g' <depend.tmp >depend.w32
ifeq ($(HAVE_UNIX_TOOLS),y)
rm -f depend.tmp
--- grx246.orig/src/makefile.x11 Mon Jun 23 18:13:22 2003
+++ grx246.new/src/makefile.x11 Sun Jun 6 21:12:43 2004
@@ -255,7 +255,7 @@
endif
dep:
- gcc -MM $(CCOPT) $(INCDIR) $(O:.o=.c) \
+ $(CC) -MM $(CCOPT) $(INCDIR) $(O:.o=.c) \
| sed 's#^.*: \(.*\)\.c#\1.o: \1.c#g' >depend.x11
$(O): %.o : %.c
--- grx.pas.orig Fri Apr 25 02:10:07 2003
+++ grx.pas Sun Mar 28 23:15:23 2004
@@ -188,34 +188,35 @@
type
+ GrVideoModePtr = ^GrVideoMode;
+
{ The video driver descriptor structure }
{ struct _GR_videoDriver }
+ GrVideoDriverPtr = ^GrVideoDriver;
GrVideoDriver = record
- Name : CString; { driver name }
- Adapter : Char; { adapter type }
- Inherit : ^GrVideoDriver; { inherit video modes from this }
- Modes : ^GrVideoMode; { table of supported modes }
- NModes : Integer; { number of modes }
- Detect : Pointer;
- Init : Pointer;
- Reset : Pointer;
- SelectMode: Pointer;
- DrvFlags : Integer;
+ Name : CString; { driver name }
+ Adapter : Integer; { adapter type }
+ Inherit : GrVideoDriverPtr; { inherit video modes from this }
+ Modes : GrVideoModePtr; { table of supported modes }
+ NModes : Integer; { number of modes }
+ Detect : function: Integer;
+ Init : function (Options: CString): Integer;
+ Reset : procedure;
+ SelectMode: function (Drv: GrVideoDriverPtr; w, h, BPP, txt: Integer; var ep: Cardinal): GrVideoModePtr;
+ DrvFlags : Cardinal;
end;
- GrVideoDriverPtr = ^GrVideoDriver;
{ Video driver mode descriptor structure }
{ struct _GR_videoMode }
GrVideoMode = record
- Present : Char; { is it really available? }
- BPP : Char; { log2 of # of colors }
- Width,Height: ShortInt; { video mode geometry }
+ Present : ByteBool; { is it really available? }
+ BPP : Byte; { log2 of # of colors }
+ Width,Height: ShortInt; { video mode geometry }
Mode : ShortInt; { BIOS mode number (if any) }
- LineOffset : Integer; { scan line length }
- PrivData : Integer; { driver can use it for anything }
- ExtInfo : ^GrVideoModeExt; { extra info (maybe shared) }
+ LineOffset : Integer; { scan line length }
+ PrivData : Integer; { driver can use it for anything }
+ ExtInfo : ^GrVideoModeExt; { extra info (maybe shared) }
end;
- GrVideoModePtr = ^GrVideoMode;
{ Video driver mode descriptor extension structure. This is a separate
structure accessed via a pointer from the main mode descriptor. The
@@ -223,6 +224,7 @@
extended info. }
{ struct _GR_videoModeExt }
+ Int2 = array [0 .. 1] of Integer;
GrVideoModeExt = record
Mode : Integer; { frame driver for this video mode }
Drv : ^GrFrameDriver; { optional frame driver override }
@@ -230,15 +232,26 @@
CPrec : array [1 .. 3] of ByteCard; { color component precisions }
CPos : array [1 .. 3] of ByteCard; { color component bit positions }
Flags : Integer; { mode flag bits; see "grdriver.h" }
- Setup : Pointer;
- SetVSize : Pointer;
- Scroll : Pointer;
- SetBank : Pointer;
- SetRWBanks : Pointer;
- LoadColor : Pointer;
+ Setup : function (var md: GrVideoMode; NoClear: Integer): Integer;
+ SetVSize : function (var md: GrVideoMode; w, h: Integer; var Result: GrVideoMode): Integer;
+ Scroll : function (var md: GrVideoMode; x, y: Integer; var Result: Int2): Integer;
+ SetBank : procedure (bk: Integer);
+ SetRWBanks : procedure (rb, wb: Integer);
+ LoadColor : procedure (c, r, g, b: Integer);
LFB_Selector: Integer;
end;
+ GrFrameDriverPtr = ^GrFrameDriver;
+
+ GrFrameType = record
+ gf_BaseAddr : array [0 .. 3] of MemPtr; { base address of frame memory }
+ gf_Selector : ShortInt; { frame memory segment selector }
+ gf_OnScreen : ByteBool; { is it in video memory ? }
+ gf_MemFlags : Byte; { memory allocation flags }
+ gf_LineOffset: Integer; { offset to next scan line in bytes }
+ gf_Driver : GrFrameDriverPtr; { frame access functions }
+ end;
+
{ The frame driver descriptor structure. }
{ struct _GR_frameDriver }
@@ -249,46 +262,45 @@
Row_Align : Integer; { scan line size alignment }
Num_Planes : Integer; { number of planes }
Bits_Per_Pixel : Integer; { bits per pixel }
- Max_Plane_Size : Integer; { maximum plane size in bytes }
- Init : Pointer;
- ReadPixel : Pointer;
- DrawPixel : Pointer;
- DrawLine : Pointer;
- DrawHLine : Pointer;
- DrawVLine : Pointer;
- DrawBlock : Pointer;
- DrawBitmap : Pointer;
- DrawPattern : Pointer;
- BitBlt : Pointer;
- BltV2R : Pointer;
- BltR2V : Pointer;
- GetIndexedScanline: Pointer;
- PutScanLine : Pointer;
+ Max_Plane_Size : MedInt; { maximum plane size in bytes }
+ Init : function (var md: GrVideoMode): Integer;
+ ReadPixel : function (var c: GrFrameType; x, y: Integer): GrColor;
+ DrawPixel : procedure (x, y: Integer; c: GrColor);
+ DrawLine : procedure (x, y, dx, dy: Integer; c: GrColor);
+ DrawHLine : procedure (x, y, w: Integer; c: GrColor);
+ DrawVLine : procedure (x, y, h: Integer; c: GrColor);
+ DrawBlock : procedure (x, y, w, h: Integer; c: GrColor);
+ DrawBitmap : procedure (x, y, w, h: Integer; BMP: MemPtr; Pitch, Start: Integer; fg, bg: GrColor);
+ DrawPattern : procedure (x, y, w: Integer; Patt: Byte; fg, bg: GrColor);
+ BitBlt : procedure (var Dst: GrFrameType; dx, dy: Integer; var Src: GrFrameType; x, y, w, h: Integer; Op: GrColor);
+ BltV2R : procedure (var Dst: GrFrameType; dx, dy: Integer; var Src: GrFrameType; x, y, w, h: Integer; Op: GrColor);
+ BltR2V : procedure (var Dst: GrFrameType; dx, dy: Integer; var Src: GrFrameType; x, y, w, h: Integer; Op: GrColor);
+ GetIndexedScanline: function (var c: GrFrameType; x, y, w: Integer; var Index: Integer): GrColorsPtr;
+ PutScanLine : procedure (x, y, w: Integer; scl: GrColorsPtr; Op: GrColor);
end;
- GrFrameDriverPtr = ^GrFrameDriver;
{ driver and mode info structure }
{ extern const struct _GR_driverInfo }
GrDriverInfoType = record
- VDriver : ^GrVideoDriver; { the current video driver }
- CurMode : ^GrVideoMode; { current video mode pointer }
- ActMode : GrVideoMode; { copy of above, resized if virtual }
- FDriver : GrFrameDriver; { frame driver for the current context }
- SDriver : GrFrameDriver; { frame driver for the screen }
- TDriver : GrFrameDriver; { a dummy driver for text modes }
- MCode : ByteCard; { code for the current mode }
- DefTW,DefTH: Integer; { default text mode size }
- DefGW,DefGH: Integer; { default graphics mode size }
- DefTC,DefGC: GrColor; { default text and graphics colors }
- VPosX,VPosY: Integer; { current virtual viewport position }
- ErrsFatal : Integer; { if set, exit upon errors }
- ModeRestore: Integer; { restore startup video mode if set }
- SplitBanks : Integer; { indicates separate R/W banks }
- CurBank : Integer; { currently mapped bank }
- MdSetHook : Pointer; { callback for mode set }
- SetBank : Pointer; { banking routine }
- SetRWBanks : Pointer; { split banking routine }
+ VDriver : GrVideoDriverPtr; { the current video driver }
+ CurMode : GrVideoModePtr; { current video mode pointer }
+ ActMode : GrVideoMode; { copy of above, resized if virtual }
+ FDriver : GrFrameDriver; { frame driver for the current context }
+ SDriver : GrFrameDriver; { frame driver for the screen }
+ TDriver : GrFrameDriver; { a dummy driver for text modes }
+ MCode : Integer; { code for the current mode }
+ DefTW,DefTH: Integer; { default text mode size }
+ DefGW,DefGH: Integer; { default graphics mode size }
+ DefTC,DefGC: GrColor; { default text and graphics colors }
+ VPosX,VPosY: Integer; { current virtual viewport position }
+ ErrsFatal : Integer; { if set, exit upon errors }
+ ModeRestore: Integer; { restore startup video mode if set }
+ SplitBanks : Integer; { indicates separate R/W banks }
+ CurBank : Integer; { currently mapped bank }
+ MdSetHook : procedure; { callback for mode set }
+ SetBank : procedure (bk: Integer); { banking routine }
+ SetRWBanks : procedure (rb, wb: Integer); { split banking routine }
end;
var
@@ -351,33 +363,24 @@
================================================================== }
type
- GrFrameType = record
- gf_BaseAddr : array [0 .. 3] of MemPtr; { base address of frame memory }
- gf_Selector : ShortInt; { frame memory segment selector }
- gf_OnScreen : Char; { is it in video memory ? }
- gf_MemFlags : Char; { memory allocation flags }
- gf_LineOffset: Integer; { offset to next scan line in bytes }
- gf_Driver : ^GrFrameDriver; { frame access functions }
- end;
-
{ struct _GR_context }
+ GrContextPtr = ^GrContext;
GrContext = record
- gc_Frame : GrFrameType; { frame buffer info }
- gc_Root : ^GrContext; { context which owns frame }
- gc_XMax : Integer; { max X coord (width - 1) }
- gc_YMax : Integer; { max Y coord (height - 1) }
- gc_XOffset : Integer; { X offset from root's base }
- gc_YOffset : Integer; { Y offset from root's base }
- gc_XClipLo : Integer; { low X clipping limit }
- gc_YClipLo : Integer; { low Y clipping limit }
- gc_XClipHi : Integer; { high X clipping limit }
- gc_YClipHi : Integer; { high Y clipping limit }
- gc_UsrXBase : Integer; { user window min X coordinate }
- gc_UsrYBase : Integer; { user window min Y coordinate }
- gc_UsrWidth : Integer; { user window width }
- gc_UsrHeight: Integer; { user window height }
+ gc_Frame : GrFrameType; { frame buffer info }
+ gc_Root : GrContextPtr; { context which owns frame }
+ gc_XMax : Integer; { max X coord (width - 1) }
+ gc_YMax : Integer; { max Y coord (height - 1) }
+ gc_XOffset : Integer; { X offset from root's base }
+ gc_YOffset : Integer; { Y offset from root's base }
+ gc_XClipLo : Integer; { low X clipping limit }
+ gc_YClipLo : Integer; { low Y clipping limit }
+ gc_XClipHi : Integer; { high X clipping limit }
+ gc_YClipHi : Integer; { high Y clipping limit }
+ gc_UsrXBase : Integer; { user window min X coordinate }
+ gc_UsrYBase : Integer; { user window min Y coordinate }
+ gc_UsrWidth : Integer; { user window width }
+ gc_UsrHeight: Integer; { user window height }
end;
- GrContextPtr = ^GrContext;
{ extern const struct _GR_contextInfo }
GrContextInfoType = record
@@ -472,11 +475,11 @@
type
{ typedef struct } { framed box colors }
GrFBoxColors = record
- fbx_IntegerColor: Integer;
- fbx_TopColor : Integer;
- fbx_RightColor : Integer;
- fbx_BottomColor : Integer;
- fbx_LeftColor : Integer;
+ fbx_IntColor : GrColor;
+ fbx_TopColor : GrColor;
+ fbx_RightColor : GrColor;
+ fbx_BottomColor: GrColor;
+ fbx_LeftColor : GrColor;
end;
procedure GrClearScreen(bg:GrColor); asmname 'GrClearScreen';
@@ -503,7 +506,7 @@
procedure GrPolygon(NumPts: Integer; var Points{ : array of PointType }; c: GrColor); asmname 'GrPolygon';
procedure GrFilledConvexPolygon(NumPts: Integer; var Points{ : array of PointType }; c: GrColor); asmname 'GrFilledConvexPolygon';
procedure GrFilledPolygon(NumPts: Integer; var Points{ : array of PointType }; c: GrColor); asmname 'GrFilledPolygon';
-procedure GrBitBlt(Dest: GrContextPtr; x, y: Integer; Src: GrContextPtr; x1, y1, x2, y2: Integer; op: GrColor); asmname 'GrBitBlt';
+procedure GrBitBlt(Dest: GrContextPtr; x, y: Integer; Src: GrContextPtr; x1, y1, x2, y2: Integer; Op: GrColor); asmname 'GrBitBlt';
function GrPixel(x, y:Integer):GrColor; asmname 'GrPixel';
function GrPixelC(c: GrContextPtr; x, y: Integer): GrColor; asmname 'GrPixelC';
@@ -521,12 +524,12 @@
{ (w = |x2-y1|) }
{ Output data is valid until next GRX call ! }
-procedure GrPutScanline(x1,x2,yy: Integer;c: GrColorsPtr; op: GrColor); asmname 'GrPutScanline';
+procedure GrPutScanline(x1,x2,yy: Integer;c: GrColorsPtr; Op: GrColor); asmname 'GrPutScanline';
{ Input x1: first x coordinate to be set }
{ x2: last x coordinate to be set }
{ yy: y coordinate }
{ c : c[0..(|x2-x1|] hold the pixel data }
-{ op: Operation (GrWRITE/GrXOR/GrOR/GrAND/GrIMAGE) }
+{ Op: Operation (GrWRITE/GrXOR/GrOR/GrAND/GrIMAGE) }
{ }
{ Note c[..] data must fit GrCVALUEMASK otherwise the results }
{ are implementation dependend. }
@@ -544,7 +547,7 @@
procedure GrBoxNC(x1, y1, x2, y2: Integer; c: GrColor); asmname 'GrBoxNC';
procedure GrFilledBoxNC(x1, y1, x2, y2: Integer; c: GrColor); asmname 'GrFilledBoxNC';
procedure GrFramedBoxNC(x1, y1, x2, y2, Wdt: Integer; protected var c: GrFBoxColors); asmname 'GrFramedBoxNC';
-procedure GrBitBltNC(Dest: GrContextPtr; x, y: Integer; Src: GrContextPtr; x1, y1, x2, y2: Integer; op: GrColor); asmname 'GrBitBltNC';
+procedure GrBitBltNC(Dest: GrContextPtr; x, y: Integer; Src: GrContextPtr; x1, y1, x2, y2: Integer; Op: GrColor); asmname 'GrBitBltNC';
function GrPixelNC(x, y:Integer):GrColor; asmname 'GrPixelNC';
function GrPixelCNC(c: GrContextPtr; x, y: Integer): GrColor; asmname 'GrPixelCNC';
@@ -592,41 +595,40 @@
type
{ typedef struct _GR_fontHeader } { font descriptor }
GrFontHeader = record
- Name : CString; { font name }
- Family : CString; { font family name }
- Proportional: Char; { characters have varying width }
- Scalable : Char; { derived from a scalable font }
- Preloaded : Char; { set when linked Integero program }
- Modified : Char; { "tweaked" font (resized, etc..) }
- Width : Integer; { width (proportional=>average) }
- Height : Integer; { font height }
- Baseline : Integer; { baseline pixel pos (from top) }
- ULPos : Integer; { underline pixel pos (from top) }
- ULHeight : Integer; { underline width }
- MinChar : Integer; { lowest character code in font }
- NumChars : Integer; { number of characters in font }
+ Name : CString; { font name }
+ Family : CString; { font family name }
+ Proportional: ByteBool; { characters have varying width }
+ Scalable : ByteBool; { derived from a scalable font }
+ Preloaded : ByteBool; { set when linked Integero program }
+ Modified : ByteBool; { "tweaked" font (resized, etc..) }
+ Width : Cardinal; { width (proportional=>average) }
+ Height : Cardinal; { font height }
+ Baseline : Cardinal; { baseline pixel pos (from top) }
+ ULPos : Cardinal; { underline pixel pos (from top) }
+ ULHeight : Cardinal; { underline width }
+ MinChar : Cardinal; { lowest character code in font }
+ NumChars : Cardinal; { number of characters in font }
end;
{ typedef struct _GR_fontChrInfo } { character descriptor }
GrFontChrInfo = record
- Width : Integer; { width of this character }
- Offset: Integer; { offset from start of bitmap }
+ Width : Cardinal; { width of this character }
+ Offset: Cardinal; { offset from start of bitmap }
end;
{ typedef struct _GR_font } { the complete font }
- AuxoffsType = array [1 .. 7] of Integer;
+ AuxOffsType = array [0 .. 6] of Integer;
GrFont = record
h : GrFontHeader; { the font info structure }
BitMap : MemPtr; { character bitmap array }
AuxMap : MemPtr; { map for rotated & underline chrs }
- MinWidth: Integer; { width of narrowest character }
- MaxWidth: Integer; { width of widest character }
- AuxSize : Integer; { allocated size of auxiliary map }
- AuxNext : Integer; { next free byte in auxiliary map }
- AuxOffs : ^AuxoffsType; { offsets to completed aux chars }
- ChrInfo : array [1 .. 1] of GrFontChrInfo; { character info (not act. size) }
+ MinWidth: Cardinal; { width of narrowest character }
+ MaxWidth: Cardinal; { width of widest character }
+ AuxSize : Cardinal; { allocated size of auxiliary map }
+ AuxNext : Cardinal; { next free byte in auxiliary map }
+ AuxOffs : ^AuxOffsType; { offsets to completed aux chars }
+ ChrInfo : array [1 .. 1] of GrFontChrInfo; { character info (not act. size) }
end;
-
GrFontPtr = ^GrFont;
var
@@ -657,11 +659,11 @@
function GrFontCharAuxBmp(var Font: GrFont; Chr, Dir, ul: Integer): MemPtr; asmname 'GrFontCharAuxBmp';
type
- GrColorTableP = ^GrColor;
+ GrColorTableP = ^GrColors;
{ typedef union _GR_textColor } { text color union }
GrTextColor = record
- case 1..2 of
+ case 1 .. 2 of
1: (v: GrColor); { color value for "direct" text }
2: (p: GrColorTableP); { color table for attribute text }
end;
@@ -689,7 +691,7 @@
txr_LineOffset: Integer; { offset in buffer(s) between rows }
txr_XPos : Integer; { upper left corner X coordinate }
txr_YPos : Integer; { upper left corner Y coordinate }
- txr_ChrType : Char; { character type (see above) }
+ txr_ChrType : ByteCard; { character type (see above) }
end;
function GrCharWidth(Chr: Integer; protected var Opt: GrTextOption): Integer; asmname 'GrCharWidth';
@@ -717,10 +719,10 @@
type
GrLineOption = record
- No_Color : GrColor; { color used to draw line }
- Lno_Width : Integer; { width of the line }
- Lno_PattLen: Integer; { length of the dash pattern }
- Lno_DashPat: ^ByteCard; { draw/nodraw pattern }
+ No_Color : GrColor; { color used to draw line }
+ Lno_Width : Integer; { width of the line }
+ Lno_PattLen: Integer; { length of the dash pattern }
+ Lno_DashPat: MemPtr; { draw/nodraw pattern }
end;
procedure GrCustomLine(x1, y1, x2, y2: Integer; protected var o: GrLineOption); asmname 'GrCustomLine';
@@ -745,7 +747,7 @@
GrBitmap = record
bmp_IsPixMap: Integer; { type flag for pattern union }
bmp_Height : Integer; { bitmap height }
- bmp_Data : ^ByteCard; { pointer to the bit pattern }
+ bmp_Data : MemPtr; { pointer to the bit pattern }
bmp_FgColor : GrColor; { foreground color for fill }
bmp_BgColor : GrColor; { background color for fill }
bmp_MemFlags: Integer; { set if dynamically allocated }
@@ -769,9 +771,10 @@
{ typedef union _GR_pattern }
GrPattern = record
- gp_IsPixMap: Integer; { nonzero for pixmaps }
- gp_BitMap : GrBitmap; { fill bitmap }
- gp_PixMap : GrPixmap; { fill pixmap }
+ case 1 .. 3 of
+ 1: (gp_IsPixMap: Integer); { nonzero for pixmaps }
+ 2: (gp_BitMap : GrBitmap); { fill bitmap }
+ 3: (gp_PixMap : GrPixmap); { fill pixmap }
end;
GrPatternPtr = ^GrPattern;
@@ -820,11 +823,6 @@
<e-mail> - [stenclpmd(a)ba.telecom.sk] }
type
- { Original GRX decl:
- GrImage = GrPixmap;
- GrImagePtr = ^GrImage;
- Pascal isn't case sensitive so GrImage conficts with GrIMAGE above.
- Since we only need GrImagePtr we take a short cut here: }
GrImagePtr = ^GrPixmap;
{ Flags for GrImageInverse() }
@@ -991,7 +989,7 @@
Buttons: Integer; { mouse button state }
Key : Integer; { key code from keyboard }
KBStat : Integer; { keybd status (ALT, CTRL, etc..) }
- DTime : Integer; { time since last event (msec) }
+ DTime : MedInt; { time since last event (msec) }
end;
GrMouseEventPtr = ^GrMouseEvent;
--- grx246/pascal/bgi/graph.pas.orig Fri Sep 17 18:57:44 2004
+++ grx246/pascal/bgi/graph.pas Fri Sep 17 19:04:19 2004
@@ -19,8 +19,7 @@
22/02/01 patches by Maurice Lombardi <Maurice.Lombardi(a)ujf-grenoble.fr>
Necessary to correct the drawpoly and fillpoly declarations.
Some changes to make this file compile with more recent versions of
- gpc (change in declaration of external variables, removal of now
- invalid __soso__ declarations). }
+ gpc. }
{ Define this if you don't want this unit to declare a KeyPressed
and a ReadKey function. }
@@ -62,9 +61,14 @@
{$else}
{$define varasmname external; asmname}
{$endif}
+{$if __GPC_RELEASE__ < 20040917}
+type
+ CInteger = Integer;
+ CCardinal = Cardinal;
+{$endif}
type
- PByte = ^Byte;
+ PByte = ^Byte;
WrkString = String[255];
const
@@ -263,26 +267,26 @@
type
PaletteType = record
Size : Byte;
- Colors: array [0 .. MaxColors] of Byte;
+ Colors: array [0 .. MaxColors] of Byte
end;
LineSettingsType = record
- LineStyle: Integer;
+ LineStyle: CInteger;
UPattern : ShortCard;
- Thickness: Integer;
+ Thickness: CInteger
end;
TextSettingsType = record
- Font : Integer;
- Direction: Integer;
- CharSize : Integer;
- Horiz : Integer;
- Vert : Integer;
+ Font,
+ Direction,
+ CharSize,
+ Horiz,
+ Vert: CInteger
end;
FillSettingsType = record
- Pattern: Integer;
- Color : Integer;
+ Pattern,
+ Color: CInteger
end;
FillPatternType = array [1 .. 8] of Byte;
@@ -290,17 +294,17 @@
{ This definition is compatible with the grx
definition `int pts[][2]' used to define polygons }
PointType = record
- x, y: Integer;
+ x, y: CInteger
end;
ViewPortType = record
- x1, y1, x2, y2: Integer;
- Clip: WordBool;
+ x1, y1, x2, y2: CInteger;
+ Clip: WordBool
end;
ArcCoordsType = record
- x, y:Integer;
- XStart, YStart, XEnd, YEnd: Integer;
+ x, y,
+ XStart, YStart, XEnd, YEnd: CInteger
end;
var
@@ -309,105 +313,105 @@
{ BGI - API definitions }
-procedure DetectGraph(var GraphDriver, GraphMode: Integer); asmname 'detectgraph';
-procedure InitGraph(var GraphDriver, GraphMode: Integer; PathToDriver: CString); asmname 'initgraph';
-procedure SetGraphMode(Mode: Integer); asmname 'setgraphmode';
-function GetModeName(ModeNumber: Integer): WrkString;
+procedure DetectGraph(var GraphDriver, GraphMode: CInteger); asmname 'detectgraph';
+procedure InitGraph(var GraphDriver, GraphMode: Integer; PathToDriver: CString);
+procedure SetGraphMode(Mode: CInteger); asmname 'setgraphmode';
+function GetModeName(ModeNumber: CInteger): WrkString;
procedure GraphDefaults; asmname 'graphdefaults';
function GetDriverName: WrkString;
-function GraphErrorMsg(ErrorCode: Integer): WrkString;
-function GetMaxX: Integer; asmname 'getmaxx';
-function GetMaxY: Integer; asmname 'getmaxy';
-function GetMaxColor: Integer; asmname 'getmaxcolor';
+function GraphErrorMsg(ErrorCode: CInteger): WrkString;
+function GetMaxX: CInteger; asmname 'getmaxx';
+function GetMaxY: CInteger; asmname 'getmaxy';
+function GetMaxColor: CInteger; asmname 'getmaxcolor';
procedure GetViewSettings(var ViewPort: ViewPortType); asmname 'getviewsettings';
-procedure SetViewPort(Left, Top, Right, Bottom: Integer; Clip: Boolean); asmname 'setviewport';
+procedure SetViewPort(Left, Top, Right, Bottom: CInteger; Clip: Boolean); asmname 'setviewport';
procedure GetLineSettings(var LineInfo: LineSettingsType); asmname 'getlinesettings';
-procedure SetLineStyle(LineStyle: Integer; Pattern: Integer; Thickness: Integer); asmname 'setlinestyle';
+procedure SetLineStyle(LineStyle: CInteger; Pattern: CInteger; Thickness: CInteger); asmname 'setlinestyle';
procedure ClearViewPort; asmname 'clearviewport';
-function GetPixel(x,y: Integer): Integer; asmname 'getpixel';
-procedure PutPixel(x, y: Integer; Pixel: Integer); asmname 'putpixel';
-procedure Bar3D(Left, Top, Right, Bottom: Integer; Depth: Integer; TopFlag: Boolean); asmname 'bar';
-procedure Rectangle(Left, Top, Right, Bottom: Integer); asmname 'rectangle';
-procedure FillPoly(NumPoints: Word; var PolyPoints { : array of PointType }); asmname 'fillpoly';
-procedure FillEllipse(x, y: Integer; XRadius, YRadius: Integer); asmname 'fillellipse';
+function GetPixel(x,y: CInteger): CInteger; asmname 'getpixel';
+procedure PutPixel(x, y: CInteger; Pixel: CInteger); asmname 'putpixel';
+procedure Bar3D(Left, Top, Right, Bottom: CInteger; Depth: CInteger; TopFlag: Boolean); asmname 'bar';
+procedure Rectangle(Left, Top, Right, Bottom: CInteger); asmname 'rectangle';
+procedure FillPoly(NumPoints: CCardinal; var PolyPoints { : array of PointType }); asmname 'fillpoly';
+procedure FillEllipse(x, y: CInteger; XRadius, YRadius: CInteger); asmname 'fillellipse';
procedure GetArcCoords(var ArcCoords: ArcCoordsType); asmname 'getarccoords';
-procedure FloodFill(x, y: Integer; Border: Integer); asmname 'floodfill';
-procedure SetFillPattern(UPattern: FillPatternType; Color: Integer); asmname 'setfillpattern';
-procedure SetFillStyle(Pattern: Integer; Color: Integer); asmname 'setfillstyle';
-procedure GetImage(Left, Top, Right, Bottom: Integer; var BitMap); asmname 'getimage';
-procedure PutImage(Left, Top: Integer; var BitMap; Op: Integer); asmname 'putimage';
-function ImageSize(Left, Top, Right, Bottom: Integer): Integer; asmname 'imagesize';
+procedure FloodFill(x, y: CInteger; Border: CInteger); asmname 'floodfill';
+procedure SetFillPattern(UPattern: FillPatternType; Color: CInteger); asmname 'setfillpattern';
+procedure SetFillStyle(Pattern: CInteger; Color: CInteger); asmname 'setfillstyle';
+procedure GetImage(Left, Top, Right, Bottom: CInteger; var BitMap); asmname 'getimage';
+procedure PutImage(Left, Top: CInteger; var BitMap; Op: CInteger); asmname 'putimage';
+function ImageSize(Left, Top, Right, Bottom: CInteger): CInteger; asmname 'imagesize';
procedure GetTextSettings(var TextTypeInfo: TextSettingsType); asmname 'gettextsettings';
-procedure SetTextJustify(Horiz, Vert: Integer); asmname 'settextjustify';
-procedure SetTextStyle(Font, Direction: Integer; CharSize: Integer); asmname 'settextstyle';
-procedure SetRGBPalette(Color, Red, Green, Blue: Integer); asmname 'setrgbpalette';
-procedure SetUserCharSize(MultX, DivX, MultY, DivY: Integer); asmname 'setusercharsize';
-procedure SetWriteMode(Mode: Integer); asmname 'setwritemode';
+procedure SetTextJustify(Horiz, Vert: CInteger); asmname 'settextjustify';
+procedure SetTextStyle(Font, Direction: CInteger; CharSize: CInteger); asmname 'settextstyle';
+procedure SetRGBPalette(Color, Red, Green, Blue: CInteger); asmname 'setrgbpalette';
+procedure SetUserCharSize(MultX, DivX, MultY, DivY: CInteger); asmname 'setusercharsize';
+procedure SetWriteMode(Mode: CInteger); asmname 'setwritemode';
procedure OutText(TextString: CString); asmname 'outtext';
-procedure OutTextXY(x, y: Integer; TextString: CString); asmname 'outtextxy';
-function TextHeight(TextString: CString): Integer; asmname 'textheight';
-function TextWidth(TextString: CString): Integer; asmname 'textwidth';
+procedure OutTextXY(x, y: CInteger; TextString: CString); asmname 'outtextxy';
+function TextHeight(TextString: CString): CInteger; asmname 'textheight';
+function TextWidth(TextString: CString): CInteger; asmname 'textwidth';
-function RegisterBGIfont(Font: Pointer): Integer; asmname 'registerbgifont';
-function InstallUserFont(FontName: CString): Integer; asmname 'installuserfont';
+function RegisterBGIfont(Font: Pointer): CInteger; asmname 'registerbgifont';
+function InstallUserFont(FontName: CString): CInteger; asmname 'installuserfont';
-function GetPaletteSize: Integer; asmname 'getpalettesize';
+function GetPaletteSize: CInteger; asmname 'getpalettesize';
procedure GetPalette(var Palette: PaletteType); asmname 'getpalette';
-procedure SetPalette(ColorNum: Word; Color: Integer); asmname '__gr_setpalette';
+procedure SetPalette(ColorNum: CCardinal; Color: CInteger); asmname '__gr_setpalette';
procedure SetAllPalette(protected var Palette: PaletteType); asmname 'setallpalette';
procedure RestoreCrtMode; asmname '__gr_restorecrtmode';
procedure CloseGraph; asmname '__gr_closegraph';
-procedure SetColor(Color: Integer); asmname '__gr_setcolor';
-procedure SetBkColor(Color: Integer); asmname '__gr_setbkcolor';
-procedure Bar(Left, Top, Right, Bottom: Integer); asmname '__gr_bar';
-function GraphResult:Integer; asmname '__gr_graphresult';
-procedure Line(x1, y1, x2, y2: Integer); asmname '__gr_line';
-procedure MoveTo(x, y: Integer); asmname '__gr_moveto';
-procedure Arc(x, y: Integer; StAngle, EndAngle, Radius: Word); asmname '__gr_arc';
-procedure Circle(x, y: Integer; Radius: Word); asmname '__gr_circle';
+procedure SetColor(Color: CInteger); asmname '__gr_setcolor';
+procedure SetBkColor(Color: CInteger); asmname '__gr_setbkcolor';
+procedure Bar(Left, Top, Right, Bottom: CInteger); asmname '__gr_bar';
+function GraphResult:CInteger; asmname '__gr_graphresult';
+procedure Line(x1, y1, x2, y2: CInteger); asmname '__gr_line';
+procedure MoveTo(x, y: CInteger); asmname '__gr_moveto';
+procedure Arc(x, y: CInteger; StAngle, EndAngle, Radius: CCardinal); asmname '__gr_arc';
+procedure Circle(x, y: CInteger; Radius: CCardinal); asmname '__gr_circle';
procedure ClearDevice; asmname '__gr_cleardevice';
-procedure DrawPoly(NumPoints: Word; var PolyPoints { : array of PointType }); asmname '__gr_drawpoly';
-procedure Ellipse(x, y: Integer; StAngle, EndAngle: Word; XRadius, YRadius: Word); asmname '__gr_ellipse';
-procedure GetAspectRatio(var XAsp, YAsp: Integer); asmname '__gr_getaspectratio';
-function GetBkColor: Word; asmname '__gr_getbkcolor';
-function GetColor: Word; asmname '__gr_getcolor';
+procedure DrawPoly(NumPoints: CCardinal; var PolyPoints { : array of PointType }); asmname '__gr_drawpoly';
+procedure Ellipse(x, y: CInteger; StAngle, EndAngle: CCardinal; XRadius, YRadius: CCardinal); asmname '__gr_ellipse';
+procedure GetAspectRatio(var XAsp, YAsp: CInteger); asmname '__gr_getaspectratio';
+function GetBkColor: CCardinal; asmname '__gr_getbkcolor';
+function GetColor: CCardinal; asmname '__gr_getcolor';
procedure GetFillPattern(var FillPattern: FillPatternType); asmname '__gr_getfillpattern';
procedure GetFillSettings(var FillInfo: FillSettingsType); asmname '__gr_getfillsettings';
-function GetMaxMode: Integer; asmname '__gr_getmaxmode';
-function GetGraphMode: Integer; asmname '__gr_getgraphmode';
-function GetX: Integer; asmname '__gr_getx';
-function GetY: Integer; asmname '__gr_gety';
-function InstallUserDriver(const DriverName: String; AutoDetectPtr: Pointer):Integer;
-procedure LineRel(dx, dy: Integer); asmname '__gr_linerel';
-procedure LineTo(x, y: Integer); asmname '__gr_lineto';
-procedure MoveRel(dx, dy: Integer); asmname '__gr_moverel';
-procedure PieSlice(x, y: Integer; StAngle, EndAngle, Radius: Word); asmname '__gr_pieslice';
-function RegisterBGIdriver(Driver: Pointer): Integer;
-procedure Sector(x, y: Integer; StAngle,EndAngle, XRadius, YRadius: Word); asmname '__gr_sector';
-procedure SetAspectRatio(XAsp, YAsp: Integer); asmname '__gr_setaspectratio';
-procedure SetGraphBufSize(BufSize: Word); asmname '__gr_setgraphbufsize';
-procedure SetActivePage(Page: Word); asmname '__gr_setactivepage';
-procedure SetVisualPage(Page: Word); asmname '__gr_setvisualpage';
+function GetMaxMode: CInteger; asmname '__gr_getmaxmode';
+function GetGraphMode: CInteger; asmname '__gr_getgraphmode';
+function GetX: CInteger; asmname '__gr_getx';
+function GetY: CInteger; asmname '__gr_gety';
+function InstallUserDriver(const DriverName: String; AutoDetectPtr: Pointer):CInteger;
+procedure LineRel(dx, dy: CInteger); asmname '__gr_linerel';
+procedure LineTo(x, y: CInteger); asmname '__gr_lineto';
+procedure MoveRel(dx, dy: CInteger); asmname '__gr_moverel';
+procedure PieSlice(x, y: CInteger; StAngle, EndAngle, Radius: CCardinal); asmname '__gr_pieslice';
+function RegisterBGIdriver(Driver: Pointer): CInteger;
+procedure Sector(x, y: CInteger; StAngle,EndAngle, XRadius, YRadius: CCardinal); asmname '__gr_sector';
+procedure SetAspectRatio(XAsp, YAsp: CInteger); asmname '__gr_setaspectratio';
+procedure SetGraphBufSize(BufSize: CCardinal); asmname '__gr_setgraphbufsize';
+procedure SetActivePage(Page: CCardinal); asmname '__gr_setactivepage';
+procedure SetVisualPage(Page: CCardinal); asmname '__gr_setvisualpage';
procedure GetDefaultPalette(var Palette: PaletteType);
-procedure GetModeRange(GraphDriver:Integer; var LoMode, HiMode:Integer); asmname '__gr_getmoderange';
+procedure GetModeRange(GraphDriver:CInteger; var LoMode, HiMode:CInteger); asmname '__gr_getmoderange';
-function Black : Integer;
-function Blue : Integer;
-function Green : Integer;
-function Cyan : Integer;
-function Red : Integer;
-function Magenta : Integer;
-function Brown : Integer;
-function LightGray : Integer;
-function DarkGray : Integer;
-function LightBlue : Integer;
-function LightGreen : Integer;
-function LightCyan : Integer;
-function LightRed : Integer;
-function LightMagenta: Integer;
-function Yellow : Integer;
-function White : Integer;
+function Black : CInteger;
+function Blue : CInteger;
+function Green : CInteger;
+function Cyan : CInteger;
+function Red : CInteger;
+function Magenta : CInteger;
+function Brown : CInteger;
+function LightGray : CInteger;
+function DarkGray : CInteger;
+function LightBlue : CInteger;
+function LightGreen : CInteger;
+function LightCyan : CInteger;
+function LightRed : CInteger;
+function LightMagenta: CInteger;
+function Yellow : CInteger;
+function White : CInteger;
{ BGI - API extensions }
@@ -427,43 +431,43 @@
{ Translates BGI driver/mode into a driver/mode pair for this unit
for usage with InitGraph / SetGraphMode }
-procedure SetBGImode(var GDrv, GMode: Integer); asmname 'set_BGI_mode';
+procedure SetBGImode(var GDrv, GMode: CInteger); asmname 'set_BGI_mode';
{ Determines a driver/mode pair for InitGraph that will set
up a graphics mode with the desired resolution and colors }
-procedure SetBGImodeWHC(var GDrv, GMode: Integer; Width, Height, Colors: Integer); asmname '__gr_set_BGI_mode_whc';
+procedure SetBGImodeWHC(var GDrv, GMode: CInteger; Width, Height, Colors: CInteger); asmname '__gr_set_BGI_mode_whc';
{ enable multiple graphics pages by
SetBGIModePages (2);
InitGraph (gd, gm, '');
if (GraphResult = grOk) and (GetBGIModePages=2) then PlayWithPages; }
-procedure SetBGIModePages(p: Integer); asmname '__gr_set_BGI_mode_pages';
-function GetBGIModePages: Integer; asmname '__gr_get_BGI_mode_pages';
+procedure SetBGIModePages(p: CInteger); asmname '__gr_set_BGI_mode_pages';
+function GetBGIModePages: CInteger; asmname '__gr_get_BGI_mode_pages';
{ like GetMaxColor, GetMaxX, GetMaxY but for any available mode }
-function GetModeMaxColor(Mode: Integer): Integer; asmname '__gr_getmodemaxcolor';
-function GetModeMaxX(Mode: Integer): Integer; asmname '__gr_getmodemaxx';
-function GetModeMaxY(Mode: Integer): Integer; asmname '__gr_getmodemaxy';
+function GetModeMaxColor(Mode: CInteger): CInteger; asmname '__gr_getmodemaxcolor';
+function GetModeMaxX(Mode: CInteger): CInteger; asmname '__gr_getmodemaxx';
+function GetModeMaxY(Mode: CInteger): CInteger; asmname '__gr_getmodemaxy';
{ Set the actual drawing color to r/g/b.
Functional in HiColor/TrueColor modes only }
-procedure SetRGBColor(Red, Green, Blue: Word); asmname '__gr_setrgbcolor';
+procedure SetRGBColor(Red, Green, Blue: CCardinal); asmname '__gr_setrgbcolor';
{ Returns the actual RGB palette. Functional in
256 color modes only. Won't work on Linux systems }
-procedure GetRGBPalette(Color: Integer; var Red, Green, Blue: Integer); asmname '__getrgbpalette';
+procedure GetRGBPalette(Color: CInteger; var Red, Green, Blue: CInteger); asmname '__getrgbpalette';
{ Transforms the predefined 16 EGA colors (RED, BLUE, MAGENTA, ...)
into the correct color value for the active graphics mode }
-function EGAColor(EGACol: Integer): Integer; asmname '_ega_color';
+function EGAColor(EGACol: CInteger): CInteger; asmname '_ega_color';
{ Enable/disable linestyle drawing of vector fonts.
Currently only functional with GRX v1.x }
procedure TextLineStyle(On: Boolean); asmname '__gr_textlinestyle';
{ Counterparts of SetActivePage/SetVisualPage }
-function GetActivePage: Integer; asmname '__gr_getactivepage';
-function GetVisualPage: Integer; asmname '__gr_getvisualpage';
+function GetActivePage: CInteger; asmname '__gr_getactivepage';
+function GetVisualPage: CInteger; asmname '__gr_getvisualpage';
{$ifndef NO_GRAPH_KEY_FUNCTIONS}
function KeyPressed: Boolean; asmname 'kbhit';
@@ -472,32 +476,43 @@
implementation
-function gem(ec: Integer): CString; asmname 'grapherrormsg';
-function GraphErrorMsg(ErrorCode: Integer): WrkString;
+procedure ig(var gd, gm: CInteger; PathToDriver: CString); asmname 'initgraph';
+procedure InitGraph(var GraphDriver, GraphMode: Integer; PathToDriver: CString);
+var gd, gm: CInteger;
+begin
+ gd := GraphDriver;
+ gm := GraphMode;
+ ig (gd, gm, PathToDriver);
+ GraphDriver := gd;
+ GraphMode := gm
+end;
+
+function gem(ec: CInteger): CString; asmname 'grapherrormsg';
+function GraphErrorMsg(ErrorCode: CInteger): WrkString;
begin
- GraphErrorMsg := CString2String(gem(ErrorCode));
+ GraphErrorMsg := CString2String (gem (ErrorCode))
end;
-function gmn(mn: Integer): CString; asmname 'getmodename';
-function GetModeName(ModeNumber: Integer): WrkString;
+function gmn(mn: CInteger): CString; asmname 'getmodename';
+function GetModeName(ModeNumber: CInteger): WrkString;
begin
- GetModeName := CString2String(gmn(ModeNumber));
+ GetModeName := CString2String (gmn (ModeNumber))
end;
function gdn: CString; asmname 'getdrivername';
function GetDriverName: WrkString;
begin
- GetDriverName := CString2String(gdn);
+ GetDriverName := CString2String (gdn)
end;
type pPT = ^PaletteType;
function gdp: pPT; asmname '__gr_getdefaultpalette';
procedure GetDefaultPalette(var Palette: PaletteType);
begin
- Palette := gdp^;
+ Palette := gdp^
end;
-function InstallUserDriver(const DriverName: String; AutoDetectPtr: Pointer):Integer;
+function InstallUserDriver(const DriverName: String; AutoDetectPtr: Pointer):CInteger;
var
Dummy1: Integer;
Dummy2: Pointer;
@@ -507,89 +522,89 @@
InstallUserDriver := GrError
end;
-function RegisterBGIdriver(Driver: Pointer): Integer;
+function RegisterBGIdriver(Driver: Pointer): CInteger;
var Dummy: Pointer;
begin
Dummy := Driver;
RegisterBGIdriver := GrError
end;
-function Black: Integer;
+function Black: CInteger;
begin
Black := EGAColor (0)
end;
-function Blue: Integer;
+function Blue: CInteger;
begin
Blue := EGAColor (1)
end;
-function Green: Integer;
+function Green: CInteger;
begin
Green := EGAColor (2)
end;
-function Cyan: Integer;
+function Cyan: CInteger;
begin
Cyan := EGAColor (3)
end;
-function Red: Integer;
+function Red: CInteger;
begin
Red := EGAColor (4)
end;
-function Magenta: Integer;
+function Magenta: CInteger;
begin
Magenta := EGAColor (5)
end;
-function Brown: Integer;
+function Brown: CInteger;
begin
Brown := EGAColor (6)
end;
-function LightGray: Integer;
+function LightGray: CInteger;
begin
LightGray := EGAColor (7)
end;
-function DarkGray: Integer;
+function DarkGray: CInteger;
begin
DarkGray := EGAColor (8)
end;
-function LightBlue: Integer;
+function LightBlue: CInteger;
begin
LightBlue := EGAColor (9)
end;
-function LightGreen: Integer;
+function LightGreen: CInteger;
begin
LightGreen := EGAColor (10)
end;
-function LightCyan: Integer;
+function LightCyan: CInteger;
begin
LightCyan := EGAColor (11)
end;
-function LightRed: Integer;
+function LightRed: CInteger;
begin
LightRed := EGAColor (12)
end;
-function LightMagenta: Integer;
+function LightMagenta: CInteger;
begin
LightMagenta := EGAColor (13)
end;
-function Yellow: Integer;
+function Yellow: CInteger;
begin
Yellow := EGAColor (14)
end;
-function White: Integer;
+function White: CInteger;
begin
White := EGAColor (15)
end;
--- grx246/pascal/grx.pas.orig Sun Mar 28 23:15:23 2004
+++ grx246/pascal/grx.pas Fri Sep 17 19:17:49 2004
@@ -52,6 +52,11 @@
{$else}
{$define varasmname external; asmname}
{$endif}
+{$if __GPC_RELEASE__ < 20040917}
+type
+ CInteger = Integer;
+ CCardinal = Cardinal;
+{$endif}
const
MaxVarSize = MaxInt div 8;
@@ -70,7 +75,7 @@
{ This definition is compatible with the grx
definition 'int pts[][2]' used to define polygons }
PointType = record
- x, y: Integer;
+ x, y: CInteger
end;
const
@@ -94,9 +99,9 @@
Gr_Width_Height_Graphics = 6; { Integer w,Integer h }
Gr_Biggest_Noninterlaced_Graphics = 7;
Gr_Biggest_Graphics = 8;
- Gr_Width_Height_Color_Graphics = 9; { Integer w,Integer h,Word nc }
- Gr_Width_Height_Color_Text = 10; { Integer w,Integer h,Word nc }
- Gr_Custom_Graphics = 11; { Integer w,Integer h,Word nc,Integer vx,Integer vy }
+ Gr_Width_Height_Color_Graphics = 9; { Integer w,Integer h,Cardinal nc }
+ Gr_Width_Height_Color_Text = 10; { Integer w,Integer h,Cardinal nc }
+ Gr_Custom_Graphics = 11; { Integer w,Integer h,Cardinal nc,Integer vx,Integer vy }
{ ==== equivalent modes which do not clear the video memory ==== }
Gr_NC_80_25_Text = 12;
Gr_NC_Default_Text = 13;
@@ -107,17 +112,17 @@
Gr_NC_Width_Height_Graphics = 18; { Integer w,Integer h }
Gr_NC_Biggest_Noninterlaced_Graphics = 19;
Gr_NC_Biggest_Graphics = 20;
- Gr_NC_Width_Height_Color_Graphics = 21; { Integer w,Integer h,Word nc }
- Gr_NC_Width_Height_Color_Text = 22; { Integer w,Integer h,Word nc }
- Gr_NC_Custom_Graphics = 23; { Integer w,Integer h,Word nc,Integer vx,Integer vy }
+ Gr_NC_Width_Height_Color_Graphics = 21; { Integer w,Integer h,Cardinal nc }
+ Gr_NC_Width_Height_Color_Text = 22; { Integer w,Integer h,Cardinal nc }
+ Gr_NC_Custom_Graphics = 23; { Integer w,Integer h,Cardinal nc,Integer vx,Integer vy }
{ ==== plane instead of color based modes ==== }
{ colors = 1 << bpp >>> resort enum for GRX3 <<< }
- Gr_Width_Height_BPP_Graphics = 24; { int w,int h,int bpp }
- Gr_Width_Height_BPP_Text = 25; { int w,int h,int bpp }
- Gr_Custom_BPP_Graphics = 26; { int w,int h,int bpp,int vx,int vy }
- Gr_NC_Width_Height_BPP_Graphics = 27; { int w,int h,int bpp }
- Gr_NC_Width_Height_BPP_Text = 28; { int w,int h,int bpp }
- Gr_NC_Custom_BPP_Graphics = 29; { int w,int h,int bpp,int vx,int vy }
+ Gr_Width_Height_BPP_Graphics = 24; { Integer w,Integer h,Integer bpp }
+ Gr_Width_Height_BPP_Text = 25; { Integer w,Integer h,Integer bpp }
+ Gr_Custom_BPP_Graphics = 26; { Integer w,Integer h,Integer bpp,Integer vx,Integer vy }
+ Gr_NC_Width_Height_BPP_Graphics = 27; { Integer w,Integer h,Integer bpp }
+ Gr_NC_Width_Height_BPP_Text = 28; { Integer w,Integer h,Integer bpp }
+ Gr_NC_Custom_BPP_Graphics = 29; { Integer w,Integer h,Integer bpp,Integer vx,Integer vy }
{ Available frame modes (video memory layouts) }
@@ -195,27 +200,27 @@
GrVideoDriverPtr = ^GrVideoDriver;
GrVideoDriver = record
Name : CString; { driver name }
- Adapter : Integer; { adapter type }
+ Adapter : CInteger; { adapter type }
Inherit : GrVideoDriverPtr; { inherit video modes from this }
Modes : GrVideoModePtr; { table of supported modes }
- NModes : Integer; { number of modes }
- Detect : function: Integer;
- Init : function (Options: CString): Integer;
+ NModes : CInteger; { number of modes }
+ Detect : function: CInteger;
+ Init : function (Options: CString): CInteger;
Reset : procedure;
- SelectMode: function (Drv: GrVideoDriverPtr; w, h, BPP, txt: Integer; var ep: Cardinal): GrVideoModePtr;
- DrvFlags : Cardinal;
+ SelectMode: function (Drv: GrVideoDriverPtr; w, h, BPP, txt: CInteger; var ep: CCardinal): GrVideoModePtr;
+ DrvFlags : CCardinal
end;
{ Video driver mode descriptor structure }
{ struct _GR_videoMode }
GrVideoMode = record
- Present : ByteBool; { is it really available? }
- BPP : Byte; { log2 of # of colors }
- Width,Height: ShortInt; { video mode geometry }
- Mode : ShortInt; { BIOS mode number (if any) }
- LineOffset : Integer; { scan line length }
- PrivData : Integer; { driver can use it for anything }
- ExtInfo : ^GrVideoModeExt; { extra info (maybe shared) }
+ Present: ByteBool; { is it really available? }
+ BPP: Byte; { log2 of # of colors }
+ Width, Height, { video mode geometry }
+ Mode: ShortInt; { BIOS mode number (if any) }
+ LineOffset, { scan line length }
+ PrivData: CInteger; { driver can use it for anything }
+ ExtInfo: ^GrVideoModeExt { extra info (maybe shared) }
end;
{ Video driver mode descriptor extension structure. This is a separate
@@ -224,21 +229,21 @@
extended info. }
{ struct _GR_videoModeExt }
- Int2 = array [0 .. 1] of Integer;
+ Int2 = array [0 .. 1] of CInteger;
GrVideoModeExt = record
- Mode : Integer; { frame driver for this video mode }
+ Mode : CInteger; { frame driver for this video mode }
Drv : ^GrFrameDriver; { optional frame driver override }
Frame : MemPtr; { frame buffer address }
CPrec : array [1 .. 3] of ByteCard; { color component precisions }
CPos : array [1 .. 3] of ByteCard; { color component bit positions }
- Flags : Integer; { mode flag bits; see "grdriver.h" }
- Setup : function (var md: GrVideoMode; NoClear: Integer): Integer;
- SetVSize : function (var md: GrVideoMode; w, h: Integer; var Result: GrVideoMode): Integer;
- Scroll : function (var md: GrVideoMode; x, y: Integer; var Result: Int2): Integer;
- SetBank : procedure (bk: Integer);
- SetRWBanks : procedure (rb, wb: Integer);
- LoadColor : procedure (c, r, g, b: Integer);
- LFB_Selector: Integer;
+ Flags : CInteger; { mode flag bits; see "grdriver.h" }
+ Setup : function (var md: GrVideoMode; NoClear: CInteger): CInteger;
+ SetVSize : function (var md: GrVideoMode; w, h: CInteger; var Result: GrVideoMode): CInteger;
+ Scroll : function (var md: GrVideoMode; x, y: CInteger; var Result: Int2): CInteger;
+ SetBank : procedure (bk: CInteger);
+ SetRWBanks : procedure (rb, wb: CInteger);
+ LoadColor : procedure (c, r, g, b: CInteger);
+ LFB_Selector: CInteger
end;
GrFrameDriverPtr = ^GrFrameDriver;
@@ -248,59 +253,59 @@
gf_Selector : ShortInt; { frame memory segment selector }
gf_OnScreen : ByteBool; { is it in video memory ? }
gf_MemFlags : Byte; { memory allocation flags }
- gf_LineOffset: Integer; { offset to next scan line in bytes }
- gf_Driver : GrFrameDriverPtr; { frame access functions }
+ gf_LineOffset: CInteger; { offset to next scan line in bytes }
+ gf_Driver : GrFrameDriverPtr { frame access functions }
end;
{ The frame driver descriptor structure. }
{ struct _GR_frameDriver }
GrFrameDriver = record
- Mode : Integer; { supported frame access mode }
- RMode : Integer; { matching RAM frame (if video) }
- Is_Video : Integer; { video RAM frame driver ? }
- Row_Align : Integer; { scan line size alignment }
- Num_Planes : Integer; { number of planes }
- Bits_Per_Pixel : Integer; { bits per pixel }
- Max_Plane_Size : MedInt; { maximum plane size in bytes }
- Init : function (var md: GrVideoMode): Integer;
- ReadPixel : function (var c: GrFrameType; x, y: Integer): GrColor;
- DrawPixel : procedure (x, y: Integer; c: GrColor);
- DrawLine : procedure (x, y, dx, dy: Integer; c: GrColor);
- DrawHLine : procedure (x, y, w: Integer; c: GrColor);
- DrawVLine : procedure (x, y, h: Integer; c: GrColor);
- DrawBlock : procedure (x, y, w, h: Integer; c: GrColor);
- DrawBitmap : procedure (x, y, w, h: Integer; BMP: MemPtr; Pitch, Start: Integer; fg, bg: GrColor);
- DrawPattern : procedure (x, y, w: Integer; Patt: Byte; fg, bg: GrColor);
- BitBlt : procedure (var Dst: GrFrameType; dx, dy: Integer; var Src: GrFrameType; x, y, w, h: Integer; Op: GrColor);
- BltV2R : procedure (var Dst: GrFrameType; dx, dy: Integer; var Src: GrFrameType; x, y, w, h: Integer; Op: GrColor);
- BltR2V : procedure (var Dst: GrFrameType; dx, dy: Integer; var Src: GrFrameType; x, y, w, h: Integer; Op: GrColor);
- GetIndexedScanline: function (var c: GrFrameType; x, y, w: Integer; var Index: Integer): GrColorsPtr;
- PutScanLine : procedure (x, y, w: Integer; scl: GrColorsPtr; Op: GrColor);
+ Mode, { supported frame access mode }
+ RMode, { matching RAM frame (if video) }
+ Is_Video, { video RAM frame driver ? }
+ Row_Align, { scan line size alignment }
+ Num_Planes, { number of planes }
+ Bits_Per_Pixel : CInteger; { bits per pixel }
+ Max_Plane_Size : MedInt; { maximum plane size in bytes }
+ Init : function (var md: GrVideoMode): CInteger;
+ ReadPixel : function (var c: GrFrameType; x, y: CInteger): GrColor;
+ DrawPixel : procedure (x, y: CInteger; c: GrColor);
+ DrawLine : procedure (x, y, dx, dy: CInteger; c: GrColor);
+ DrawHLine : procedure (x, y, w: CInteger; c: GrColor);
+ DrawVLine : procedure (x, y, h: CInteger; c: GrColor);
+ DrawBlock : procedure (x, y, w, h: CInteger; c: GrColor);
+ DrawBitmap : procedure (x, y, w, h: CInteger; BMP: MemPtr; Pitch, Start: CInteger; fg, bg: GrColor);
+ DrawPattern : procedure (x, y, w: CInteger; Patt: Byte; fg, bg: GrColor);
+ BitBlt : procedure (var Dst: GrFrameType; dx, dy: CInteger; var Src: GrFrameType; x, y, w, h: CInteger; Op: GrColor);
+ BltV2R : procedure (var Dst: GrFrameType; dx, dy: CInteger; var Src: GrFrameType; x, y, w, h: CInteger; Op: GrColor);
+ BltR2V : procedure (var Dst: GrFrameType; dx, dy: CInteger; var Src: GrFrameType; x, y, w, h: CInteger; Op: GrColor);
+ GetIndexedScanline: function (var c: GrFrameType; x, y, w: CInteger; var Index: CInteger): GrColorsPtr;
+ PutScanLine : procedure (x, y, w: CInteger; scl: GrColorsPtr; Op: GrColor);
end;
{ driver and mode info structure }
{ extern const struct _GR_driverInfo }
GrDriverInfoType = record
- VDriver : GrVideoDriverPtr; { the current video driver }
- CurMode : GrVideoModePtr; { current video mode pointer }
- ActMode : GrVideoMode; { copy of above, resized if virtual }
- FDriver : GrFrameDriver; { frame driver for the current context }
- SDriver : GrFrameDriver; { frame driver for the screen }
- TDriver : GrFrameDriver; { a dummy driver for text modes }
- MCode : Integer; { code for the current mode }
- DefTW,DefTH: Integer; { default text mode size }
- DefGW,DefGH: Integer; { default graphics mode size }
- DefTC,DefGC: GrColor; { default text and graphics colors }
- VPosX,VPosY: Integer; { current virtual viewport position }
- ErrsFatal : Integer; { if set, exit upon errors }
- ModeRestore: Integer; { restore startup video mode if set }
- SplitBanks : Integer; { indicates separate R/W banks }
- CurBank : Integer; { currently mapped bank }
- MdSetHook : procedure; { callback for mode set }
- SetBank : procedure (bk: Integer); { banking routine }
- SetRWBanks : procedure (rb, wb: Integer); { split banking routine }
+ VDriver : GrVideoDriverPtr; { the current video driver }
+ CurMode : GrVideoModePtr; { current video mode pointer }
+ ActMode : GrVideoMode; { copy of above, resized if virtual }
+ FDriver, { frame driver for the current context }
+ SDriver, { frame driver for the screen }
+ TDriver : GrFrameDriver; { a dummy driver for text modes }
+ MCode, { code for the current mode }
+ DefTW,DefTH, { default text mode size }
+ DefGW,DefGH: CInteger; { default graphics mode size }
+ DefTC,DefGC: GrColor; { default text and graphics colors }
+ VPosX,VPosY, { current virtual viewport position }
+ ErrsFatal, { if set, exit upon errors }
+ ModeRestore, { restore startup video mode if set }
+ SplitBanks, { indicates separate R/W banks }
+ CurBank : CInteger; { currently mapped bank }
+ MdSetHook : procedure; { callback for mode set }
+ SetBank : procedure (bk: CInteger); { banking routine }
+ SetRWBanks : procedure (rb, wb: CInteger); { split banking routine }
end;
var
@@ -308,26 +313,26 @@
{ setup stuff }
-function GrSetDriver(DrvSpec: CString):Integer; asmname 'GrSetDriver';
-function GrSetMode(m, w, h, nc, vx, vy:Integer):Integer; asmname 'GrSetMode';
-function GrSetViewport(XPos, YPos: Integer):Integer; asmname 'GrSetViewport';
+function GrSetDriver(DrvSpec: CString):CInteger; asmname 'GrSetDriver';
+function GrSetMode(m, w, h, nc, vx, vy:CInteger):CInteger; asmname 'GrSetMode';
+function GrSetViewport(XPos, YPos: CInteger):CInteger; asmname 'GrSetViewport';
procedure GrSetModeHook(HookFunc:Pointer); asmname 'GrSetModeHook';
procedure GrSetModeRestore(RestoreFlag:Boolean); asmname 'GrSetModeRestore';
procedure GrSetErrorHandling(ExitIfError:Boolean); asmname 'GrSetErrorHandling';
-procedure GrSetEGAVGAmonoDrawnPlane(Plane:Integer); asmname 'GrSetEGAVGAmonoDrawnPlane';
-procedure GrSetEGAVGAmonoShownPlane(Plane:Integer); asmname 'GrSetEGAVGAmonoShownPlane';
+procedure GrSetEGAVGAmonoDrawnPlane(Plane:CInteger); asmname 'GrSetEGAVGAmonoDrawnPlane';
+procedure GrSetEGAVGAmonoShownPlane(Plane:CInteger); asmname 'GrSetEGAVGAmonoShownPlane';
-function GrGetLibraryVersion: Integer; asmname 'GrGetLibraryVersion';
-function GrGetLibrarySystem: Integer; asmname 'GrGetLibrarySystem';
+function GrGetLibraryVersion: CInteger; asmname 'GrGetLibraryVersion';
+function GrGetLibrarySystem: CInteger; asmname 'GrGetLibrarySystem';
{ inquiry stuff ---- many of these can be macros }
-function GrCurrentMode:Integer; asmname 'GrCurrentMode';
-function GrAdapterType:Integer; asmname 'GrAdapterType';
-function GrCurrentFrameMode:Integer; asmname 'GrCurrentFrameMode';
-function GrScreenFrameMode:Integer; asmname 'GrScreenFrameMode';
-function GrCoreFrameMode:Integer; asmname 'GrCoreFrameMode';
+function GrCurrentMode:CInteger; asmname 'GrCurrentMode';
+function GrAdapterType:CInteger; asmname 'GrAdapterType';
+function GrCurrentFrameMode:CInteger; asmname 'GrCurrentFrameMode';
+function GrScreenFrameMode:CInteger; asmname 'GrScreenFrameMode';
+function GrCoreFrameMode:CInteger; asmname 'GrCoreFrameMode';
function GrCurrentVideoDriver: GrVideoDriverPtr; asmname 'GrCurrentVideoDriver' ;
function GrCurrentVideoMode:GrVideoModePtr; asmname 'GrCurrentVideoMode';
@@ -335,28 +340,28 @@
function GrCurrentFrameDriver: GrFrameDriverPtr; asmname 'GrCurrentFrameDriver';
function GrScreenFrameDriver: GrFrameDriverPtr; asmname 'GrScreenFrameDriver';
-function GrFirstVideoMode(FMode:Integer):GrVideoModePtr; asmname 'GrFirstVideoMode';
+function GrFirstVideoMode(FMode:CInteger):GrVideoModePtr; asmname 'GrFirstVideoMode';
function GrNextVideoMode(Prev:GrVideoModePtr):GrVideoModePtr; asmname 'GrNextVideoMode';
-function GrScreenX:Integer; asmname 'GrScreenX';
-function GrScreenY:Integer; asmname 'GrScreenY';
-function GrVirtualX:Integer; asmname 'GrVirtualX';
-function GrVirtualY:Integer; asmname 'GrVirtualY';
-function GrViewportX:Integer; asmname 'GrViewportX';
-function GrViewportY:Integer; asmname 'GrViewportY';
+function GrScreenX:CInteger; asmname 'GrScreenX';
+function GrScreenY:CInteger; asmname 'GrScreenY';
+function GrVirtualX:CInteger; asmname 'GrVirtualX';
+function GrVirtualY:CInteger; asmname 'GrVirtualY';
+function GrViewportX:CInteger; asmname 'GrViewportX';
+function GrViewportY:CInteger; asmname 'GrViewportY';
function GrScreenIsVirtual:Boolean; asmname 'GrScreenIsVirtual';
{ RAM context geometry and memory allocation inquiry stuff }
-function GrFrameNumPlanes(md:Integer):Integer; asmname 'GrFrameNumPlanes';
-function GrFrameLineOffset(md,Width:Integer):Integer; asmname 'GrFrameLineOffset';
-function GrFramePlaneSize(md,w,h:Integer):Integer; asmname 'GrFramePlaneSize';
-function GrFrameContextSize(md,w,h:Integer):Integer; asmname 'GrFrameContextSize';
-
-function GrNumPlanes:Integer; asmname 'GrNumPlanes';
-function GrLineOffset(Width:Integer):Integer; asmname 'GrLineOffset';
-function GrPlaneSize(w,h:Integer):Integer; asmname 'GrPlaneSize';
-function GrContextSize(w,h:Integer):Integer; asmname 'GrContextSize';
+function GrFrameNumPlanes(md:CInteger):CInteger; asmname 'GrFrameNumPlanes';
+function GrFrameLineOffset(md,Width:CInteger):CInteger; asmname 'GrFrameLineOffset';
+function GrFramePlaneSize(md,w,h:CInteger):CInteger; asmname 'GrFramePlaneSize';
+function GrFrameContextSize(md,w,h:CInteger):CInteger; asmname 'GrFrameContextSize';
+
+function GrNumPlanes:CInteger; asmname 'GrNumPlanes';
+function GrLineOffset(Width:CInteger):CInteger; asmname 'GrLineOffset';
+function GrPlaneSize(w,h:CInteger):CInteger; asmname 'GrPlaneSize';
+function GrContextSize(w,h:CInteger):CInteger; asmname 'GrContextSize';
{ ==================================================================
FRAME BUFFER, CONTEXT AND CLIPPING STUFF
@@ -366,54 +371,54 @@
{ struct _GR_context }
GrContextPtr = ^GrContext;
GrContext = record
- gc_Frame : GrFrameType; { frame buffer info }
- gc_Root : GrContextPtr; { context which owns frame }
- gc_XMax : Integer; { max X coord (width - 1) }
- gc_YMax : Integer; { max Y coord (height - 1) }
- gc_XOffset : Integer; { X offset from root's base }
- gc_YOffset : Integer; { Y offset from root's base }
- gc_XClipLo : Integer; { low X clipping limit }
- gc_YClipLo : Integer; { low Y clipping limit }
- gc_XClipHi : Integer; { high X clipping limit }
- gc_YClipHi : Integer; { high Y clipping limit }
- gc_UsrXBase : Integer; { user window min X coordinate }
- gc_UsrYBase : Integer; { user window min Y coordinate }
- gc_UsrWidth : Integer; { user window width }
- gc_UsrHeight: Integer; { user window height }
+ gc_Frame: GrFrameType; { frame buffer info }
+ gc_Root: GrContextPtr; { context which owns frame }
+ gc_XMax, { max X coord (width - 1) }
+ gc_YMax, { max Y coord (height - 1) }
+ gc_XOffset, { X offset from root's base }
+ gc_YOffset, { Y offset from root's base }
+ gc_XClipLo, { low X clipping limit }
+ gc_YClipLo, { low Y clipping limit }
+ gc_XClipHi, { high X clipping limit }
+ gc_YClipHi, { high Y clipping limit }
+ gc_UsrXBase, { user window min X coordinate }
+ gc_UsrYBase, { user window min Y coordinate }
+ gc_UsrWidth, { user window width }
+ gc_UsrHeight: CInteger { user window height }
end;
{ extern const struct _GR_contextInfo }
GrContextInfoType = record
- Current: GrContext; { the current context }
- Screen : GrContext; { the screen context }
+ Current, { the current context }
+ Screen: GrContext { the screen context }
end;
var
GrContextInfo: GrContextInfoType; varasmname 'GrContextInfo';
-function GrCreateContext(w, h: Integer; Memory: MemPtr; Where: GrContextPtr): GrContextPtr; asmname 'GrCreateContext';
-function GrCreateFrameContext(md: ByteCard; w, h: Integer; Memory: MemPtr; Where: GrContextPtr): GrContextPtr; asmname 'GrCreateFrameContext';
-function GrCreateSubContext(x1, y1, x2, y2: Integer; Parent, Where: GrContextPtr): GrContextPtr; asmname 'GrCreateSubContext';
+function GrCreateContext(w, h: CInteger; Memory: MemPtr; Where: GrContextPtr): GrContextPtr; asmname 'GrCreateContext';
+function GrCreateFrameContext(md: ByteCard; w, h: CInteger; Memory: MemPtr; Where: GrContextPtr): GrContextPtr; asmname 'GrCreateFrameContext';
+function GrCreateSubContext(x1, y1, x2, y2: CInteger; Parent, Where: GrContextPtr): GrContextPtr; asmname 'GrCreateSubContext';
function GrSaveContext(Where: GrContextPtr): GrContextPtr; asmname 'GrSaveContext';
function GrCurrentContext: GrContextPtr; asmname 'GrCurrentContext';
function GrScreenContext: GrContextPtr; asmname 'GrScreenContext';
procedure GrDestroyContext(Context: GrContextPtr); asmname 'GrDestroyContext';
-procedure GrResizeSubContext(Context: GrContextPtr; x1, y1, x2, y2: Integer); asmname 'GrResizeSubContext';
+procedure GrResizeSubContext(Context: GrContextPtr; x1, y1, x2, y2: CInteger); asmname 'GrResizeSubContext';
procedure GrSetContext(Context: GrContextPtr); asmname 'GrSetContext';
-procedure GrSetClipBox(x1, y1, x2, y2:Integer); asmname 'GrSetClipBox';
-procedure GrGetClipBox(var x1p, y1p, x2p, y2p: Integer); asmname 'GrGetClipBox';
+procedure GrSetClipBox(x1, y1, x2, y2:CInteger); asmname 'GrSetClipBox';
+procedure GrGetClipBox(var x1p, y1p, x2p, y2p: CInteger); asmname 'GrGetClipBox';
procedure GrResetClipBox; asmname 'GrResetClipBox';
-function GrMaxX: Integer; asmname 'GrMaxX';
-function GrMaxY: Integer; asmname 'GrMaxY';
-function GrSizeX:Integer; asmname 'GrSizeX';
-function GrSizeY:Integer; asmname 'GrSizeY';
-function GrLowX: Integer; asmname 'GrLowX';
-function GrLowY: Integer; asmname 'GrLowY';
-function GrHighX:Integer; asmname 'GrHighX';
-function GrHighY:Integer; asmname 'GrHighY';
+function GrMaxX: CInteger; asmname 'GrMaxX';
+function GrMaxY: CInteger; asmname 'GrMaxY';
+function GrSizeX:CInteger; asmname 'GrSizeX';
+function GrSizeY:CInteger; asmname 'GrSizeY';
+function GrLowX: CInteger; asmname 'GrLowX';
+function GrLowY: CInteger; asmname 'GrLowY';
+function GrHighX:CInteger; asmname 'GrHighX';
+function GrHighY:CInteger; asmname 'GrHighY';
{ ==================================================================
COLOR STUFF
@@ -449,71 +454,71 @@
function GrBlack:GrColor; asmname 'GrBlack';
function GrWhite:GrColor; asmname 'GrWhite';
-function GrBuildRGBcolorT(r,g,b:Integer):GrColor; asmname 'GrBuildRGBcolorT';
-function GrBuildRGBcolorR(r,g,b:Integer):GrColor; asmname 'GrBuildRGBcolorR';
-function GrRGBcolorRed(c:GrColor):Integer ; asmname 'GrRGBcolorRed';
-function GrRGBcolorGreen(c:GrColor):Integer ; asmname 'GrRGBcolorGreen';
-function GrRGBcolorBlue(c:GrColor):Integer ; asmname 'GrRGBcolorBlue';
+function GrBuildRGBcolorT(r,g,b:CInteger):GrColor; asmname 'GrBuildRGBcolorT';
+function GrBuildRGBcolorR(r,g,b:CInteger):GrColor; asmname 'GrBuildRGBcolorR';
+function GrRGBcolorRed(c:GrColor):CInteger ; asmname 'GrRGBcolorRed';
+function GrRGBcolorGreen(c:GrColor):CInteger ; asmname 'GrRGBcolorGreen';
+function GrRGBcolorBlue(c:GrColor):CInteger ; asmname 'GrRGBcolorBlue';
-function GrAllocColor(r,g,b:Integer):GrColor; asmname 'GrAllocColor'; { shared, read-only }
-function GrAllocColorID(r,g,b:Integer):GrColor; asmname 'GrAllocColorID'; { potentially inlined version }
+function GrAllocColor(r,g,b:CInteger):GrColor; asmname 'GrAllocColor'; { shared, read-only }
+function GrAllocColorID(r,g,b:CInteger):GrColor; asmname 'GrAllocColorID'; { potentially inlined version }
function GrAllocCell:GrColor; asmname 'GrAllocCell'; { unshared, read-write }
function GrAllocEgaColors:GrColorsPtr; asmname 'GrAllocEgaColors'; { shared, read-only standard EGA colors }
-procedure GrSetColor(c:GrColor; r,g,b:Integer); asmname 'GrSetColor';
+procedure GrSetColor(c:GrColor; r,g,b:CInteger); asmname 'GrSetColor';
procedure GrFreeColor(c:GrColor); asmname 'GrFreeColor';
procedure GrFreeCell(c:GrColor); asmname 'GrFreeCell';
-procedure GrQueryColor(c:GrColor; var r,g,b:Integer); asmname 'GrQueryColor';
-procedure GrQueryColorID(c:GrColor; var r,g,b:Integer); asmname 'GrQueryColorID';
+procedure GrQueryColor(c:GrColor; var r,g,b:CInteger); asmname 'GrQueryColor';
+procedure GrQueryColorID(c:GrColor; var r,g,b:CInteger); asmname 'GrQueryColorID';
-function GrColorSaveBufferSize:Integer ; asmname 'GrColorSaveBufferSize';
+function GrColorSaveBufferSize:CInteger ; asmname 'GrColorSaveBufferSize';
procedure GrSaveColors(Buffer:Pointer); asmname 'GrSaveColors';
procedure GrRestoreColors(Buffer:Pointer); asmname 'GrRestoreColors';
type
- { typedef struct } { framed box colors }
+ { framed box colors }
GrFBoxColors = record
- fbx_IntColor : GrColor;
- fbx_TopColor : GrColor;
- fbx_RightColor : GrColor;
- fbx_BottomColor: GrColor;
- fbx_LeftColor : GrColor;
+ fbx_IntColor,
+ fbx_TopColor,
+ fbx_RightColor,
+ fbx_BottomColor,
+ fbx_LeftColor: GrColor
end;
procedure GrClearScreen(bg:GrColor); asmname 'GrClearScreen';
procedure GrClearClipBox(bg:GrColor); asmname 'GrClearClipBox';
-procedure GrPlot(x, y: Integer; c:GrColor); asmname 'GrPlot';
-procedure GrLine(x1, y1, x2, y2: Integer; c:GrColor); asmname 'GrLine';
-procedure GrHLine(x1, x2, y:Integer; c:GrColor); asmname 'GrHLine';
-procedure GrVLine(x, y1, y2: Integer; c: GrColor); asmname 'GrVLine';
-procedure GrBox(x1, y1, x2, y2: Integer; c: GrColor); asmname 'GrBox';
-procedure GrFilledBox(x1, y1, x2, y2: Integer; c: GrColor); asmname 'GrFilledBox';
-procedure GrFramedBox(x1, y1, x2, y2, Wdt: Integer; protected var c: GrFBoxColors); asmname 'GrFramedBox';
-function GrGenerateEllipse(xc, yc, xa, ya:Integer; var Points{ : array of PointType }):Integer; asmname 'GrGenerateEllipse';
-function GrGenerateEllipseArc(xc, yc, xa, ya, Start, Ende: Integer; var Points{ : array of PointType }):Integer; asmname 'GrGenerateEllipseArc';
-procedure GrLastArcCoords(var xs, ys, xe, ye, xc, yc: Integer); asmname 'GrLastArcCoords';
-procedure GrCircle(xc, yc, r: Integer; c: GrColor); asmname 'GrCircle';
-procedure GrEllipse(xc, yc, xa, ya: Integer; c: GrColor); asmname 'GrEllipse';
-procedure GrCircleArc(xc, yc, r, Start, Ende, Style: Integer; c: GrColor); asmname 'GrCircleArc';
-procedure GrEllipseArc(xc, yc, xa, ya, Start, Ende, Style: Integer; c: GrColor); asmname 'GrEllipseArc';
-procedure GrFilledCircle(xc, yc, r: Integer; c: GrColor); asmname 'GrFilledCircle';
-procedure GrFilledEllipse(xc, yc, xa, ya: Integer; c: GrColor); asmname 'GrFilledEllipse';
-procedure GrFilledCircleArc(xc, yc, r, Start, Ende, Style: Integer; c: GrColor); asmname 'GrFilledCircleArc';
-procedure GrFilledEllipseArc(xc, yc, xa, ya, Start, Ende, Style: Integer; c: GrColor); asmname 'GrFilledEllipseArc';
-procedure GrPolyLine(NumPts: Integer; var Points{ : array of PointType }; c: GrColor); asmname 'GrPolyLine';
-procedure GrPolygon(NumPts: Integer; var Points{ : array of PointType }; c: GrColor); asmname 'GrPolygon';
-procedure GrFilledConvexPolygon(NumPts: Integer; var Points{ : array of PointType }; c: GrColor); asmname 'GrFilledConvexPolygon';
-procedure GrFilledPolygon(NumPts: Integer; var Points{ : array of PointType }; c: GrColor); asmname 'GrFilledPolygon';
-procedure GrBitBlt(Dest: GrContextPtr; x, y: Integer; Src: GrContextPtr; x1, y1, x2, y2: Integer; Op: GrColor); asmname 'GrBitBlt';
-function GrPixel(x, y:Integer):GrColor; asmname 'GrPixel';
-function GrPixelC(c: GrContextPtr; x, y: Integer): GrColor; asmname 'GrPixelC';
+procedure GrPlot(x, y: CInteger; c:GrColor); asmname 'GrPlot';
+procedure GrLine(x1, y1, x2, y2: CInteger; c:GrColor); asmname 'GrLine';
+procedure GrHLine(x1, x2, y:CInteger; c:GrColor); asmname 'GrHLine';
+procedure GrVLine(x, y1, y2: CInteger; c: GrColor); asmname 'GrVLine';
+procedure GrBox(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrBox';
+procedure GrFilledBox(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrFilledBox';
+procedure GrFramedBox(x1, y1, x2, y2, Wdt: CInteger; protected var c: GrFBoxColors); asmname 'GrFramedBox';
+function GrGenerateEllipse(xc, yc, xa, ya:CInteger; var Points{ : array of PointType }):CInteger; asmname 'GrGenerateEllipse';
+function GrGenerateEllipseArc(xc, yc, xa, ya, Start, Ende: CInteger; var Points{ : array of PointType }):CInteger; asmname 'GrGenerateEllipseArc';
+procedure GrLastArcCoords(var xs, ys, xe, ye, xc, yc: CInteger); asmname 'GrLastArcCoords';
+procedure GrCircle(xc, yc, r: CInteger; c: GrColor); asmname 'GrCircle';
+procedure GrEllipse(xc, yc, xa, ya: CInteger; c: GrColor); asmname 'GrEllipse';
+procedure GrCircleArc(xc, yc, r, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrCircleArc';
+procedure GrEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrEllipseArc';
+procedure GrFilledCircle(xc, yc, r: CInteger; c: GrColor); asmname 'GrFilledCircle';
+procedure GrFilledEllipse(xc, yc, xa, ya: CInteger; c: GrColor); asmname 'GrFilledEllipse';
+procedure GrFilledCircleArc(xc, yc, r, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrFilledCircleArc';
+procedure GrFilledEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrFilledEllipseArc';
+procedure GrPolyLine(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrPolyLine';
+procedure GrPolygon(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrPolygon';
+procedure GrFilledConvexPolygon(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrFilledConvexPolygon';
+procedure GrFilledPolygon(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrFilledPolygon';
+procedure GrBitBlt(Dest: GrContextPtr; x, y: CInteger; Src: GrContextPtr; x1, y1, x2, y2: CInteger; Op: GrColor); asmname 'GrBitBlt';
+function GrPixel(x, y:CInteger):GrColor; asmname 'GrPixel';
+function GrPixelC(c: GrContextPtr; x, y: CInteger): GrColor; asmname 'GrPixelC';
-procedure GrFloodFill(x, y: Integer; Border, c: GrColor); asmname 'GrFloodFill';
+procedure GrFloodFill(x, y: CInteger; Border, c: GrColor); asmname 'GrFloodFill';
-function GrGetScanline(x1,x2,yy: Integer): GrColorsPtr; asmname 'GrGetScanline';
-function GrGetScanlineC(ctx: GrContextPtr; x1,x2,yy: Integer): GrColorsPtr; asmname 'GrGetScanlineC';
+function GrGetScanline(x1,x2,yy: CInteger): GrColorsPtr; asmname 'GrGetScanline';
+function GrGetScanlineC(ctx: GrContextPtr; x1,x2,yy: CInteger): GrColorsPtr; asmname 'GrGetScanlineC';
{ Input ctx: source context, if NULL the current context is used }
{ x1 : first x coordinate read }
{ x2 : last x coordinate read }
@@ -524,7 +529,7 @@
{ (w = |x2-y1|) }
{ Output data is valid until next GRX call ! }
-procedure GrPutScanline(x1,x2,yy: Integer;c: GrColorsPtr; Op: GrColor); asmname 'GrPutScanline';
+procedure GrPutScanline(x1,x2,yy: CInteger;c: GrColorsPtr; Op: GrColor); asmname 'GrPutScanline';
{ Input x1: first x coordinate to be set }
{ x2: last x coordinate to be set }
{ yy: y coordinate }
@@ -540,16 +545,16 @@
NON CLIPPING DRAWING PRIMITIVES
================================================================== }
-procedure GrPlotNC(x, y: Integer; c: GrColor); asmname 'GrPlotNC';
-procedure GrLineNC(x1, y1, x2, y2: Integer; c: GrColor); asmname 'GrLineNC';
-procedure GrHLineNC(x1, x2, y: Integer; c: GrColor); asmname 'GrHLineNC';
-procedure GrVLineNC(x, y1, y2: Integer; c: GrColor); asmname 'GrVLineNC';
-procedure GrBoxNC(x1, y1, x2, y2: Integer; c: GrColor); asmname 'GrBoxNC';
-procedure GrFilledBoxNC(x1, y1, x2, y2: Integer; c: GrColor); asmname 'GrFilledBoxNC';
-procedure GrFramedBoxNC(x1, y1, x2, y2, Wdt: Integer; protected var c: GrFBoxColors); asmname 'GrFramedBoxNC';
-procedure GrBitBltNC(Dest: GrContextPtr; x, y: Integer; Src: GrContextPtr; x1, y1, x2, y2: Integer; Op: GrColor); asmname 'GrBitBltNC';
-function GrPixelNC(x, y:Integer):GrColor; asmname 'GrPixelNC';
-function GrPixelCNC(c: GrContextPtr; x, y: Integer): GrColor; asmname 'GrPixelCNC';
+procedure GrPlotNC(x, y: CInteger; c: GrColor); asmname 'GrPlotNC';
+procedure GrLineNC(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrLineNC';
+procedure GrHLineNC(x1, x2, y: CInteger; c: GrColor); asmname 'GrHLineNC';
+procedure GrVLineNC(x, y1, y2: CInteger; c: GrColor); asmname 'GrVLineNC';
+procedure GrBoxNC(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrBoxNC';
+procedure GrFilledBoxNC(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrFilledBoxNC';
+procedure GrFramedBoxNC(x1, y1, x2, y2, Wdt: CInteger; protected var c: GrFBoxColors); asmname 'GrFramedBoxNC';
+procedure GrBitBltNC(Dest: GrContextPtr; x, y: CInteger; Src: GrContextPtr; x1, y1, x2, y2: CInteger; Op: GrColor); asmname 'GrBitBltNC';
+function GrPixelNC(x, y:CInteger):GrColor; asmname 'GrPixelNC';
+function GrPixelCNC(c: GrContextPtr; x, y: CInteger): GrColor; asmname 'GrPixelCNC';
{ ==================================================================
FONTS AND TEXT PRIMITIVES
@@ -593,41 +598,41 @@
{ font structures }
type
- { typedef struct _GR_fontHeader } { font descriptor }
+ { font descriptor }
GrFontHeader = record
- Name : CString; { font name }
- Family : CString; { font family name }
- Proportional: ByteBool; { characters have varying width }
- Scalable : ByteBool; { derived from a scalable font }
- Preloaded : ByteBool; { set when linked Integero program }
- Modified : ByteBool; { "tweaked" font (resized, etc..) }
- Width : Cardinal; { width (proportional=>average) }
- Height : Cardinal; { font height }
- Baseline : Cardinal; { baseline pixel pos (from top) }
- ULPos : Cardinal; { underline pixel pos (from top) }
- ULHeight : Cardinal; { underline width }
- MinChar : Cardinal; { lowest character code in font }
- NumChars : Cardinal; { number of characters in font }
+ Name, { font name }
+ Family: CString; { font family name }
+ Proportional, { characters have varying width }
+ Scalable, { derived from a scalable font }
+ Preloaded, { set when linked Integero program }
+ Modified: ByteBool; { "tweaked" font (resized, etc..) }
+ Width, { width (proportional=>average) }
+ Height, { font height }
+ Baseline, { baseline pixel pos (from top) }
+ ULPos, { underline pixel pos (from top) }
+ ULHeight, { underline width }
+ MinChar, { lowest character code in font }
+ NumChars: CCardinal { number of characters in font }
end;
- { typedef struct _GR_fontChrInfo } { character descriptor }
+ { character descriptor }
GrFontChrInfo = record
- Width : Cardinal; { width of this character }
- Offset: Cardinal; { offset from start of bitmap }
+ Width, { width of this character }
+ Offset: CCardinal { offset from start of bitmap }
end;
- { typedef struct _GR_font } { the complete font }
- AuxOffsType = array [0 .. 6] of Integer;
+ { the complete font }
+ AuxOffsType = array [0 .. 6] of CInteger;
GrFont = record
- h : GrFontHeader; { the font info structure }
- BitMap : MemPtr; { character bitmap array }
- AuxMap : MemPtr; { map for rotated & underline chrs }
- MinWidth: Cardinal; { width of narrowest character }
- MaxWidth: Cardinal; { width of widest character }
- AuxSize : Cardinal; { allocated size of auxiliary map }
- AuxNext : Cardinal; { next free byte in auxiliary map }
- AuxOffs : ^AuxOffsType; { offsets to completed aux chars }
- ChrInfo : array [1 .. 1] of GrFontChrInfo; { character info (not act. size) }
+ h: GrFontHeader; { the font info structure }
+ BitMap, { character bitmap array }
+ AuxMap: MemPtr; { map for rotated & underline chrs }
+ MinWidth, { width of narrowest character }
+ MaxWidth, { width of widest character }
+ AuxSize, { allocated size of auxiliary map }
+ AuxNext: CCardinal; { next free byte in auxiliary map }
+ AuxOffs: ^AuxOffsType; { offsets to completed aux chars }
+ ChrInfo: array [1 .. 1] of GrFontChrInfo { character info (not act. size) }
end;
GrFontPtr = ^GrFont;
@@ -639,74 +644,74 @@
GrDefaultFont: GrFont; varasmname 'GrFont_PC8x14';
function GrLoadFont(FontName: CString): GrFontPtr; asmname 'GrLoadFont';
-function GrLoadConvertedFont(FontName: CString; cvt, w, h, MinCh, MaxCh: Integer): GrFontPtr; asmname 'GrLoadConvertedFont';
-function GrBuildConvertedFont(protected var From: GrFont; cvt, w, h, MinCh, MaxCh: Integer): GrFontPtr; asmname 'GrBuildConvertedFont';
+function GrLoadConvertedFont(FontName: CString; cvt, w, h, MinCh, MaxCh: CInteger): GrFontPtr; asmname 'GrLoadConvertedFont';
+function GrBuildConvertedFont(protected var From: GrFont; cvt, w, h, MinCh, MaxCh: CInteger): GrFontPtr; asmname 'GrBuildConvertedFont';
procedure GrUnloadFont(var Font: GrFont); asmname 'GrUnloadFont';
procedure GrDumpFont(protected var f: GrFont; CsymbolName, FileName: CString); asmname 'GrDumpFont';
procedure GrSetFontPath(path_list: CString); asmname 'GrSetFontPath';
-function GrFontCharPresent(protected var Font: GrFont; Chr: Integer): Boolean; asmname 'GrFontCharPresent';
-function GrFontCharWidth(protected var Font: GrFont; Chr: Integer): Integer; asmname 'GrFontCharWidth';
-function GrFontCharHeight(protected var Font: GrFont; Chr: Integer): Integer; asmname 'GrFontCharHeight';
-function GrFontCharBmpRowSize(protected var Font: GrFont; Chr: Integer): Integer; asmname 'GrFontCharBmpRowSize';
-function GrFontCharBitmapSize(protected var Font: GrFont; Chr: Integer): Integer; asmname 'GrFontCharBitmapSize';
-function GrFontStringWidth(protected var Font: GrFont; Text: CString; Len, Typ_e: Integer): Integer; asmname 'GrFontStringWidth';
-function GrFontStringHeight(protected var Font: GrFont; Text: CString; Len, Typ_e: Integer): Integer; asmname 'GrFontStringHeight';
-function GrProportionalTextWidth(protected var Font: GrFont; Text: CString; Len, Typ_e: Integer): Integer; asmname 'GrProportionalTextWidth';
-function GrBuildAuxiliaryBitmap(var Font: GrFont; Chr, Dir, ul: Integer): MemPtr; asmname 'GrBuildAuxiliaryBitmap';
-function GrFontCharBitmap(protected var Font: GrFont; Chr: Integer): MemPtr; asmname 'GrFontCharBitmap';
-function GrFontCharAuxBmp(var Font: GrFont; Chr, Dir, ul: Integer): MemPtr; asmname 'GrFontCharAuxBmp';
+function GrFontCharPresent(protected var Font: GrFont; Chr: CInteger): Boolean; asmname 'GrFontCharPresent';
+function GrFontCharWidth(protected var Font: GrFont; Chr: CInteger): CInteger; asmname 'GrFontCharWidth';
+function GrFontCharHeight(protected var Font: GrFont; Chr: CInteger): CInteger; asmname 'GrFontCharHeight';
+function GrFontCharBmpRowSize(protected var Font: GrFont; Chr: CInteger): CInteger; asmname 'GrFontCharBmpRowSize';
+function GrFontCharBitmapSize(protected var Font: GrFont; Chr: CInteger): CInteger; asmname 'GrFontCharBitmapSize';
+function GrFontStringWidth(protected var Font: GrFont; Text: CString; Len, Typ_e: CInteger): CInteger; asmname 'GrFontStringWidth';
+function GrFontStringHeight(protected var Font: GrFont; Text: CString; Len, Typ_e: CInteger): CInteger; asmname 'GrFontStringHeight';
+function GrProportionalTextWidth(protected var Font: GrFont; Text: CString; Len, Typ_e: CInteger): CInteger; asmname 'GrProportionalTextWidth';
+function GrBuildAuxiliaryBitmap(var Font: GrFont; Chr, Dir, ul: CInteger): MemPtr; asmname 'GrBuildAuxiliaryBitmap';
+function GrFontCharBitmap(protected var Font: GrFont; Chr: CInteger): MemPtr; asmname 'GrFontCharBitmap';
+function GrFontCharAuxBmp(var Font: GrFont; Chr, Dir, ul: CInteger): MemPtr; asmname 'GrFontCharAuxBmp';
type
GrColorTableP = ^GrColors;
- { typedef union _GR_textColor } { text color union }
+ { text color union }
GrTextColor = record
case 1 .. 2 of
1: (v: GrColor); { color value for "direct" text }
2: (p: GrColorTableP); { color table for attribute text }
end;
- { typedef struct _GR_textOption } { text drawing option structure }
+ { text drawing option structure }
GrTextOption = record
- txo_Font : GrFontPtr; { font to be used }
- txo_FgColor: GrTextColor; { foreground color }
+ txo_Font: GrFontPtr; { font to be used }
+ txo_FgColor, { foreground color }
txo_BgColor: GrTextColor; { background color }
- txo_ChrType: ByteCard; { character type (see above) }
- txo_Direct : ByteCard; { direction (see above) }
- txo_XAlign : ByteCard; { X alignment (see above) }
- txo_YAlign : ByteCard; { Y alignment (see above) }
+ txo_ChrType, { character type (see above) }
+ txo_Direct, { direction (see above) }
+ txo_XAlign, { X alignment (see above) }
+ txo_YAlign: ByteCard { Y alignment (see above) }
end;
- { typedef struct } { fixed font text window desc. }
+ { fixed font text window desc. }
GrTextRegion = record
- txr_Font : GrTextColor; { font to be used }
- txr_FgColor : GrTextColor; { foreground color }
- txr_BgColor : GrTextColor; { background color }
- txr_Buffer : Pointer; { pointer to text buffer }
- txr_Backup : Pointer; { optional backup buffer }
- txr_Width : Integer; { width of area in chars }
- txr_Height : Integer; { height of area in chars }
- txr_LineOffset: Integer; { offset in buffer(s) between rows }
- txr_XPos : Integer; { upper left corner X coordinate }
- txr_YPos : Integer; { upper left corner Y coordinate }
- txr_ChrType : ByteCard; { character type (see above) }
- end;
-
-function GrCharWidth(Chr: Integer; protected var Opt: GrTextOption): Integer; asmname 'GrCharWidth';
-function GrCharHeight(Chr: Integer; protected var Opt: GrTextOption): Integer; asmname 'GrCharHeight';
-procedure GrCharSize(Chr: Integer; protected var Opt: GrTextOption; var w, h: Integer); asmname 'GrCharSize';
-function GrStringWidth(Text: CString; Length: Integer; protected var Opt: GrTextOption): Integer; asmname 'GrStringWidth';
-function GrStringHeight(Text: CString; Length: Integer; protected var Opt: GrTextOption): Integer; asmname 'GrStringHeight';
-procedure GrStringSize(Text: CString; Length: Integer; protected var Opt: GrTextOption;var w, h: Integer); asmname 'GrStringSize';
-
-procedure GrDrawChar(Chr, x, y: Integer; protected var Opt: GrTextOption); asmname 'GrDrawChar';
-procedure GrDrawString(Text: CString; Length, x, y: Integer; protected var Opt: GrTextOption); asmname 'GrDrawString';
-procedure GrTextXY(x, y: Integer; Text: CString; fg, bg: GrColor); asmname 'GrTextXY';
+ txr_Font: GrFontPtr; { font to be used }
+ txr_FgColor, { foreground color }
+ txr_BgColor: GrTextColor; { background color }
+ txr_Buffer, { pointer to text buffer }
+ txr_Backup: Pointer; { optional backup buffer }
+ txr_Width, { width of area in chars }
+ txr_Height, { height of area in chars }
+ txr_LineOffset, { offset in buffer(s) between rows }
+ txr_XPos, { upper left corner X coordinate }
+ txr_YPos: CInteger; { upper left corner Y coordinate }
+ txr_ChrType: ByteCard { character type (see above) }
+ end;
+
+function GrCharWidth(Chr: CInteger; protected var Opt: GrTextOption): CInteger; asmname 'GrCharWidth';
+function GrCharHeight(Chr: CInteger; protected var Opt: GrTextOption): CInteger; asmname 'GrCharHeight';
+procedure GrCharSize(Chr: CInteger; protected var Opt: GrTextOption; var w, h: CInteger); asmname 'GrCharSize';
+function GrStringWidth(Text: CString; Length: CInteger; protected var Opt: GrTextOption): CInteger; asmname 'GrStringWidth';
+function GrStringHeight(Text: CString; Length: CInteger; protected var Opt: GrTextOption): CInteger; asmname 'GrStringHeight';
+procedure GrStringSize(Text: CString; Length: CInteger; protected var Opt: GrTextOption;var w, h: CInteger); asmname 'GrStringSize';
+
+procedure GrDrawChar(Chr, x, y: CInteger; protected var Opt: GrTextOption); asmname 'GrDrawChar';
+procedure GrDrawString(Text: CString; Length, x, y: CInteger; protected var Opt: GrTextOption); asmname 'GrDrawString';
+procedure GrTextXY(x, y: CInteger; Text: CString; fg, bg: GrColor); asmname 'GrTextXY';
-procedure GrDumpChar(Chr, Col, Row: Integer; protected var r: GrTextRegion); asmname 'GrDumpChar';
-procedure GrDumpText(Col, Row, Wdt, Hgt: Integer; protected var r: GrTextRegion); asmname 'GrDumpText';
+procedure GrDumpChar(Chr, Col, Row: CInteger; protected var r: GrTextRegion); asmname 'GrDumpChar';
+procedure GrDumpText(Col, Row, Wdt, Hgt: CInteger; protected var r: GrTextRegion); asmname 'GrDumpText';
procedure GrDumpTextRegion(protected var r: GrTextRegion); asmname 'GrDumpTextRegion';
{ =================================================================
@@ -719,20 +724,20 @@
type
GrLineOption = record
- No_Color : GrColor; { color used to draw line }
- Lno_Width : Integer; { width of the line }
- Lno_PattLen: Integer; { length of the dash pattern }
- Lno_DashPat: MemPtr; { draw/nodraw pattern }
+ No_Color : GrColor; { color used to draw line }
+ Lno_Width, { width of the line }
+ Lno_PattLen: CInteger; { length of the dash pattern }
+ Lno_DashPat: MemPtr { draw/nodraw pattern }
end;
-procedure GrCustomLine(x1, y1, x2, y2: Integer; protected var o: GrLineOption); asmname 'GrCustomLine';
-procedure GrCustomBox(x1, y1, x2, y2: Integer; protected var o: GrLineOption); asmname 'GrCustomBox';
-procedure GrCustomCircle(xc, yc, r: Integer; protected var o: GrLineOption); asmname 'GrCustomCircle';
-procedure GrCustomEllipse(xc, yc, r: Integer; protected var o: GrLineOption); asmname 'GrCustomEllipse';
-procedure GrCustomCircleArc(xc, yc, r, Start, Ende, Style: Integer; protected var o: GrLineOption); asmname 'GrCustomCircleArc';
-procedure GrCustomEllipseArc(xc, yc, xa, ya, Start, Ende, Style: Integer; protected var o: GrLineOption); asmname 'GrCustomEllipseArc';
-procedure GrCustomPolyLine(NumPts: Integer; var Points{ : array of PointType }; protected var o: GrLineOption); asmname 'GrCustomPolyLine';
-procedure GrCustomPolygon(NumPts: Integer; var Points{ : array of PointType }; protected var o: GrLineOption); asmname 'GrCustomPolygon';
+procedure GrCustomLine(x1, y1, x2, y2: CInteger; protected var o: GrLineOption); asmname 'GrCustomLine';
+procedure GrCustomBox(x1, y1, x2, y2: CInteger; protected var o: GrLineOption); asmname 'GrCustomBox';
+procedure GrCustomCircle(xc, yc, r: CInteger; protected var o: GrLineOption); asmname 'GrCustomCircle';
+procedure GrCustomEllipse(xc, yc, r: CInteger; protected var o: GrLineOption); asmname 'GrCustomEllipse';
+procedure GrCustomCircleArc(xc, yc, r, Start, Ende, Style: CInteger; protected var o: GrLineOption); asmname 'GrCustomCircleArc';
+procedure GrCustomEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; protected var o: GrLineOption); asmname 'GrCustomEllipseArc';
+procedure GrCustomPolyLine(NumPts: CInteger; var Points{ : array of PointType }; protected var o: GrLineOption); asmname 'GrCustomPolyLine';
+procedure GrCustomPolygon(NumPts: CInteger; var Points{ : array of PointType }; protected var o: GrLineOption); asmname 'GrCustomPolygon';
{ ==================================================================
PATTERNED DRAWING AND FILLING PRIMITIVES
@@ -743,14 +748,13 @@
height is user-defined. SET THE TYPE FLAG TO ZERO!!! }
type
- { typedef struct _GR_bitmap }
GrBitmap = record
- bmp_IsPixMap: Integer; { type flag for pattern union }
- bmp_Height : Integer; { bitmap height }
- bmp_Data : MemPtr; { pointer to the bit pattern }
- bmp_FgColor : GrColor; { foreground color for fill }
- bmp_BgColor : GrColor; { background color for fill }
- bmp_MemFlags: Integer; { set if dynamically allocated }
+ bmp_IsPixMap, { type flag for pattern union }
+ bmp_Height: CInteger; { bitmap height }
+ bmp_Data: MemPtr; { pointer to the bit pattern }
+ bmp_FgColor, { foreground color for fill }
+ bmp_BgColor: GrColor; { background color for fill }
+ bmp_MemFlags: CInteger { set if dynamically allocated }
end;
{ PIXMAP: a fill pattern stored in a layout identical to the video RAM
@@ -758,21 +762,19 @@
of the library functions is used to build it. KEEP THE TYPE FLAG
NONZERO!!! }
- { typedef struct _GR_pixmap }
GrPixmap = record
- pxp_IsPixMap: Integer; { type flag for pattern union }
- pxp_Width : Integer; { pixmap width (in pixels) }
- pxp_Height : Integer; { pixmap height (in pixels) }
- pxp_Oper : GrColor; { bitblt mode (SET, OR, XOR, AND, IMAGE) }
- pxp_Source : GrFrameType; { source context for fill }
+ pxp_IsPixMap, { type flag for pattern union }
+ pxp_Width, { pixmap width (in pixels) }
+ pxp_Height: CInteger; { pixmap height (in pixels) }
+ pxp_Oper: GrColor; { bitblt mode (SET, OR, XOR, AND, IMAGE) }
+ pxp_Source: GrFrameType { source context for fill }
end;
{ Fill pattern union -- can either be a bitmap or a pixmap }
- { typedef union _GR_pattern }
GrPattern = record
case 1 .. 3 of
- 1: (gp_IsPixMap: Integer); { nonzero for pixmaps }
+ 1: (gp_IsPixMap: CInteger); { nonzero for pixmaps }
2: (gp_BitMap : GrBitmap); { fill bitmap }
3: (gp_PixMap : GrPixmap); { fill pixmap }
end;
@@ -782,40 +784,40 @@
(1) fill pattern, and the
(2) custom line drawing option }
GrLinePattern = record
- lnp_Pattern: GrPatternPtr; { fill pattern }
- lnp_Option : ^GrLineOption; { width + dash pattern }
+ lnp_Pattern: GrPatternPtr; { fill pattern }
+ lnp_Option : ^GrLineOption { width + dash pattern }
end;
GrLinePatternPtr = GrLinePattern;
-function GrBuildPixmap(protected var Pixels; w, h: Integer; protected var Colors { : array of GrColor }): GrPatternPtr; asmname 'GrBuildPixmap';
-function GrBuildPixmapFromBits(protected var Bits; w, h: Integer; fgc, bgc: GrColor): GrPatternPtr; asmname 'GrBuildPixmapFromBits';
+function GrBuildPixmap(protected var Pixels; w, h: CInteger; protected var Colors { : array of GrColor }): GrPatternPtr; asmname 'GrBuildPixmap';
+function GrBuildPixmapFromBits(protected var Bits; w, h: CInteger; fgc, bgc: GrColor): GrPatternPtr; asmname 'GrBuildPixmapFromBits';
function GrConvertToPixmap(Src: GrContextPtr): GrPatternPtr; asmname 'GrConvertToPixmap';
procedure GrDestroyPattern(p: GrPatternPtr); asmname 'GrDestroyPattern';
-procedure GrPatternedLine(x1, y1, x2, y2: Integer; lp: GrLinePatternPtr); asmname 'GrPatternedLine';
-procedure GrPatternedBox(x1, y1, x2, y2: Integer; lp: GrLinePatternPtr); asmname 'GrPatternedBox';
-procedure GrPatternedCircle(xc, yc, r: Integer; lp: GrLinePatternPtr); asmname 'GrPatternedCircle';
-procedure GrPatternedEllipse(xc, yc, xa, ya: Integer; lp: GrLinePatternPtr); asmname 'GrPatternedEllipse';
-procedure GrPatternedCircleArc(xc, yc, r, Start, Ende, Style: Integer; lp: GrLinePatternPtr); asmname 'GrPatternedCircleArc';
-procedure GrPatternedEllipseArc(xc, yc, xa, ya, Start, Ende, Style: Integer; lp: GrLinePatternPtr); asmname 'GrPatternedEllipseArc';
-procedure GrPatternedPolyLine(NumPts: Integer; var Points{ : array of PointType }; lp: GrLinePatternPtr); asmname 'GrPatternedPolyLine';
-procedure GrPatternedPolygon(NumPts: Integer; var Points{ : array of PointType }; lp: GrLinePatternPtr); asmname 'GrPatternedPolygon';
-
-procedure GrPatternFilledPlot(x, y: Integer; p: GrPatternPtr); asmname 'GrPatternFilledPlot';
-procedure GrPatternFilledLine(x1, y1, x2, y2: Integer; p: GrPatternPtr); asmname 'GrPatternFilledLine';
-procedure GrPatternFilledBox(x1, y1, x2, y2: Integer; p: GrPatternPtr); asmname 'GrPatternFilledBox';
-procedure GrPatternFilledCircle(xc, yc, r: Integer; p: GrPatternPtr); asmname 'GrPatternFilledCircle';
-procedure GrPatternFilledEllipse(xc, yc, xa, ya: Integer; p: GrPatternPtr); asmname 'GrPatternFilledEllipse';
-procedure GrPatternFilledCircleArc(xc, yc, r, Start, Ende, Style: Integer; p: GrPatternPtr); asmname 'GrPatternFilledCircleArc';
-procedure GrPatternFilledEllipseArc(xc, yc, xa, ya, Start, Ende, Style: Integer; p: GrPatternPtr); asmname 'GrPatternFilledEllipseArc';
-procedure GrPatternFilledConvexPolygon(NumPts: Integer; var Points{ : array of PointType }; p: GrPatternPtr); asmname 'GrPatternFilledConvexPolygon';
-procedure GrPatternFilledPolygon(NumPts: Integer; var Points{ : array of PointType }; p: GrPatternPtr); asmname 'GrPatternFilledPolygon';
-procedure GrPatternFloodFill(x, y: Integer; Border: GrColor; p: GrPatternPtr); asmname 'GrPatternFloodFill';
-
-procedure GrPatternDrawChar(Chr, x, y: Integer; protected var Opt: GrTextOption; p: GrPatternPtr); asmname 'GrPatternDrawChar';
-procedure GrPatternDrawString(Text: CString; Length, x, y: Integer; protected var Opt: GrTextOption; p: GrPatternPtr); asmname 'GrPatternDrawString';
-procedure GrPatternDrawStringExt(Text: CString; Length, x, y: Integer; protected var Opt: GrTextOption; p: GrPatternPtr); asmname 'GrPatternDrawStringExt';
+procedure GrPatternedLine(x1, y1, x2, y2: CInteger; lp: GrLinePatternPtr); asmname 'GrPatternedLine';
+procedure GrPatternedBox(x1, y1, x2, y2: CInteger; lp: GrLinePatternPtr); asmname 'GrPatternedBox';
+procedure GrPatternedCircle(xc, yc, r: CInteger; lp: GrLinePatternPtr); asmname 'GrPatternedCircle';
+procedure GrPatternedEllipse(xc, yc, xa, ya: CInteger; lp: GrLinePatternPtr); asmname 'GrPatternedEllipse';
+procedure GrPatternedCircleArc(xc, yc, r, Start, Ende, Style: CInteger; lp: GrLinePatternPtr); asmname 'GrPatternedCircleArc';
+procedure GrPatternedEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; lp: GrLinePatternPtr); asmname 'GrPatternedEllipseArc';
+procedure GrPatternedPolyLine(NumPts: CInteger; var Points{ : array of PointType }; lp: GrLinePatternPtr); asmname 'GrPatternedPolyLine';
+procedure GrPatternedPolygon(NumPts: CInteger; var Points{ : array of PointType }; lp: GrLinePatternPtr); asmname 'GrPatternedPolygon';
+
+procedure GrPatternFilledPlot(x, y: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledPlot';
+procedure GrPatternFilledLine(x1, y1, x2, y2: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledLine';
+procedure GrPatternFilledBox(x1, y1, x2, y2: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledBox';
+procedure GrPatternFilledCircle(xc, yc, r: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledCircle';
+procedure GrPatternFilledEllipse(xc, yc, xa, ya: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledEllipse';
+procedure GrPatternFilledCircleArc(xc, yc, r, Start, Ende, Style: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledCircleArc';
+procedure GrPatternFilledEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledEllipseArc';
+procedure GrPatternFilledConvexPolygon(NumPts: CInteger; var Points{ : array of PointType }; p: GrPatternPtr); asmname 'GrPatternFilledConvexPolygon';
+procedure GrPatternFilledPolygon(NumPts: CInteger; var Points{ : array of PointType }; p: GrPatternPtr); asmname 'GrPatternFilledPolygon';
+procedure GrPatternFloodFill(x, y: CInteger; Border: GrColor; p: GrPatternPtr); asmname 'GrPatternFloodFill';
+
+procedure GrPatternDrawChar(Chr, x, y: CInteger; protected var Opt: GrTextOption; p: GrPatternPtr); asmname 'GrPatternDrawChar';
+procedure GrPatternDrawString(Text: CString; Length, x, y: CInteger; protected var Opt: GrTextOption; p: GrPatternPtr); asmname 'GrPatternDrawString';
+procedure GrPatternDrawStringExt(Text: CString; Length, x, y: CInteger; protected var Opt: GrTextOption; p: GrPatternPtr); asmname 'GrPatternDrawStringExt';
{ <image.h> - Image Utility
@@ -830,20 +832,20 @@
Gr_Image_Inverse_LR = 1; { inverse left right }
Gr_Image_Inverse_TD = 2; { inverse top down }
-function GrImageBuild(protected var Pixels; w, h: Integer; protected var Colors { : array of GrColor }): GrImagePtr; asmname 'GrImageBuild';
+function GrImageBuild(protected var Pixels; w, h: CInteger; protected var Colors { : array of GrColor }): GrImagePtr; asmname 'GrImageBuild';
procedure GrImageDestroy(i: GrImagePtr); asmname 'GrImageDestroy';
-procedure GrImageDisplay(x,y: Integer; i: GrImagePtr); asmname 'GrImageDisplay';
-procedure GrImageDisplayExt(x1,y1,x2,y2: Integer; i: GrImagePtr); asmname 'GrImageDisplayExt';
-procedure GrImageFilledBoxAlign(xo,yo,x1,y1,x2,y2: Integer; p: GrImagePtr); asmname 'GrImageFilledBoxAlign';
-procedure GrImageHLineAlign(xo,yo,x,y,Width: Integer; p: GrImagePtr); asmname 'GrImageHLineAlign';
-procedure GrImagePlotAlign(xo,yo,x,y: Integer; p: GrImagePtr); asmname 'GrImagePlotAlign';
+procedure GrImageDisplay(x,y: CInteger; i: GrImagePtr); asmname 'GrImageDisplay';
+procedure GrImageDisplayExt(x1,y1,x2,y2: CInteger; i: GrImagePtr); asmname 'GrImageDisplayExt';
+procedure GrImageFilledBoxAlign(xo,yo,x1,y1,x2,y2: CInteger; p: GrImagePtr); asmname 'GrImageFilledBoxAlign';
+procedure GrImageHLineAlign(xo,yo,x,y,Width: CInteger; p: GrImagePtr); asmname 'GrImageHLineAlign';
+procedure GrImagePlotAlign(xo,yo,x,y: CInteger; p: GrImagePtr); asmname 'GrImagePlotAlign';
-function GrImageInverse(p: GrImagePtr; Flag: Integer): GrImagePtr; asmname 'GrImageInverse';
-function GrImageStretch(p: GrImagePtr; NWidth, NHeight: Integer): GrImagePtr; asmname 'GrImageStretch';
+function GrImageInverse(p: GrImagePtr; Flag: CInteger): GrImagePtr; asmname 'GrImageInverse';
+function GrImageStretch(p: GrImagePtr; NWidth, NHeight: CInteger): GrImagePtr; asmname 'GrImageStretch';
function GrImageFromPattern(p: GrPatternPtr): GrImagePtr; asmname 'GrImageFromPattern';
function GrImageFromContext(c: GrContextPtr): GrImagePtr; asmname 'GrImageFromContext';
-function GrImageBuildUsedAsPattern(protected var Pixels; w, h: Integer; protected var Colors { : array of GrColor }): GrImagePtr; asmname 'GrImageBuildUsedAsPattern';
+function GrImageBuildUsedAsPattern(protected var Pixels; w, h: CInteger; protected var Colors { : array of GrColor }): GrImagePtr; asmname 'GrImageBuildUsedAsPattern';
function GrPatternFromImage(i: GrImagePtr): GrPatternPtr; asmname 'GrPatternFromImage';
@@ -851,91 +853,90 @@
DRAWING IN USER WINDOW COORDINATES
================================================================== }
-procedure GrSetUserWindow(x1, y1, x2, y2: Integer); asmname 'GrSetUserWindow';
-procedure GrGetUserWindow(var x1, y1, x2, y2: Integer); asmname 'GrGetUserWindow';
-procedure GrGetScreenCoord(var x, y: Integer); asmname 'GrGetScreenCoord';
-procedure GrGetUserCoord(var x, y: Integer); asmname 'GrGetUserCoord';
-
-procedure GrUsrPlot(x, y: Integer; c:GrColor); asmname 'GrUsrPlot';
-procedure GrUsrLine(x1, y1, x2, y2: Integer; c:GrColor); asmname 'GrUsrLine';
-procedure GrUsrHLine(x1, x2, y:Integer; c:GrColor); asmname 'GrUsrHLine';
-procedure GrUsrVLine(x, y1, y2: Integer; c: GrColor); asmname 'GrUsrVLine';
-procedure GrUsrBox(x1, y1, x2, y2: Integer; c: GrColor); asmname 'GrUsrBox';
-procedure GrUsrFilledBox(x1, y1, x2, y2: Integer; c: GrColor); asmname 'GrUsrFilledBox';
-procedure GrUsrFramedBox(x1, y1, x2, y2, Wdt: Integer; c: GrFBoxColors); asmname 'GrUsrFramedBox';
-
-procedure GrUsrCircle(xc, yc, r: Integer; c: GrColor); asmname 'GrUsrCircle';
-procedure GrUsrEllipse(xc, yc, xa, ya: Integer; c: GrColor); asmname 'GrUsrEllipse';
-procedure GrUsrCircleArc(xc, yc, r, Start, Ende, Style: Integer; c: GrColor); asmname 'GrUsrCircleArc';
-procedure GrUsrEllipseArc(xc, yc, xa, ya, Start, Ende, Style: Integer; c: GrColor); asmname 'GrUsrEllipseArc';
-procedure GrUsrFilledCircle(xc, yc, r: Integer; c: GrColor); asmname 'GrUsrFilledCircle';
-procedure GrUsrFilledEllipse(xc, yc, xa, ya: Integer; c: GrColor); asmname 'GrUsrFilledEllipse';
-procedure GrUsrFilledCircleArc(xc, yc, r, Start, Ende, Style: Integer; c: GrColor); asmname 'GrUsrFilledCircleArc';
-procedure GrUsrFilledEllipseArc(xc, yc, xa, ya, Start, Ende, Style: Integer; c: GrColor); asmname 'GrUsrFilledEllipseArc';
-procedure GrUsrPolyLine(NumPts: Integer; var Points{ : array of PointType }; c: GrColor); asmname 'GrUsrPolyLine';
-procedure GrUsrPolygon(NumPts: Integer; var Points{ : array of PointType }; c: GrColor); asmname 'GrUsrPolygon';
-procedure GrUsrFilledConvexPolygon(NumPts: Integer; var Points{ : array of PointType }; c: GrColor); asmname 'GrUsrFilledConvexPolygon';
-procedure GrUsrFilledPolygon(NumPts: Integer; var Points{ : array of PointType }; c: GrColor); asmname 'GrUsrFilledPolygon';
-procedure GrUsrFloodFill(x, y: Integer; Border, c: GrColor); asmname 'GrUsrFloodFill';
-
-function GrUsrPixel(x, y:Integer):GrColor; asmname 'GrUsrPixel';
-function GrUsrPixelC(c: GrContextPtr; x, y: Integer):GrColor; asmname 'GrUsrPixelC';
-
-procedure GrUsrCustomLine(x1, y1, x2, y2: Integer; protected var o: GrLineOption); asmname 'GrUsrCustomLine';
-procedure GrUsrCustomBox(x1, y1, x2, y2: Integer; protected var o: GrLineOption); asmname 'GrUsrCustomBox';
-procedure GrUsrCustomCircle(xc, yc, r: Integer; protected var o: GrLineOption); asmname 'GrUsrCustomCircle';
-procedure GrUsrCustomEllipse(xc, yc, r: Integer; protected var o: GrLineOption); asmname 'GrUsrCustomEllipse';
-procedure GrUsrCustomCircleArc(xc, yc, r, Start, Ende, Style: Integer; protected var o: GrLineOption); asmname 'GrUsrCustomCircleArc';
-procedure GrUsrCustomEllipseArc(xc, yc, xa, ya, Start, Ende, Style: Integer; protected var o: GrLineOption); asmname 'GrUsrCustomEllipseArc';
-procedure GrUsrCustomPolyLine(NumPts: Integer; var Points{ : array of PointType }; protected var o: GrLineOption); asmname 'GrUsrCustomPolyLine';
-procedure GrUsrCustomPolygon(NumPts: Integer; var Points{ : array of PointType }; protected var o: GrLineOption); asmname 'GrUsrCustomPolygon';
-
-procedure GrUsrPatternedLine(x1, y1, x2, y2: Integer; lp: GrLinePatternPtr); asmname 'GrUsrPatternedLine';
-procedure GrUsrPatternedBox(x1, y1, x2, y2: Integer; lp: GrLinePatternPtr); asmname 'GrUsrPatternedBox';
-procedure GrUsrPatternedCircle(xc, yc, r: Integer; lp: GrLinePatternPtr); asmname 'GrUsrPatternedCircle';
-procedure GrUsrPatternedEllipse(xc, yc, xa, ya: Integer; lp: GrLinePatternPtr); asmname 'GrUsrPatternedEllipse';
-procedure GrUsrPatternedCircleArc(xc, yc, r, Start, Ende, Style: Integer; lp: GrLinePatternPtr); asmname 'GrUsrPatternedCircleArc';
-procedure GrUsrPatternedEllipseArc(xc, yc, xa, ya, Start, Ende, Style: Integer; lp: GrLinePatternPtr); asmname 'GrUsrPatternedEllipseArc';
-procedure GrUsrPatternedPolyLine(NumPts: Integer; var Points{ : array of PointType }; lp: GrLinePatternPtr); asmname 'GrUsrPatternedPolyLine';
-procedure GrUsrPatternedPolygon(NumPts: Integer; var Points{ : array of PointType }; lp: GrLinePatternPtr); asmname 'GrUsrPatternedPolygon';
-
-procedure GrUsrPatternFilledPlot(x, y: Integer; p: GrPatternPtr); asmname 'GrPatternFilledPlot';
-procedure GrUsrPatternFilledLine(x1, y1, x2, y2: Integer; p: GrPatternPtr); asmname 'GrUsrPatternFilledLine';
-procedure GrUsrPatternFilledBox(x1, y1, x2, y2: Integer; p: GrPatternPtr); asmname 'GrUsrPatternFilledBox';
-procedure GrUsrPatternFilledCircle(xc, yc, r: Integer; p: GrPatternPtr); asmname 'GrUsrPatternFilledCircle';
-procedure GrUsrPatternFilledEllipse(xc, yc, xa, ya: Integer; p: GrPatternPtr); asmname 'GrUsrPatternFilledEllipse';
-procedure GrUsrPatternFilledCircleArc(xc, yc, r, Start, Ende, Style: Integer; p: GrPatternPtr); asmname 'GrUsrPatternFilledCircleArc';
-procedure GrUsrPatternFilledEllipseArc(xc, yc, xa, ya, Start, Ende, Style: Integer; p: GrPatternPtr); asmname 'GrUsrPatternFilledEllipseArc';
-procedure GrUsrPatternFilledConvexPolygon(NumPts: Integer; var Points{ : array of PointType }; p: GrPatternPtr); asmname 'GrUsrPatternFilledConvexPolygon';
-procedure GrUsrPatternFilledPolygon(NumPts: Integer; var Points{ : array of PointType }; p: GrPatternPtr); asmname 'GrUsrPatternFilledPolygon';
-procedure GrUsrPatternFloodFill(x, y: Integer; Border: GrColor; p: GrPatternPtr); asmname 'GrUsrPatternFloodFill';
-
-procedure GrUsrDrawChar(Chr, x, y: Integer; protected var Opt: GrTextOption); asmname 'GrUsrDrawChar';
-procedure GrUsrDrawString(Text: CString; Length, x, y: Integer; protected var Opt: GrTextOption); asmname 'GrUsrDrawString';
-procedure GrUsrTextXY(x, y: Integer; Text: CString; fg, bg: Integer); asmname 'GrUsrTextXY';
+procedure GrSetUserWindow(x1, y1, x2, y2: CInteger); asmname 'GrSetUserWindow';
+procedure GrGetUserWindow(var x1, y1, x2, y2: CInteger); asmname 'GrGetUserWindow';
+procedure GrGetScreenCoord(var x, y: CInteger); asmname 'GrGetScreenCoord';
+procedure GrGetUserCoord(var x, y: CInteger); asmname 'GrGetUserCoord';
+
+procedure GrUsrPlot(x, y: CInteger; c:GrColor); asmname 'GrUsrPlot';
+procedure GrUsrLine(x1, y1, x2, y2: CInteger; c:GrColor); asmname 'GrUsrLine';
+procedure GrUsrHLine(x1, x2, y:CInteger; c:GrColor); asmname 'GrUsrHLine';
+procedure GrUsrVLine(x, y1, y2: CInteger; c: GrColor); asmname 'GrUsrVLine';
+procedure GrUsrBox(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrUsrBox';
+procedure GrUsrFilledBox(x1, y1, x2, y2: CInteger; c: GrColor); asmname 'GrUsrFilledBox';
+procedure GrUsrFramedBox(x1, y1, x2, y2, Wdt: CInteger; c: GrFBoxColors); asmname 'GrUsrFramedBox';
+
+procedure GrUsrCircle(xc, yc, r: CInteger; c: GrColor); asmname 'GrUsrCircle';
+procedure GrUsrEllipse(xc, yc, xa, ya: CInteger; c: GrColor); asmname 'GrUsrEllipse';
+procedure GrUsrCircleArc(xc, yc, r, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrUsrCircleArc';
+procedure GrUsrEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrUsrEllipseArc';
+procedure GrUsrFilledCircle(xc, yc, r: CInteger; c: GrColor); asmname 'GrUsrFilledCircle';
+procedure GrUsrFilledEllipse(xc, yc, xa, ya: CInteger; c: GrColor); asmname 'GrUsrFilledEllipse';
+procedure GrUsrFilledCircleArc(xc, yc, r, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrUsrFilledCircleArc';
+procedure GrUsrFilledEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; c: GrColor); asmname 'GrUsrFilledEllipseArc';
+procedure GrUsrPolyLine(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrUsrPolyLine';
+procedure GrUsrPolygon(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrUsrPolygon';
+procedure GrUsrFilledConvexPolygon(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrUsrFilledConvexPolygon';
+procedure GrUsrFilledPolygon(NumPts: CInteger; var Points{ : array of PointType }; c: GrColor); asmname 'GrUsrFilledPolygon';
+procedure GrUsrFloodFill(x, y: CInteger; Border, c: GrColor); asmname 'GrUsrFloodFill';
+
+function GrUsrPixel(x, y:CInteger):GrColor; asmname 'GrUsrPixel';
+function GrUsrPixelC(c: GrContextPtr; x, y: CInteger):GrColor; asmname 'GrUsrPixelC';
+
+procedure GrUsrCustomLine(x1, y1, x2, y2: CInteger; protected var o: GrLineOption); asmname 'GrUsrCustomLine';
+procedure GrUsrCustomBox(x1, y1, x2, y2: CInteger; protected var o: GrLineOption); asmname 'GrUsrCustomBox';
+procedure GrUsrCustomCircle(xc, yc, r: CInteger; protected var o: GrLineOption); asmname 'GrUsrCustomCircle';
+procedure GrUsrCustomEllipse(xc, yc, r: CInteger; protected var o: GrLineOption); asmname 'GrUsrCustomEllipse';
+procedure GrUsrCustomCircleArc(xc, yc, r, Start, Ende, Style: CInteger; protected var o: GrLineOption); asmname 'GrUsrCustomCircleArc';
+procedure GrUsrCustomEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; protected var o: GrLineOption); asmname 'GrUsrCustomEllipseArc';
+procedure GrUsrCustomPolyLine(NumPts: CInteger; var Points{ : array of PointType }; protected var o: GrLineOption); asmname 'GrUsrCustomPolyLine';
+procedure GrUsrCustomPolygon(NumPts: CInteger; var Points{ : array of PointType }; protected var o: GrLineOption); asmname 'GrUsrCustomPolygon';
+
+procedure GrUsrPatternedLine(x1, y1, x2, y2: CInteger; lp: GrLinePatternPtr); asmname 'GrUsrPatternedLine';
+procedure GrUsrPatternedBox(x1, y1, x2, y2: CInteger; lp: GrLinePatternPtr); asmname 'GrUsrPatternedBox';
+procedure GrUsrPatternedCircle(xc, yc, r: CInteger; lp: GrLinePatternPtr); asmname 'GrUsrPatternedCircle';
+procedure GrUsrPatternedEllipse(xc, yc, xa, ya: CInteger; lp: GrLinePatternPtr); asmname 'GrUsrPatternedEllipse';
+procedure GrUsrPatternedCircleArc(xc, yc, r, Start, Ende, Style: CInteger; lp: GrLinePatternPtr); asmname 'GrUsrPatternedCircleArc';
+procedure GrUsrPatternedEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; lp: GrLinePatternPtr); asmname 'GrUsrPatternedEllipseArc';
+procedure GrUsrPatternedPolyLine(NumPts: CInteger; var Points{ : array of PointType }; lp: GrLinePatternPtr); asmname 'GrUsrPatternedPolyLine';
+procedure GrUsrPatternedPolygon(NumPts: CInteger; var Points{ : array of PointType }; lp: GrLinePatternPtr); asmname 'GrUsrPatternedPolygon';
+
+procedure GrUsrPatternFilledPlot(x, y: CInteger; p: GrPatternPtr); asmname 'GrPatternFilledPlot';
+procedure GrUsrPatternFilledLine(x1, y1, x2, y2: CInteger; p: GrPatternPtr); asmname 'GrUsrPatternFilledLine';
+procedure GrUsrPatternFilledBox(x1, y1, x2, y2: CInteger; p: GrPatternPtr); asmname 'GrUsrPatternFilledBox';
+procedure GrUsrPatternFilledCircle(xc, yc, r: CInteger; p: GrPatternPtr); asmname 'GrUsrPatternFilledCircle';
+procedure GrUsrPatternFilledEllipse(xc, yc, xa, ya: CInteger; p: GrPatternPtr); asmname 'GrUsrPatternFilledEllipse';
+procedure GrUsrPatternFilledCircleArc(xc, yc, r, Start, Ende, Style: CInteger; p: GrPatternPtr); asmname 'GrUsrPatternFilledCircleArc';
+procedure GrUsrPatternFilledEllipseArc(xc, yc, xa, ya, Start, Ende, Style: CInteger; p: GrPatternPtr); asmname 'GrUsrPatternFilledEllipseArc';
+procedure GrUsrPatternFilledConvexPolygon(NumPts: CInteger; var Points{ : array of PointType }; p: GrPatternPtr); asmname 'GrUsrPatternFilledConvexPolygon';
+procedure GrUsrPatternFilledPolygon(NumPts: CInteger; var Points{ : array of PointType }; p: GrPatternPtr); asmname 'GrUsrPatternFilledPolygon';
+procedure GrUsrPatternFloodFill(x, y: CInteger; Border: GrColor; p: GrPatternPtr); asmname 'GrUsrPatternFloodFill';
+
+procedure GrUsrDrawChar(Chr, x, y: CInteger; protected var Opt: GrTextOption); asmname 'GrUsrDrawChar';
+procedure GrUsrDrawString(Text: CString; Length, x, y: CInteger; protected var Opt: GrTextOption); asmname 'GrUsrDrawString';
+procedure GrUsrTextXY(x, y: CInteger; Text: CString; fg, bg: CInteger); asmname 'GrUsrTextXY';
{ ==================================================================
GRAPHICS CURSOR UTILITIES
================================================================== }
type
- { typedef struct _GR_cursor }
GrCursor = record
- Work : GrContext; { work areas (4) }
- XCord,YCord: Integer; { cursor position on screen }
- XSize,YSize: Integer; { cursor size }
- XOffs,YOffs: Integer; { LU corner to hot point offset }
- XWork,YWork: Integer; { save/work area sizes }
- XWPos,YWPos: Integer; { save/work area position on screen }
- Displayed : Integer; { set if displayed }
+ Work: GrContext; { work areas (4) }
+ XCord,YCord, { cursor position on screen }
+ XSize,YSize, { cursor size }
+ XOffs,YOffs, { LU corner to hot point offset }
+ XWork,YWork, { save/work area sizes }
+ XWPos,YWPos, { save/work area position on screen }
+ Displayed: CInteger { set if displayed }
end;
GrCursorPtr = ^GrCursor;
-function GrBuildCursor(Pixels: Pointer; Pitch, w, h, xo, yo: Integer; protected var Colors { : array of GrColor }): GrCursorPtr; asmname 'GrBuildCursor';
+function GrBuildCursor(Pixels: Pointer; Pitch, w, h, xo, yo: CInteger; protected var Colors { : array of GrColor }): GrCursorPtr; asmname 'GrBuildCursor';
procedure GrDestroyCursor(Cursor: GrCursorPtr); asmname 'GrDestroyCursor';
procedure GrDisplayCursor(Cursor: GrCursorPtr); asmname 'GrDisplayCursor';
procedure GrEraseCursor(Cursor: GrCursorPtr); asmname 'GrEraseCursor';
-procedure GrMoveCursor(Cursor: GrCursorPtr; x, y: Integer); asmname 'GrMoveCursor';
+procedure GrMoveCursor(Cursor: GrCursorPtr; x, y: CInteger); asmname 'GrMoveCursor';
{ ==================================================================
MOUSE AND KEYBOARD INPUT UTILITIES
@@ -982,43 +983,43 @@
Gr_M_Queue_Size = 128; { default queue size }
type
- { typedef struct _GR_mouseEvent } { mouse event buffer structure }
+ { mouse event buffer structure }
GrMouseEvent = record
- Flags : Integer; { event type flags (see above) }
- x, y : Integer; { mouse coordinates }
- Buttons: Integer; { mouse button state }
- Key : Integer; { key code from keyboard }
- KBStat : Integer; { keybd status (ALT, CTRL, etc..) }
- DTime : MedInt; { time since last event (msec) }
+ Flags, { event type flags (see above) }
+ x, y, { mouse coordinates }
+ Buttons, { mouse button state }
+ Key, { key code from keyboard }
+ KBStat: CInteger; { keybd status (ALT, CTRL, etc..) }
+ DTime: MedInt { time since last event (msec) }
end;
GrMouseEventPtr = ^GrMouseEvent;
function GrMouseDetect: Boolean; asmname 'GrMouseDetect';
-procedure GrMouseEventMode(Dummy: Integer); asmname 'GrMouseEventMode';
+procedure GrMouseEventMode(Dummy: CInteger); asmname 'GrMouseEventMode';
procedure GrMouseInit; asmname 'GrMouseInit';
-procedure GrMouseInitN(Queue_Size: Integer); asmname 'GrMouseInitN';
+procedure GrMouseInitN(Queue_Size: CInteger); asmname 'GrMouseInitN';
procedure GrMouseUnInit; asmname 'GrMouseUnInit';
-procedure GrMouseSetSpeed(SPMult, SPDiv: Integer); asmname 'GrMouseSetSpeed';
-procedure GrMouseSetAccel(Thresh, Accel: Integer); asmname 'GrMouseSetAccel';
-procedure GrMouseSetLimits(x1, y1, x2, y2: Integer); asmname 'GrMouseSetLimits';
-procedure GrMouseGetLimits(var x1, y1, x2, y2: Integer); asmname 'GrMouseGetLimits';
-procedure GrMouseWarp(x, y: Integer); asmname 'GrMouseWarp';
+procedure GrMouseSetSpeed(SPMult, SPDiv: CInteger); asmname 'GrMouseSetSpeed';
+procedure GrMouseSetAccel(Thresh, Accel: CInteger); asmname 'GrMouseSetAccel';
+procedure GrMouseSetLimits(x1, y1, x2, y2: CInteger); asmname 'GrMouseSetLimits';
+procedure GrMouseGetLimits(var x1, y1, x2, y2: CInteger); asmname 'GrMouseGetLimits';
+procedure GrMouseWarp(x, y: CInteger); asmname 'GrMouseWarp';
procedure GrMouseEventEnable(Enable_KB, Enable_MS: Boolean); asmname 'GrMouseEventEnable';
-procedure GrMouseGetEvent(Flags: Integer; Event: GrMouseEventPtr); asmname 'GrMouseGetEvent';
-procedure GrMouseGetEventT(Flags: Integer; Event: GrMouseEventPtr; timout_msecs: Integer); asmname 'GrMouseGetEventT';
-function GrMousePendingEvent: Integer; asmname 'GrMousePendingEvent';
+procedure GrMouseGetEvent(Flags: CInteger; Event: GrMouseEventPtr); asmname 'GrMouseGetEvent';
+procedure GrMouseGetEventT(Flags: CInteger; Event: GrMouseEventPtr; timout_msecs: CInteger); asmname 'GrMouseGetEventT';
+function GrMousePendingEvent: CInteger; asmname 'GrMousePendingEvent';
function GrMouseGetCursor: GrCursorPtr; asmname 'GrMouseGetCursor';
procedure GrMouseSetCursor(Cursor: GrCursorPtr); asmname 'GrMouseSetCursor';
procedure GrMouseSetColors(fg,bg: GrColor); asmname 'GrMouseSetColors';
-procedure GrMouseSetCursorMode(Mode: Integer; x1, y1, x2, y2: Integer; c: Integer); asmname 'GrMouseSetCursorMode';
+procedure GrMouseSetCursorMode(Mode: CInteger; x1, y1, x2, y2: CInteger; c: CInteger); asmname 'GrMouseSetCursorMode';
procedure GrMouseDisplayCursor; asmname 'GrMouseDisplayCursor';
procedure GrMouseEraseCursor; asmname 'GrMouseEraseCursor';
procedure GrMouseUpdateCursor; asmname 'GrMouseUpdateCursor';
function GrMouseCursorIsDisplayed: Boolean; asmname 'GrMouseCursorIsDisplayed';
-function GrMouseBlock(c: GrContextPtr; x1, y1, x2, y2: Integer): Integer; asmname 'GrMouseBlock';
-procedure GrMouseUnBlock(Return_Value_From_GrMouseBlock: Integer); asmname 'GrMouseUnBlock';
+function GrMouseBlock(c: GrContextPtr; x1, y1, x2, y2: CInteger): CInteger; asmname 'GrMouseBlock';
+procedure GrMouseUnBlock(Return_Value_From_GrMouseBlock: CInteger); asmname 'GrMouseUnBlock';
{ ==================================================================
KEYBOARD INTERFACE
@@ -1338,18 +1339,18 @@
{ new functions to replace the old style
kbhit / getch / getkey / getxkey / getkbstat
keyboard interface }
-function GrKeyPressed: Integer; asmname 'GrKeyPressed';
+function GrKeyPressed: CInteger; asmname 'GrKeyPressed';
function GrKeyRead: GrKeyType; asmname 'GrKeyRead';
-function GrKeyStat: Integer; asmname 'GrKeyStat';
+function GrKeyStat: CInteger; asmname 'GrKeyStat';
{ ==================================================================
MISCELLANEOUS UTILITIY FUNCTIONS
================================================================== }
-procedure GrResizeGrayMap (var Map; Pitch, ow, oh, nw, nh: Integer); asmname 'GrResizeGrayMap';
-function GrMatchString (Pattern, Strg: CString): Integer; asmname 'GrMatchString';
+procedure GrResizeGrayMap (var Map; Pitch, ow, oh, nw, nh: CInteger); asmname 'GrResizeGrayMap';
+function GrMatchString (Pattern, Strg: CString): CInteger; asmname 'GrMatchString';
procedure GrSetWindowTitle (Title: CString); asmname 'GrSetWindowTitle';
-procedure GrSleep (MSec: Integer); asmname 'GrSleep';
+procedure GrSleep (MSec: CInteger); asmname 'GrSleep';
{ ==================================================================
PNM FUNCTIONS
@@ -1367,23 +1368,23 @@
{ The PNM functions }
-function GrSaveContextToPbm (grc: GrContextPtr; FileName, Comment: CString): Integer; asmname 'GrSaveContextToPbm';
-function GrSaveContextToPgm (grc: GrContextPtr; FileName, Comment: CString): Integer; asmname 'GrSaveContextToPgm';
-function GrSaveContextToPpm (grc: GrContextPtr; FileName, Comment: CString): Integer; asmname 'GrSaveContextToPpm';
-function GrLoadContextFromPnm (grc: GrContextPtr; FileName: CString): Integer; asmname 'GrLoadContextFromPnm';
-function GrQueryPnm (FileName: CString; var Width, Height, MaxVal: Integer): Integer; asmname 'GrQueryPnm';
-function GrLoadContextFromPnmBuffer (grc: GrContextPtr; protected var Buffer): Integer; asmname 'GrLoadContextFromPnmBuffer';
-function GrQueryPnmBuffer (protected var Buffer; var Width, Height, MaxVal: Integer): Integer; asmname 'GrQueryPnmBuffer';
+function GrSaveContextToPbm (grc: GrContextPtr; FileName, Comment: CString): CInteger; asmname 'GrSaveContextToPbm';
+function GrSaveContextToPgm (grc: GrContextPtr; FileName, Comment: CString): CInteger; asmname 'GrSaveContextToPgm';
+function GrSaveContextToPpm (grc: GrContextPtr; FileName, Comment: CString): CInteger; asmname 'GrSaveContextToPpm';
+function GrLoadContextFromPnm (grc: GrContextPtr; FileName: CString): CInteger; asmname 'GrLoadContextFromPnm';
+function GrQueryPnm (FileName: CString; var Width, Height, MaxVal: CInteger): CInteger; asmname 'GrQueryPnm';
+function GrLoadContextFromPnmBuffer (grc: GrContextPtr; protected var Buffer): CInteger; asmname 'GrLoadContextFromPnmBuffer';
+function GrQueryPnmBuffer (protected var Buffer; var Width, Height, MaxVal: CInteger): CInteger; asmname 'GrQueryPnmBuffer';
{ ==================================================================
ADDON FUNCTIONS
these functions may not be installed or available on all systems
================================================================== }
-function GrPngSupport: Integer; asmname 'GrPngSupport';
-function GrSaveContextToPng (grc: GrContextPtr; FileName: CString): Integer; asmname 'GrSaveContextToPng';
-function GrLoadContextFromPng (grc: GrContextPtr; FileName: CString; UseAlpha: Integer): Integer; asmname 'GrLoadContextFromPng';
-function GrQueryPng (FileName: CString; var Width, Height: Integer): Integer; asmname 'GrQueryPng';
+function GrPngSupport: CInteger; asmname 'GrPngSupport';
+function GrSaveContextToPng (grc: GrContextPtr; FileName: CString): CInteger; asmname 'GrSaveContextToPng';
+function GrLoadContextFromPng (grc: GrContextPtr; FileName: CString; UseAlpha: CInteger): CInteger; asmname 'GrLoadContextFromPng';
+function GrQueryPng (FileName: CString; var Width, Height: CInteger): CInteger; asmname 'GrQueryPng';
{ SaveContextToTiff - Dump a context in a TIFF file
@@ -1398,7 +1399,7 @@
requires tifflib by Sam Leffler (sam(a)engr.sgi.com)
available at ftp://ftp.sgi.com/graphics/tiff }
-function SaveContextToTiff(Cxt: GrContextPtr; TiffN: CString; Compr: Integer; DocN: CString): Integer; asmname 'SaveContextToTiff';
+function SaveContextToTiff(Cxt: GrContextPtr; TiffN: CString; Compr: CInteger; DocN: CString): CInteger; asmname 'SaveContextToTiff';
{ GrSaveContextToJpeg - Dump a context in a JPEG file
@@ -1412,11 +1413,11 @@
requires jpeg-6a by IJG (Independent JPEG Group)
available at ftp.uu.net as graphics/jpeg/jpegsrc.v6a.tar.gz }
-function GrSaveContextToJpeg(grc: GrContextPtr; FileName: CString; Accuracy: Integer): Integer; asmname 'GrSaveContextToJpeg';
-function GrSaveContextToGrayJpeg(grc: GrContextPtr; FileName: CString; Accuracy: Integer): Integer; asmname 'GrSaveContextToGrayJpeg';
-function GrJpegSupport: Integer; asmname 'GrJpegSupport';
-function GrLoadContextFromJpeg(grc: GrContextPtr; FileName: CString; Scale: Integer): Integer; asmname 'GrLoadContextFromJpeg';
-function GrQueryJpeg(FileName: CString; var Width, Height: Integer): Integer; asmname 'GrQueryJpeg';
+function GrSaveContextToJpeg(grc: GrContextPtr; FileName: CString; Accuracy: CInteger): CInteger; asmname 'GrSaveContextToJpeg';
+function GrSaveContextToGrayJpeg(grc: GrContextPtr; FileName: CString; Accuracy: CInteger): CInteger; asmname 'GrSaveContextToGrayJpeg';
+function GrJpegSupport: CInteger; asmname 'GrJpegSupport';
+function GrLoadContextFromJpeg(grc: GrContextPtr; FileName: CString; Scale: CInteger): CInteger; asmname 'GrLoadContextFromJpeg';
+function GrQueryJpeg(FileName: CString; var Width, Height: CInteger): CInteger; asmname 'GrQueryJpeg';
implementation
--- grx246/pascal/bgi/graph.pas.orig Thu Sep 23 18:09:30 2004
+++ grx246/pascal/bgi/graph.pas Thu Sep 23 18:17:59 2004
@@ -18,8 +18,9 @@
22/02/01 patches by Maurice Lombardi <Maurice.Lombardi(a)ujf-grenoble.fr>
Necessary to correct the drawpoly and fillpoly declarations.
- Some changes to make this file compile with more recent versions of
- gpc. }
+
+ Maurice Lombardi, Frank Heckenbach <frank(a)pascal.gnu.de>: Some changes
+ to make this file compile with more recent versions of GPC. }
{ Define this if you don't want this unit to declare a KeyPressed
and a ReadKey function. }
@@ -311,7 +312,7 @@
{ BGI - API definitions }
-procedure DetectGraph(var GraphDriver, GraphMode: CInteger); asmname 'detectgraph';
+procedure DetectGraph(var GraphDriver, GraphMode: Integer);
procedure InitGraph(var GraphDriver, GraphMode: Integer; PathToDriver: CString);
procedure SetGraphMode(Mode: CInteger); asmname 'setgraphmode';
function GetModeName(ModeNumber: CInteger): WrkString;
@@ -371,7 +372,7 @@
procedure ClearDevice; asmname '__gr_cleardevice';
procedure DrawPoly(NumPoints: CCardinal; var PolyPoints { : array of PointType }); asmname '__gr_drawpoly';
procedure Ellipse(x, y: CInteger; StAngle, EndAngle: CCardinal; XRadius, YRadius: CCardinal); asmname '__gr_ellipse';
-procedure GetAspectRatio(var XAsp, YAsp: CInteger); asmname '__gr_getaspectratio';
+procedure GetAspectRatio(var XAsp, YAsp: Integer);
function GetBkColor: CCardinal; asmname '__gr_getbkcolor';
function GetColor: CCardinal; asmname '__gr_getcolor';
procedure GetFillPattern(var FillPattern: FillPatternType); asmname '__gr_getfillpattern';
@@ -392,7 +393,7 @@
procedure SetActivePage(Page: CCardinal); asmname '__gr_setactivepage';
procedure SetVisualPage(Page: CCardinal); asmname '__gr_setvisualpage';
procedure GetDefaultPalette(var Palette: PaletteType);
-procedure GetModeRange(GraphDriver:CInteger; var LoMode, HiMode:CInteger); asmname '__gr_getmoderange';
+procedure GetModeRange(GraphDriver:CInteger; var LoMode, HiMode:Integer);
function Black : CInteger;
function Blue : CInteger;
@@ -451,8 +452,7 @@
Functional in HiColor/TrueColor modes only }
procedure SetRGBColor(Red, Green, Blue: CCardinal); asmname '__gr_setrgbcolor';
-{ Returns the actual RGB palette. Functional in
- 256 color modes only. Won't work on Linux systems }
+{ Returns the actual RGB palette. }
procedure GetRGBPalette(Color: CInteger; var Red, Green, Blue: CInteger); asmname '__getrgbpalette';
{ Transforms the predefined 16 EGA colors (RED, BLUE, MAGENTA, ...)
@@ -474,6 +474,17 @@
implementation
+procedure dg(var GraphDriver, GraphMode: CInteger); asmname 'detectgraph';
+procedure DetectGraph(var GraphDriver, GraphMode: Integer);
+var gd, gm: CInteger;
+begin
+ gd := GraphDriver;
+ gm := GraphMode;
+ dg (gd, gm);
+ GraphDriver := gd;
+ GraphMode := gm
+end;
+
procedure ig(var gd, gm: CInteger; PathToDriver: CString); asmname 'initgraph';
procedure InitGraph(var GraphDriver, GraphMode: Integer; PathToDriver: CString);
var gd, gm: CInteger;
@@ -503,11 +514,29 @@
GetDriverName := CString2String (gdn)
end;
+procedure gar(var XAsp, YAsp: CInteger); asmname '__gr_getaspectratio';
+procedure GetAspectRatio(var XAsp, YAsp: Integer);
+var xa, ya: CInteger;
+begin
+ gar (xa, ya);
+ XAsp := xa;
+ YAsp := ya
+end;
+
type pPT = ^PaletteType;
function gdp: pPT; asmname '__gr_getdefaultpalette';
procedure GetDefaultPalette(var Palette: PaletteType);
begin
Palette := gdp^
+end;
+
+procedure gmr(GraphDriver:CInteger; var LoMode, HiMode:CInteger); asmname '__gr_getmoderange';
+procedure GetModeRange(GraphDriver:CInteger; var LoMode, HiMode:Integer);
+var lm, hm: CInteger;
+begin
+ gmr (GraphDriver, lm, hm);
+ LoMode := lm;
+ HiMode := hm
end;
function InstallUserDriver(const DriverName: String; AutoDetectPtr: Pointer):CInteger;
--- grx246/pascal/jpgtest.pas.orig Tue May 27 21:19:46 2003
+++ grx246/pascal/jpgtest.pas Thu Sep 23 18:05:40 2004
@@ -29,7 +29,7 @@
grc : GrContextPtr;
Width, Height : Integer;
s : String[81];
- w, h : Integer;
+ w, h : CInteger;
begin
GrQueryJpeg( nf,w,h );
WriteStr( s,nf,' ',w,' ',h,' Scale 1/',Scale );
--- grx246/pascal/imgview.pas.orig Thu Sep 23 18:06:15 2004
+++ grx246/pascal/imgview.pas Thu Sep 23 18:06:33 2004
@@ -49,7 +49,8 @@
var
ImgFileName: TString;
- ArgStart, ArgN, ImgWidth, ImgHeight, Key: Integer;
+ ArgStart, ArgN, Key: Integer;
+ ImgWidth, ImgHeight: CInteger;
grc: GrContextPtr;
Centered: Boolean;
1
0
Dear grx developmenters:
I am trying to use GRX on my PC under redhat 9. I got
the following message, and I do not know what to do
next. I have a pascal graphic program under Borland
pascal (DOS). I want to transplant to Linux.
Could you give me instructions to point me where to go
next step?
Thanks in advance.
Shutian
gcc -o winclip winclip.o ../lib/unix/libgrx20.a
-lvga -lm
chmod 4755 winclip
gcc -o wintest wintest.o ../lib/unix/libgrx20.a
-lvga -lm
chmod 4755 wintest
gcc -o demogrx demogrx.o gfaz.o
../lib/unix/libgrx20.a -lvga -lm
chmod 4755 demogrx
make[1]: Leaving directory
`/home/shma/gnu_pascal/grx246/test'
make -C pascal -f makefile.lnx
make[1]: Entering directory
`/home/shma/gnu_pascal/grx246/pascal'
gpc --automake -O1 -Wall -o blt_test blt_test.pas
-L../lib/unix ../lib/unix/libgrx20.a -lvga -lm
/usr/bin/ld: cannot find -lgrx20X
collect2: ld returned 1 exit status
make[1]: *** [blt_test] Error 1
make[1]: Leaving directory
`/home/shma/gnu_pascal/grx246/pascal'
make: *** [test] Error 2
[shma@localhost grx246]$
1
0
Dear grx developmenters:
I am trying to use GRX on my PC under redhat 9. I got
the following message, and I do not know what to do
next. I have a pascal graphic program under Borland
pascal (DOS). I want to transplant to Linux.
Could you give me instructions to point me where to go
next step?
Thanks in advance.
Shutian
gcc -o winclip winclip.o ../lib/unix/libgrx20.a
-lvga -lm
chmod 4755 winclip
gcc -o wintest wintest.o ../lib/unix/libgrx20.a
-lvga -lm
chmod 4755 wintest
gcc -o demogrx demogrx.o gfaz.o
../lib/unix/libgrx20.a -lvga -lm
chmod 4755 demogrx
make[1]: Leaving directory
`/home/shma/gnu_pascal/grx246/test'
make -C pascal -f makefile.lnx
make[1]: Entering directory
`/home/shma/gnu_pascal/grx246/pascal'
gpc --automake -O1 -Wall -o blt_test blt_test.pas
-L../lib/unix ../lib/unix/libgrx20.a -lvga -lm
/usr/bin/ld: cannot find -lgrx20X
collect2: ld returned 1 exit status
make[1]: *** [blt_test] Error 1
make[1]: Leaving directory
`/home/shma/gnu_pascal/grx246/pascal'
make: *** [test] Error 2
[shma@localhost grx246]$
1
0