mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 08:49:25 +02:00
* changed definition of getscanlineproc to "getscanline(x1,x2,y:
integer; var data);" so it can be used by getimage too * changed getimage so it uses getscanline * changed floodfill, getscanline16 and definitions in Linux include files so they use this new format + getscanlineVESA256 for 256 color VESA modes (banked)
This commit is contained in:
parent
da92ae391d
commit
4ebd215a8c
@ -24,11 +24,7 @@
|
||||
const
|
||||
InternalDriverName = 'DOSGX';
|
||||
{$ifdef fpc}
|
||||
{$ifdef asmgraph}
|
||||
VideoOfs : DWord = 0; { Segment to draw to }
|
||||
{$else asmgraph}
|
||||
VideoOfs : word = 0; { Segment to draw to }
|
||||
{$endif asmgraph}
|
||||
{$else fpc}
|
||||
VideoOfs : word = 0; { Segment to draw to }
|
||||
{$endif fpc}
|
||||
@ -420,46 +416,48 @@ const
|
||||
{$endif asmgraph}
|
||||
end;
|
||||
|
||||
Procedure GetScanLine16(y: integer; var data);
|
||||
Procedure GetScanLine16(x1, x2, y: integer; var data);
|
||||
|
||||
var dummylong: longint;
|
||||
Offset, count, count2, amount, index: word;
|
||||
plane: byte;
|
||||
Begin
|
||||
inc(x1,StartXViewPort);
|
||||
inc(x2,StartXViewPort);
|
||||
{$ifdef logging}
|
||||
LogLn('GetScanLine16 start, length to get: '+strf(ViewWidth+1)+' at y = '+strf(y));
|
||||
LogLn('GetScanLine16 start, length to get: '+strf(x2-x1+1)+' at y = '+strf(y));
|
||||
{$Endif logging}
|
||||
Port[$3ce] := 4;
|
||||
offset := (Y + StartYViewPort) * 80 + (StartXViewPort shr 3) + VideoOfs;
|
||||
offset := (Y + StartYViewPort) * 80 + (x1 shr 3) + VideoOfs;
|
||||
{$ifdef logging}
|
||||
LogLn('Offset: '+HexStr(offset,4)+' - ' + strf(offset));
|
||||
{$Endif logging}
|
||||
{ first get enough pixels so offset is 32bit aligned }
|
||||
amount := 0;
|
||||
index := 0;
|
||||
If ((StartXViewPort and 31) <> 0) Or
|
||||
(ViewWidth < 32) Then
|
||||
If ((x1 and 31) <> 0) Or
|
||||
((x2-x1+1) < 32) Then
|
||||
Begin
|
||||
If (ViewWidth >= 32+32-(StartXViewPort and 31)) Then
|
||||
amount := 32-(StartXViewPort and 31)
|
||||
Else amount := ViewWidth + 1;
|
||||
If ((x2-x1+1) >= 32+32-(x1 and 31)) Then
|
||||
amount := 32-(x1 and 31)
|
||||
Else amount := x2-x1+1;
|
||||
{$ifdef logging}
|
||||
LogLn('amount to align to 32bits or to get all: ' + strf(amount));
|
||||
{$Endif logging}
|
||||
For count := 0 to amount-1 do
|
||||
WordArray(Data)[Count] := getpixel16(Count,y);
|
||||
index := count+1;
|
||||
WordArray(Data)[Count] := getpixel16(x1-StartXViewPort+Count,y);
|
||||
index := amount;
|
||||
Inc(Offset,(amount+7) shr 3);
|
||||
{$ifdef logging}
|
||||
LogLn('offset now: '+HexStr(offset,4)+' - ' + strf(offset));
|
||||
LogLn('index now: '+strf(index));
|
||||
{$Endif logging}
|
||||
End;
|
||||
amount := ViewWidth + 1 - amount;
|
||||
amount := x2-x1+1 - amount;
|
||||
{$ifdef logging}
|
||||
LogLn('amount left: ' + strf(amount));
|
||||
{$Endif logging}
|
||||
If amount = 0 Then Exit;
|
||||
Port[$3ce] := 4;
|
||||
{ first get everything from plane 3 (4th plane) }
|
||||
Port[$3cf] := 3;
|
||||
Count := 0;
|
||||
@ -496,7 +494,7 @@ Begin
|
||||
For Count2 := 31 downto 0 Do
|
||||
Begin
|
||||
WordArray(Data)[index+Count2] :=
|
||||
(WordArray(Data)[index+Count2] shl 1) + (DummyLong and 1);
|
||||
(WordArray(Data)[index+Count2] shl 1) or (DummyLong and 1);
|
||||
DummyLong := DummyLong shr 1;
|
||||
End;
|
||||
Inc(Index, 32);
|
||||
@ -512,32 +510,32 @@ Begin
|
||||
WordArray(Data)[index+Count] := getpixel16(index+Count,y);
|
||||
{$ifdef logging}
|
||||
LogLn('First 32 bytes gotten with getscanline16: ');
|
||||
If ViewWidth + 1 >= 32 Then
|
||||
If x2-x1+1 >= 32 Then
|
||||
Count2 := 32
|
||||
Else Count2 := ViewWidth;
|
||||
Else Count2 := x2-x1+1;
|
||||
For Count := 0 to Count2-1 Do
|
||||
Log(strf(WordArray(Data)[Count])+' ');
|
||||
LogLn('');
|
||||
If ViewWidth + 1 >= 32 Then
|
||||
If x2-x1+1 >= 32 Then
|
||||
Begin
|
||||
LogLn('Last 32 bytes gotten with getscanline16: ');
|
||||
For Count := 31 downto 0 Do
|
||||
Log(strf(WordArray(Data)[ViewWidth-Count])+' ');
|
||||
Log(strf(WordArray(Data)[x2-x1-Count])+' ');
|
||||
End;
|
||||
LogLn('');
|
||||
GetScanLineDefault(y,Data);
|
||||
GetScanLineDefault(x1-StartXViewPort,x2-StartXViewPort,y,Data);
|
||||
LogLn('First 32 bytes gotten with getscanlinedef: ');
|
||||
If ViewWidth + 1 >= 32 Then
|
||||
If x2-x1+1 >= 32 Then
|
||||
Count2 := 32
|
||||
Else Count2 := ViewWidth;
|
||||
Else Count2 := x2-x1+1;
|
||||
For Count := 0 to Count2-1 Do
|
||||
Log(strf(WordArray(Data)[Count])+' ');
|
||||
LogLn('');
|
||||
If ViewWidth + 1 >= 32 Then
|
||||
If x2-x1+1 >= 32 Then
|
||||
Begin
|
||||
LogLn('Last 32 bytes gotten with getscanlinedef: ');
|
||||
For Count := 31 downto 0 Do
|
||||
Log(strf(WordArray(Data)[ViewWidth-Count])+' ');
|
||||
Log(strf(WordArray(Data)[x2-x1-Count])+' ');
|
||||
End;
|
||||
LogLn('');
|
||||
LogLn('GetScanLine16 end');
|
||||
@ -999,6 +997,7 @@ End;
|
||||
|
||||
Procedure PutPixel320(X,Y : Integer; Pixel: Word); {$ifndef fpc}far;{$endif fpc}
|
||||
{ x,y -> must be in local coordinates. Clipping if required. }
|
||||
{$ifndef fpc}
|
||||
Begin
|
||||
X:= X + StartXViewPort;
|
||||
Y:= Y + StartYViewPort;
|
||||
@ -1010,11 +1009,7 @@ End;
|
||||
if (Y < StartYViewPort) or (Y > (StartYViewPort + ViewHeight)) then
|
||||
exit;
|
||||
end;
|
||||
{$ifndef asmgraph}
|
||||
Mem[SegA000: y * 320 + x + VideoOfs] := Lo(Pixel);
|
||||
{$else asmgraph}
|
||||
asm
|
||||
{$ifndef fpc}
|
||||
mov es, [SegA000]
|
||||
mov ax, [Y]
|
||||
mov di, [X]
|
||||
@ -1025,29 +1020,41 @@ End;
|
||||
add di, [VideoOfs] { point to correct page.. }
|
||||
mov ax, [Pixel]
|
||||
mov es:[di], al
|
||||
end;
|
||||
{$else fpc}
|
||||
assembler;
|
||||
asm
|
||||
movzx edi, x
|
||||
movzx ebx, y
|
||||
add edi, [VideoOfs]
|
||||
cmp clippixels, 0
|
||||
je @putpix320noclip
|
||||
test edi, edi
|
||||
jl @putpix320done
|
||||
test ebx, ebx
|
||||
jl @putpix320done
|
||||
cmp di, ViewWidth
|
||||
jg @putpix320done
|
||||
cmp bx, ViewHeight
|
||||
jg @putpix320done
|
||||
@putpix320noclip:
|
||||
add bx, StartYViewPort
|
||||
add di, StartXViewPort
|
||||
{ add edi, [VideoOfs] no multiple pages in 320*200*256 }
|
||||
mov ax, [pixel]
|
||||
shl ebx, 6
|
||||
add edi, ebx
|
||||
mov ax, [pixel]
|
||||
mov fs:[edi+ebx*4+$a0000], al
|
||||
@putpix320done:
|
||||
{$endif fpc}
|
||||
end;
|
||||
{$endif asmgraph}
|
||||
end;
|
||||
|
||||
|
||||
Function GetPixel320(X,Y: Integer):word; {$ifndef fpc}far;{$endif fpc}
|
||||
{$ifndef fpc}
|
||||
Begin
|
||||
X:= X + StartXViewPort;
|
||||
Y:= Y + StartYViewPort;
|
||||
{$ifndef asmgraph}
|
||||
GetPixel320 := Mem[SegA000:y * 320 + x + VideoOfs];
|
||||
{$else asmgraph}
|
||||
asm
|
||||
{$ifndef fpc}
|
||||
mov es, [SegA000]
|
||||
mov ax, [Y]
|
||||
mov di, [X]
|
||||
@ -1059,18 +1066,20 @@ End;
|
||||
add di, [VideoOfs] { point to correct gfx page ... }
|
||||
mov al,es:[di]
|
||||
mov @Result,ax
|
||||
end;
|
||||
{$else fpc}
|
||||
assembler;
|
||||
asm
|
||||
movzx edi, x
|
||||
movzx ebx, y
|
||||
add edi, [VideoOfs]
|
||||
add di, StartXViewPort
|
||||
add bx, StartYViewPort
|
||||
{ add edi, [VideoOfs] no multiple pages in 320*200*256 }
|
||||
shl ebx, 6
|
||||
add edi, ebx
|
||||
mov al, fs:[edi+ebx*4+$a0000]
|
||||
mov @Result, al
|
||||
{$endif fpc}
|
||||
end;
|
||||
{$endif asmgraph}
|
||||
end;
|
||||
|
||||
|
||||
Procedure DirectPutPixel320(X,Y : Integer); {$ifndef fpc}far;{$endif fpc}
|
||||
@ -1100,7 +1109,7 @@ End;
|
||||
add di, ax
|
||||
shr ax, 2
|
||||
add di, ax
|
||||
add di, [VideoOfs]
|
||||
{ add di, [VideoOfs] no multiple pages support in 320*200*256 }
|
||||
mov ax, [CurrentColor]
|
||||
cmp [CurrentWriteMode],XORPut { check write mode }
|
||||
jne @MOVMode
|
||||
@ -1109,15 +1118,15 @@ End;
|
||||
@MovMode:
|
||||
mov es:[di], al
|
||||
{$else fpc}
|
||||
movzx edi, y
|
||||
shl edi, 6
|
||||
mov ebx, edx
|
||||
add edi, [VideoOfs]
|
||||
movzx edi, x
|
||||
movzx ebx, y
|
||||
{ add edi, [VideoOfs] no multiple pages in 320*200*256 }
|
||||
shl ebx, 6
|
||||
add edi, ebx
|
||||
mov ax, [CurrentColor]
|
||||
cmp [CurrentWriteMode],XORPut { check write mode }
|
||||
jne @MOVMode
|
||||
mov bl, fs:[edi+ebx*4+$a0000]
|
||||
xor al, bl
|
||||
xor al, fs:[edi+ebx*4+$a0000]
|
||||
@MovMode:
|
||||
mov fs:[edi+ebx*4+$a0000], al
|
||||
{$endif fpc}
|
||||
@ -1128,6 +1137,7 @@ End;
|
||||
procedure SetVisual320(page: word); {$ifndef fpc}far;{$endif fpc}
|
||||
{ no page supPort... }
|
||||
begin
|
||||
VideoOfs := 0;
|
||||
end;
|
||||
|
||||
procedure SetActive320(page: word); {$ifndef fpc}far;{$endif fpc}
|
||||
@ -2091,6 +2101,7 @@ const CrtAddress: word = 0;
|
||||
mode.SetActivePage := {$ifdef fpc}@{$endif}SetActiveVESA;
|
||||
mode.hline := {$ifdef fpc}@{$endif}HLineVESA256;
|
||||
mode.vline := {$ifdef fpc}@{$endif}VLineVESA256;
|
||||
mode.GetScanLine := {$ifdef fpc}@{$endif}GetScanLineVESA256;
|
||||
mode.XAspect := 10000;
|
||||
mode.YAspect := 10000;
|
||||
AddMode(mode);
|
||||
@ -2118,6 +2129,7 @@ const CrtAddress: word = 0;
|
||||
mode.SetActivePage := {$ifdef fpc}@{$endif}SetActiveVESA;
|
||||
mode.hline := {$ifdef fpc}@{$endif}HLineVESA256;
|
||||
mode.hline := {$ifdef fpc}@{$endif}HLineVESA256;
|
||||
mode.GetScanLine := {$ifdef fpc}@{$endif}GetScanLineVESA256;
|
||||
mode.XAspect := 10000;
|
||||
mode.YAspect := 10000;
|
||||
AddMode(mode);
|
||||
@ -2224,6 +2236,7 @@ const CrtAddress: word = 0;
|
||||
mode.SetActivePage := {$ifdef fpc}@{$endif}SetActiveVESA;
|
||||
mode.hline := {$ifdef fpc}@{$endif}HLineVESA256;
|
||||
mode.vline := {$ifdef fpc}@{$endif}VLineVESA256;
|
||||
mode.GetScanLine := {$ifdef fpc}@{$endif}GetScanLineVESA256;
|
||||
mode.XAspect := 10000;
|
||||
mode.YAspect := 10000;
|
||||
AddMode(mode);
|
||||
@ -2330,6 +2343,7 @@ const CrtAddress: word = 0;
|
||||
mode.SetActivePage := {$ifdef fpc}@{$endif}SetActiveVESA;
|
||||
mode.vline := {$ifdef fpc}@{$endif}VLineVESA256;
|
||||
mode.hline := {$ifdef fpc}@{$endif}HLineVESA256;
|
||||
mode.GetScanLine := {$ifdef fpc}@{$endif}GetScanLineVESA256;
|
||||
mode.XAspect := 10000;
|
||||
mode.YAspect := 10000;
|
||||
AddMode(mode);
|
||||
@ -2436,6 +2450,7 @@ const CrtAddress: word = 0;
|
||||
mode.SetActivePage := {$ifdef fpc}@{$endif}SetActiveVESA;
|
||||
mode.vline := {$ifdef fpc}@{$endif}VLineVESA256;
|
||||
mode.hline := {$ifdef fpc}@{$endif}HLineVESA256;
|
||||
mode.GetScanLine := {$ifdef fpc}@{$endif}GetScanLineVESA256;
|
||||
mode.XAspect := 10000;
|
||||
mode.YAspect := 10000;
|
||||
AddMode(mode);
|
||||
@ -2497,7 +2512,15 @@ const CrtAddress: word = 0;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.5 1999-12-10 12:49:24 pierre
|
||||
Revision 1.6 1999-12-11 23:41:39 jonas
|
||||
* changed definition of getscanlineproc to "getscanline(x1,x2,y:
|
||||
integer; var data);" so it can be used by getimage too
|
||||
* changed getimage so it uses getscanline
|
||||
* changed floodfill, getscanline16 and definitions in Linux
|
||||
include files so they use this new format
|
||||
+ getscanlineVESA256 for 256 color VESA modes (banked)
|
||||
|
||||
Revision 1.5 1999/12/10 12:49:24 pierre
|
||||
* avoid overflow on ProtW in PutPixel16
|
||||
|
||||
Revision 1.4 1999/11/29 07:32:53 jonas
|
||||
|
@ -472,6 +472,84 @@ end;
|
||||
GetPixVESA256:=mem[WinReadSeg : word(offs)];
|
||||
end;
|
||||
|
||||
Procedure GetScanLineVESA256(x1, x2, y: integer; var data);
|
||||
var offs: Longint;
|
||||
l, amount, bankrest, index, pixels: longint;
|
||||
x, curbank: integer;
|
||||
begin
|
||||
inc(x1,StartXViewPort);
|
||||
inc(x2,StartXViewPort);
|
||||
{$ifdef logging}
|
||||
LogLn('getscanline256 '+strf(x1)+' - '+strf(x2)+' at '+strf(y+StartYViewPort));
|
||||
{$endif logging}
|
||||
index := 0;
|
||||
amount := x2-x1+1;
|
||||
Offs:=(Longint(y)+StartYViewPort+YOffset)*bytesperline+x1;
|
||||
Repeat
|
||||
curbank := integer(offs shr 16);
|
||||
SetReadBank(curbank);
|
||||
{$ifdef logging}
|
||||
LogLn('set bank '+strf(curbank)+' for offset '+hexstr(offs,8));
|
||||
{$endif logging}
|
||||
If amount > 3 Then
|
||||
{ allign target }
|
||||
Begin
|
||||
If (offs and 3) <> 0 then
|
||||
{ this cannot go past a window boundary bacause the }
|
||||
{ size of a window is always a multiple of 4 }
|
||||
Begin
|
||||
{$ifdef logging}
|
||||
LogLn('Alligning by reading '+strf(4-(offs and 3))+' pixels');
|
||||
{$endif logging}
|
||||
for l := 1 to 4-(offs and 3) do
|
||||
WordArray(Data)[index+l-1] :=
|
||||
Mem[WinReadSeg:word(offs)+l-1];
|
||||
inc(index, l);
|
||||
inc(offs, l);
|
||||
dec(amount, l);
|
||||
End;
|
||||
{$ifdef logging}
|
||||
LogLn('Offset is now '+hexstr(offs,8)+', amount left: '+strf(amount));
|
||||
{$endif logging}
|
||||
{ offs is now 4-bytes alligned }
|
||||
If amount <= ($10000-(Offs and $ffff)) Then
|
||||
bankrest := amount
|
||||
else {the rest won't fit anymore in the current window }
|
||||
bankrest := $10000 - (Offs and $ffff);
|
||||
{$ifdef logging}
|
||||
LogLn('Rest to be read from this window: '+strf(bankrest));
|
||||
{$endif logging}
|
||||
For l := 0 to (Bankrest div 4)-1 Do
|
||||
begin
|
||||
pixels := MemL[WinWriteSeg:word(offs)+l*4];
|
||||
WordArray(Data)[index+l*4] := pixels and $ff;
|
||||
pixels := pixels shr 8;
|
||||
WordArray(Data)[index+l*4+1] := pixels and $ff;
|
||||
pixels := pixels shr 8;
|
||||
WordArray(Data)[index+l*4+2] := pixels and $ff;
|
||||
pixels := pixels shr 8;
|
||||
WordArray(Data)[index+l*4+3] := pixels and $ff;
|
||||
end;
|
||||
inc(index,l*4+4);
|
||||
inc(offs,l*4+4);
|
||||
dec(amount,l*4+4);
|
||||
{$ifdef logging}
|
||||
LogLn('Offset is now '+hexstr(offs,8)+', amount left: '+strf(amount));
|
||||
{$endif logging}
|
||||
End
|
||||
Else
|
||||
Begin
|
||||
{$ifdef logging}
|
||||
LogLn('Leftover: '+strf(amount)+' at offset '+hexstr(offs,8));
|
||||
{$endif logging}
|
||||
x := offs mod bytesperline - StartXViewPort;
|
||||
For l := 0 to amount - 1 do
|
||||
WordArray(Data)[index+l] := GetPixVESA256(x+l,y);
|
||||
amount := 0
|
||||
End
|
||||
Until amount = 0;
|
||||
end;
|
||||
|
||||
procedure HLineVESA256(x,x2,y: integer); {$ifndef fpc}far;{$endif fpc}
|
||||
|
||||
var Offs: Longint;
|
||||
@ -2295,7 +2373,15 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.7 1999-12-10 12:52:54 pierre
|
||||
Revision 1.8 1999-12-11 23:41:39 jonas
|
||||
* changed definition of getscanlineproc to "getscanline(x1,x2,y:
|
||||
integer; var data);" so it can be used by getimage too
|
||||
* changed getimage so it uses getscanline
|
||||
* changed floodfill, getscanline16 and definitions in Linux
|
||||
include files so they use this new format
|
||||
+ getscanlineVESA256 for 256 color VESA modes (banked)
|
||||
|
||||
Revision 1.7 1999/12/10 12:52:54 pierre
|
||||
* some LinearFrameBuffer code, not finished
|
||||
|
||||
Revision 1.6 1999/12/09 02:06:00 carl
|
||||
|
@ -450,9 +450,9 @@ var
|
||||
s1 := s3;
|
||||
s3 := stemp;
|
||||
End
|
||||
Else GetScanline (y,s1^);
|
||||
GetScanline (y-1,s2^);
|
||||
GetScanline (y+1,s3^);
|
||||
Else GetScanline(0,ViewWidth,y,s1^);
|
||||
GetScanline(0,ViewWidth,y-1,s2^);
|
||||
GetScanline(0,ViewWidth,y+1,s3^);
|
||||
prevy := y;
|
||||
{ check the current scan line }
|
||||
While (s1^[x]<>Border) And (x<=ViewWidth) Do Inc (x);
|
||||
@ -509,7 +509,15 @@ var
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.11 1999-09-27 23:34:40 peter
|
||||
Revision 1.12 1999-12-11 23:41:38 jonas
|
||||
* changed definition of getscanlineproc to "getscanline(x1,x2,y:
|
||||
integer; var data);" so it can be used by getimage too
|
||||
* changed getimage so it uses getscanline
|
||||
* changed floodfill, getscanline16 and definitions in Linux
|
||||
include files so they use this new format
|
||||
+ getscanlineVESA256 for 256 color VESA modes (banked)
|
||||
|
||||
Revision 1.11 1999/09/27 23:34:40 peter
|
||||
* new graph unit is default for go32v2
|
||||
* removed warnings/notes
|
||||
|
||||
|
@ -483,8 +483,9 @@ TYPE
|
||||
lineproc = procedure (X1, Y1, X2, Y2 : Integer);
|
||||
|
||||
{ this routine is used for FloodFill - it returns an entire }
|
||||
{ screen scan line with a word for each pixel in the scanline }
|
||||
getscanlineproc = procedure (Y : integer; var data);
|
||||
{ screen scan line with a word for each pixel in the scanline. }
|
||||
{ Also handy for GetImage, so I added x coords as well (JM) }
|
||||
getscanlineproc = procedure (X1, X2, Y : integer; var data);
|
||||
|
||||
{ changes the active display screen where we draw to... }
|
||||
setactivepageproc = procedure (page: word);
|
||||
@ -1921,7 +1922,7 @@ end;
|
||||
{--------------------------------------------------------------------------}
|
||||
|
||||
|
||||
Procedure GetScanlineDefault (Y : Integer; Var Data); {$ifndef fpc}far;{$endif fpc}
|
||||
Procedure GetScanlineDefault (X1, X2, Y : Integer; Var Data); {$ifndef fpc}far;{$endif fpc}
|
||||
{**********************************************************}
|
||||
{ Procedure GetScanLine() }
|
||||
{----------------------------------------------------------}
|
||||
@ -1929,14 +1930,16 @@ end;
|
||||
{ coordinate. The values are returned in a WORD array }
|
||||
{ each WORD representing a pixel of the specified scanline }
|
||||
{ note: we only need the pixels inside the ViewPort! (JM) }
|
||||
{ note2: extended so you can specify start and end X coord }
|
||||
{ so it is usable for GetImage too (JM) }
|
||||
{**********************************************************}
|
||||
|
||||
|
||||
Var
|
||||
x : Integer;
|
||||
Begin
|
||||
For x:=0 to ViewWidth Do
|
||||
WordArray(Data)[x]:=GetPixel(x, y);
|
||||
For x:=X1 to X2 Do
|
||||
WordArray(Data)[x-x1]:=GetPixel(x, y);
|
||||
End;
|
||||
|
||||
|
||||
@ -1991,18 +1994,12 @@ var
|
||||
i,j: integer;
|
||||
k: longint;
|
||||
Begin
|
||||
k:= 3 * Sizeof(longint) div Sizeof(word); { Three reserved longs at start of bitmap }
|
||||
k:= 3 * Sizeof(longint) div sizeof(word); { Three reserved longs at start of bitmap }
|
||||
i := x2 - x1 + 1;
|
||||
for j:=Y1 to Y2 do
|
||||
Begin
|
||||
for i:=X1 to X2 do
|
||||
begin
|
||||
{$R-}
|
||||
pt(Bitmap)[k] :=getpixel(i,j);
|
||||
{$ifdef debug}
|
||||
{$R+}
|
||||
{$endif debug}
|
||||
Inc(k);
|
||||
end;
|
||||
GetScanLine(x1,x2,j,pt(Bitmap)[k]);
|
||||
inc(k,i);
|
||||
end;
|
||||
ptw(Bitmap)[0] := X2-X1; { First longint is width }
|
||||
ptw(Bitmap)[1] := Y2-Y1; { Second longint is height }
|
||||
@ -3008,7 +3005,15 @@ SetGraphBufSize
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.45 1999-12-10 12:47:41 pierre
|
||||
Revision 1.46 1999-12-11 23:41:38 jonas
|
||||
* changed definition of getscanlineproc to "getscanline(x1,x2,y:
|
||||
integer; var data);" so it can be used by getimage too
|
||||
* changed getimage so it uses getscanline
|
||||
* changed floodfill, getscanline16 and definitions in Linux
|
||||
include files so they use this new format
|
||||
+ getscanlineVESA256 for 256 color VESA modes (banked)
|
||||
|
||||
Revision 1.45 1999/12/10 12:47:41 pierre
|
||||
* SetBkColor like BP by changing Palette entry zero
|
||||
|
||||
Revision 1.44 1999/11/30 08:57:46 michael
|
||||
|
@ -351,7 +351,7 @@ procedure ggi_lineproc (X1, Y1, X2, Y2 : Integer);
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure ggi_getscanlineproc (Y : integer; var data);
|
||||
procedure ggi_getscanlineproc (X1, X2, Y : integer; var data);
|
||||
begin
|
||||
end;
|
||||
|
||||
@ -500,7 +500,15 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.5 1999-11-12 02:13:01 carl
|
||||
Revision 1.6 1999-12-11 23:41:39 jonas
|
||||
* changed definition of getscanlineproc to "getscanline(x1,x2,y:
|
||||
integer; var data);" so it can be used by getimage too
|
||||
* changed getimage so it uses getscanline
|
||||
* changed floodfill, getscanline16 and definitions in Linux
|
||||
include files so they use this new format
|
||||
+ getscanlineVESA256 for 256 color VESA modes (banked)
|
||||
|
||||
Revision 1.5 1999/11/12 02:13:01 carl
|
||||
* Bugfix if getimage / putimage, format was not standard with FPC
|
||||
graph.
|
||||
|
||||
|
@ -381,7 +381,7 @@ procedure libvga_lineproc (X1, Y1, X2, Y2 : Integer);
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure libvga_getscanlineproc (Y : integer; var data);
|
||||
procedure libvga_getscanlineproc (X1,X2,Y : integer; var data);
|
||||
begin
|
||||
end;
|
||||
|
||||
@ -500,7 +500,15 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.2 1999-11-08 00:08:43 michael
|
||||
Revision 1.3 1999-12-11 23:41:39 jonas
|
||||
* changed definition of getscanlineproc to "getscanline(x1,x2,y:
|
||||
integer; var data);" so it can be used by getimage too
|
||||
* changed getimage so it uses getscanline
|
||||
* changed floodfill, getscanline16 and definitions in Linux
|
||||
include files so they use this new format
|
||||
+ getscanlineVESA256 for 256 color VESA modes (banked)
|
||||
|
||||
Revision 1.2 1999/11/08 00:08:43 michael
|
||||
* Fist working version of svgalib new graph unit
|
||||
* Initial implementation of ggi new graph unit
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user