[fpc-devel] Graph unit under Go32V2
borsa77 at libero.it
borsa77 at libero.it
Mon Jan 22 21:34:36 CET 2007
I send a patch in attachement to the Graph unit for the 2.0.4 version under=
Go32V2 platform that make possible compile and almost running properly the=
following example: =
=
program dawn; =
uses graph; =
var gd,gm:integer; =
begin =
gd:=3Dd8bit; =
gm:=3Dm320x200; =
initgraph(gd,gm,''); =
if graphresult<>grok then =
begin =
writeln('Error'); =
halt; =
end; =
setcolor(blue); =
rectangle(110,50,210,150); =
readln; =
closegraph; =
end. =
=
There's a problem in the out of centre of the rectangle, I have also recogn=
ized the same thing in the mandel.pp demo. =
=
What this patch does: =
- FirstPlane and VGA's constant becomes typed; =
- general preservation of CPU registers in the assembler block; =
- it changes the type of ScrOfs in the VLine16 procedure; =
- it fixes all the variable in the assembler block by reference; =
- in the SaveState procedures it avoids to restore after saving; =
- it moves the check of SavePtr from procedure RestoreState to freeSaveStat=
eBuffer, in any way if it is null a RE 203 has occurred; =
- it initializes SavePtr in the procedure QueryAdapterInfo for the program =
that do not call InitGraph where CloseGraph is at the end by default; =
- it assigned the return value to the procedure QueryAdapterInfo, even do n=
ot seem to be used; =
- it fixes the type of the parameter of the system procedure =
Global_Dos_Free; =
- in the vesa.inc file it removes the double deallocation of =
SavePtr in the procedure RestoreState; =
- in the modes.inc file it fixes the leak of elements in the =
newModeList and the final pointer in the ModeList. =
=
PS: I see now that the last source code for graph.pp file is revision 5862 =
and my patch applies to 2.0.4, how do we solve? =
If it is accepted the simplest way should be to remove r5862 and reincorpor=
ate it by hand, I may make myself such. =
=
Greetings, Marco. =
------------------------------------------------------
Vendi qualcosa? AdBoom.it pubblica i tuoi annunci su 4 siti in 45 secondi G=
RATIS!
http://click.libero.it/webnation22gen07
-------------- next part --------------
A non-text attachment was scrubbed...
Name: =3D?iso-8859-1?Q?graph.diff?=3D
Type: application/octet-stream
Size: 44334 bytes
Desc: not available
Url : http://lists.freepascal.org/lists/fpc-devel/attachments/20070122/c43e=
7ed8/iso-8859-1Qgraph-0001.obj
More information about the fpc-devel
mailing list