|
@@ -47,8 +47,6 @@ const
|
|
StdBufferSize = 4096; { Buffer size for FloodFill }
|
|
StdBufferSize = 4096; { Buffer size for FloodFill }
|
|
|
|
|
|
type
|
|
type
|
|
-
|
|
|
|
-
|
|
|
|
tinttable = array[0..16383] of smallint;
|
|
tinttable = array[0..16383] of smallint;
|
|
pinttable = ^tinttable;
|
|
pinttable = ^tinttable;
|
|
|
|
|
|
@@ -1864,31 +1862,23 @@ end;
|
|
FillPattern:=FillpatternTable[UserFill];
|
|
FillPattern:=FillpatternTable[UserFill];
|
|
end;
|
|
end;
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
procedure DrawPoly(numpoints : word;var polypoints);
|
|
procedure DrawPoly(numpoints : word;var polypoints);
|
|
-
|
|
|
|
- type
|
|
|
|
- ppointtype = ^pointtype;
|
|
|
|
- pt = array[0..16000] of pointtype;
|
|
|
|
-
|
|
|
|
- var
|
|
|
|
- i : longint;
|
|
|
|
-
|
|
|
|
|
|
+ type
|
|
|
|
+ ppointtype = ^pointtype;
|
|
|
|
+ pt = array[0..16000] of pointtype;
|
|
|
|
+ var
|
|
|
|
+ i : longint;
|
|
begin
|
|
begin
|
|
- if numpoints < 2 then
|
|
|
|
- begin
|
|
|
|
- _GraphResult := grError;
|
|
|
|
- exit;
|
|
|
|
- end;
|
|
|
|
- for i:=0 to numpoints-2 do
|
|
|
|
- line(pt(polypoints)[i].x,
|
|
|
|
- pt(polypoints)[i].y,
|
|
|
|
- pt(polypoints)[i+1].x,
|
|
|
|
- pt(polypoints)[i+1].y);
|
|
|
|
|
|
+ if numpoints < 2 then
|
|
|
|
+ begin
|
|
|
|
+ _GraphResult := grError;
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
|
|
+ for i:=0 to numpoints-2 do
|
|
|
|
+ line(pt(polypoints)[i].x,
|
|
|
|
+ pt(polypoints)[i].y,
|
|
|
|
+ pt(polypoints)[i+1].x,
|
|
|
|
+ pt(polypoints)[i+1].y);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -1984,8 +1974,7 @@ end;
|
|
DriverName:=InternalDriverName; { DOS Graphics driver }
|
|
DriverName:=InternalDriverName; { DOS Graphics driver }
|
|
|
|
|
|
if (Graphdriver=Detect)
|
|
if (Graphdriver=Detect)
|
|
- or (GraphMode = detectMode)
|
|
|
|
- then
|
|
|
|
|
|
+ or (GraphMode = detectMode) then
|
|
begin
|
|
begin
|
|
internDetectGraph(GraphDriver,GraphMode,true);
|
|
internDetectGraph(GraphDriver,GraphMode,true);
|
|
If _GraphResult = grNotDetected then Exit;
|
|
If _GraphResult = grNotDetected then Exit;
|
|
@@ -2001,7 +1990,7 @@ end;
|
|
{ Actually set the graph mode...}
|
|
{ Actually set the graph mode...}
|
|
if firstCallOfInitgraph then
|
|
if firstCallOfInitgraph then
|
|
begin
|
|
begin
|
|
- SaveVideoState;
|
|
|
|
|
|
+ SaveVideoState;
|
|
firstCallOfInitgraph := false;
|
|
firstCallOfInitgraph := false;
|
|
end;
|
|
end;
|
|
SetGraphMode(GraphMode);
|
|
SetGraphMode(GraphMode);
|
|
@@ -2026,7 +2015,7 @@ end;
|
|
|
|
|
|
if firstCallOfInitgraph then
|
|
if firstCallOfInitgraph then
|
|
begin
|
|
begin
|
|
- SaveVideoState;
|
|
|
|
|
|
+ SaveVideoState;
|
|
firstCallOfInitgraph := false;
|
|
firstCallOfInitgraph := false;
|
|
end;
|
|
end;
|
|
SetGraphMode(GraphMode);
|
|
SetGraphMode(GraphMode);
|
|
@@ -2059,8 +2048,8 @@ end;
|
|
{ release memory allocated for fonts }
|
|
{ release memory allocated for fonts }
|
|
for c := 1 to installedfonts do
|
|
for c := 1 to installedfonts do
|
|
with fonts[c] Do
|
|
with fonts[c] Do
|
|
- If assigned(instr) Then
|
|
|
|
- Freemem(instr,instrlength);
|
|
|
|
|
|
+ If assigned(instr) Then
|
|
|
|
+ System.Freemem(instr,instrlength);
|
|
{ release memory allocated for modelist }
|
|
{ release memory allocated for modelist }
|
|
list := ModeList;
|
|
list := ModeList;
|
|
while assigned(list) do
|
|
while assigned(list) do
|