mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 10:49:27 +02:00
* PutPixelX split into pure pascal and asm version
git-svn-id: trunk@41032 -
This commit is contained in:
parent
8e832f31dc
commit
bf711c4586
@ -2591,10 +2591,9 @@ const CrtAddress: word = 0;
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure PutPixelX(X,Y: smallint; color:ColorType);
|
|
||||||
{$ifndef asmgraph}
|
{$ifndef asmgraph}
|
||||||
|
Procedure PutPixelX(X,Y: smallint; color:ColorType);
|
||||||
var offset: word;
|
var offset: word;
|
||||||
{$endif asmgraph}
|
|
||||||
begin
|
begin
|
||||||
{ verify clipping and then convert to absolute coordinates...}
|
{ verify clipping and then convert to absolute coordinates...}
|
||||||
if ClipPixels then
|
if ClipPixels then
|
||||||
@ -2606,11 +2605,23 @@ const CrtAddress: word = 0;
|
|||||||
end;
|
end;
|
||||||
X:= X + StartXViewPort;
|
X:= X + StartXViewPort;
|
||||||
Y:= Y + StartYViewPort;
|
Y:= Y + StartYViewPort;
|
||||||
{$ifndef asmgraph}
|
|
||||||
offset := y * 80 + x shr 2 + VideoOfs;
|
offset := y * 80 + x shr 2 + VideoOfs;
|
||||||
PortW[$3c4] := (hi(word(FirstPlane)) shl 8) shl (x and 3)+ lo(word(FirstPlane));
|
PortW[$3c4] := (hi(word(FirstPlane)) shl 8) shl (x and 3)+ lo(word(FirstPlane));
|
||||||
Mem[SegA000:offset] := color;
|
Mem[SegA000:offset] := color;
|
||||||
|
end;
|
||||||
{$else asmgraph}
|
{$else asmgraph}
|
||||||
|
Procedure PutPixelX(X,Y: smallint; color:ColorType);
|
||||||
|
begin
|
||||||
|
{ verify clipping and then convert to absolute coordinates...}
|
||||||
|
if ClipPixels then
|
||||||
|
begin
|
||||||
|
if (X < 0) or (X > ViewWidth) then
|
||||||
|
exit;
|
||||||
|
if (Y < 0) or (Y > ViewHeight) then
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
X:= X + StartXViewPort;
|
||||||
|
Y:= Y + StartYViewPort;
|
||||||
asm
|
asm
|
||||||
push ax
|
push ax
|
||||||
push bx
|
push bx
|
||||||
@ -2653,8 +2664,8 @@ const CrtAddress: word = 0;
|
|||||||
pop bx
|
pop bx
|
||||||
pop ax
|
pop ax
|
||||||
end;
|
end;
|
||||||
{$endif asmgraph}
|
|
||||||
end;
|
end;
|
||||||
|
{$endif asmgraph}
|
||||||
|
|
||||||
|
|
||||||
Procedure DirectPutPixelX(X,Y: smallint);
|
Procedure DirectPutPixelX(X,Y: smallint);
|
||||||
|
Loading…
Reference in New Issue
Block a user