mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-07 21:45:58 +02:00
* fixed procvar syntax error and ceil and floor functions
This commit is contained in:
parent
8c70a5f38a
commit
d6f11f2061
@ -94,7 +94,7 @@ type
|
|||||||
var t : graph_int;
|
var t : graph_int;
|
||||||
begin
|
begin
|
||||||
t:=Trunc(x);
|
t:=Trunc(x);
|
||||||
If frac(x)>0 then inc(t);
|
If (x > 0) and (frac(x)>0) then inc(t);
|
||||||
ceil := t;
|
ceil := t;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ type
|
|||||||
var t : graph_int;
|
var t : graph_int;
|
||||||
begin
|
begin
|
||||||
t:=Trunc(x);
|
t:=Trunc(x);
|
||||||
If frac(x)<0 then dec(t);
|
If (x < 0) and (frac(x)>0) then dec(t);
|
||||||
floor := t;
|
floor := t;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -207,7 +207,11 @@ begin
|
|||||||
for k := 0 to (numpoints-1) do
|
for k := 0 to (numpoints-1) do
|
||||||
indextable^[k] := k;
|
indextable^[k] := k;
|
||||||
{ sort the indextable by points[indextable[k]].y }
|
{ sort the indextable by points[indextable[k]].y }
|
||||||
|
{$ifndef fpc}
|
||||||
bsort(indextable, numpoints, sizeof(graph_int), compare_ind);
|
bsort(indextable, numpoints, sizeof(graph_int), compare_ind);
|
||||||
|
{$else fpc}
|
||||||
|
bsort(indextable, numpoints, sizeof(graph_int), @compare_ind);
|
||||||
|
{$endif fpc}
|
||||||
{ start with empty active edge table }
|
{ start with empty active edge table }
|
||||||
activepoints := 0;
|
activepoints := 0;
|
||||||
{ indextable[k] is the next vertex to process }
|
{ indextable[k] is the next vertex to process }
|
||||||
@ -241,7 +245,11 @@ begin
|
|||||||
inc(k);
|
inc(k);
|
||||||
end;
|
end;
|
||||||
{ sort active edges list by active[j].x }
|
{ sort active edges list by active[j].x }
|
||||||
|
{$ifndef fpc}
|
||||||
bsort(activetable, activepoints, sizeof(edge), compare_active);
|
bsort(activetable, activepoints, sizeof(edge), compare_active);
|
||||||
|
{$else fpc}
|
||||||
|
bsort(activetable, activepoints, sizeof(edge),@compare_active);
|
||||||
|
{$endif fpc}
|
||||||
j := 0;
|
j := 0;
|
||||||
{ draw horizontal segments for scanline y }
|
{ draw horizontal segments for scanline y }
|
||||||
while (j < activepoints) do begin
|
while (j < activepoints) do begin
|
||||||
@ -494,7 +502,10 @@ var
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 1999-07-12 13:27:11 jonas
|
Revision 1.4 1999-07-12 14:52:52 jonas
|
||||||
|
* fixed procvar syntax error and ceil and floor functions
|
||||||
|
|
||||||
|
Revision 1.3 1999/07/12 13:27:11 jonas
|
||||||
+ added Log and Id tags
|
+ added Log and Id tags
|
||||||
* added first FPC support, only VGA works to some extend for now
|
* added first FPC support, only VGA works to some extend for now
|
||||||
* use -dasmgraph to use assembler routines, otherwise Pascal
|
* use -dasmgraph to use assembler routines, otherwise Pascal
|
||||||
|
Loading…
Reference in New Issue
Block a user