+ use the ColorType type in the i8086-msdos graph unit, so that it compiles with

FPC_GRAPH_SUPPORTS_TRUECOLOR (not enabled yet)

git-svn-id: trunk@40892 -
This commit is contained in:
nickysn 2019-01-18 13:22:18 +00:00
parent 0849951fed
commit 06d8fa7e34
2 changed files with 29 additions and 29 deletions

View File

@ -205,7 +205,7 @@ begin
end; end;
{ compatible with TP7's HERC.BGI } { compatible with TP7's HERC.BGI }
procedure SetBkColorHGC720(ColorNum: Word); procedure SetBkColorHGC720(ColorNum: ColorType);
begin begin
if ColorNum > 15 then if ColorNum > 15 then
exit; exit;
@ -213,7 +213,7 @@ begin
end; end;
{ compatible with TP7's HERC.BGI } { compatible with TP7's HERC.BGI }
function GetBkColorHGC720: Word; function GetBkColorHGC720: ColorType;
begin begin
GetBkColorHGC720 := DummyHGCBkColor; GetBkColorHGC720 := DummyHGCBkColor;
end; end;
@ -228,7 +228,7 @@ procedure GetHGCRGBPalette(ColorNum: smallint; Var
begin begin
end; end;
procedure PutPixelHGC720(X, Y: SmallInt; Pixel: Word); procedure PutPixelHGC720(X, Y: SmallInt; Pixel: ColorType);
var var
Offset: Word; Offset: Word;
B, Mask, Shift: Byte; B, Mask, Shift: Byte;
@ -256,7 +256,7 @@ begin
Mem[SegB000:Offset] := B; Mem[SegB000:Offset] := B;
end; end;
function GetPixelHGC720(X, Y: SmallInt): Word; function GetPixelHGC720(X, Y: SmallInt): ColorType;
var var
Offset: Word; Offset: Word;
B, Shift: Byte; B, Shift: Byte;
@ -571,7 +571,7 @@ asm
pop bp pop bp
end; end;
procedure SetBkColorCGA320(ColorNum: Word); procedure SetBkColorCGA320(ColorNum: ColorType);
begin begin
if ColorNum > 15 then if ColorNum > 15 then
exit; exit;
@ -579,7 +579,7 @@ begin
SetCGABorder(CurrentCGABorder); SetCGABorder(CurrentCGABorder);
end; end;
function GetBkColorCGA320: Word; function GetBkColorCGA320: ColorType;
begin begin
GetBkColorCGA320 := CurrentCGABorder and 15; GetBkColorCGA320 := CurrentCGABorder and 15;
end; end;
@ -632,7 +632,7 @@ begin
CurrentCGABorder := 0; CurrentCGABorder := 0;
end; end;
procedure PutPixelCGA320(X, Y: SmallInt; Pixel: Word); procedure PutPixelCGA320(X, Y: SmallInt; Pixel: ColorType);
var var
Offset: Word; Offset: Word;
B, Mask, Shift: Byte; B, Mask, Shift: Byte;
@ -657,7 +657,7 @@ begin
Mem[SegB800:Offset] := B; Mem[SegB800:Offset] := B;
end; end;
function GetPixelCGA320(X, Y: SmallInt): Word; function GetPixelCGA320(X, Y: SmallInt): ColorType;
var var
Offset: Word; Offset: Word;
B, Shift: Byte; B, Shift: Byte;
@ -927,7 +927,7 @@ begin
end; end;
{yes, TP7 CGA.BGI behaves *exactly* like that} {yes, TP7 CGA.BGI behaves *exactly* like that}
procedure SetBkColorCGA640(ColorNum: Word); procedure SetBkColorCGA640(ColorNum: ColorType);
begin begin
if ColorNum > 15 then if ColorNum > 15 then
exit; exit;
@ -937,12 +937,12 @@ begin
SetCGABorder(CurrentCGABorder); SetCGABorder(CurrentCGABorder);
end; end;
function GetBkColorCGA640: Word; function GetBkColorCGA640: ColorType;
begin begin
GetBkColorCGA640 := CurrentCGABorder and 15; GetBkColorCGA640 := CurrentCGABorder and 15;
end; end;
procedure PutPixelCGA640(X, Y: SmallInt; Pixel: Word); procedure PutPixelCGA640(X, Y: SmallInt; Pixel: ColorType);
var var
Offset: Word; Offset: Word;
B, Mask, Shift: Byte; B, Mask, Shift: Byte;
@ -967,7 +967,7 @@ begin
Mem[SegB800:Offset] := B; Mem[SegB800:Offset] := B;
end; end;
function GetPixelCGA640(X, Y: SmallInt): Word; function GetPixelCGA640(X, Y: SmallInt): ColorType;
var var
Offset: Word; Offset: Word;
B, Shift: Byte; B, Shift: Byte;
@ -1237,7 +1237,7 @@ begin
CurrentCGABorder := 0; {yes, TP7 CGA.BGI behaves *exactly* like that} CurrentCGABorder := 0; {yes, TP7 CGA.BGI behaves *exactly* like that}
end; end;
procedure SetBkColorMCGA640(ColorNum: Word); procedure SetBkColorMCGA640(ColorNum: ColorType);
begin begin
if ColorNum > 15 then if ColorNum > 15 then
exit; exit;
@ -1245,12 +1245,12 @@ begin
SetCGABorder(CurrentCGABorder); SetCGABorder(CurrentCGABorder);
end; end;
function GetBkColorMCGA640: Word; function GetBkColorMCGA640: ColorType;
begin begin
GetBkColorMCGA640 := CurrentCGABorder and 15; GetBkColorMCGA640 := CurrentCGABorder and 15;
end; end;
procedure PutPixelMCGA640(X, Y: SmallInt; Pixel: Word); procedure PutPixelMCGA640(X, Y: SmallInt; Pixel: ColorType);
var var
Offset: Word; Offset: Word;
B, Mask, Shift: Byte; B, Mask, Shift: Byte;
@ -1273,7 +1273,7 @@ begin
Mem[SegA000:Offset] := B; Mem[SegA000:Offset] := B;
end; end;
function GetPixelMCGA640(X, Y: SmallInt): Word; function GetPixelMCGA640(X, Y: SmallInt): ColorType;
var var
Offset: Word; Offset: Word;
B, Shift: Byte; B, Shift: Byte;
@ -1559,7 +1559,7 @@ end;
Procedure PutPixel16(X,Y : smallint; Pixel: Word); Procedure PutPixel16(X,Y : smallint; Pixel: ColorType);
{$ifndef asmgraph} {$ifndef asmgraph}
var offset: word; var offset: word;
dummy: byte; dummy: byte;
@ -1690,7 +1690,7 @@ end;
end; end;
Function GetPixel16(X,Y: smallint):word; Function GetPixel16(X,Y: smallint):ColorType;
{$ifndef asmgraph} {$ifndef asmgraph}
Var dummy, offset: Word; Var dummy, offset: Word;
shift: byte; shift: byte;
@ -2362,7 +2362,7 @@ End;
Procedure PutPixel320(X,Y : smallint; Pixel: Word); Procedure PutPixel320(X,Y : smallint; Pixel: ColorType);
{ x,y -> must be in local coordinates. Clipping if required. } { x,y -> must be in local coordinates. Clipping if required. }
Begin Begin
{ verify clipping and then convert to absolute coordinates...} { verify clipping and then convert to absolute coordinates...}
@ -2391,7 +2391,7 @@ End;
end; end;
Function GetPixel320(X,Y: smallint):word; Function GetPixel320(X,Y: smallint):ColorType;
Begin Begin
X:= X + StartXViewPort; X:= X + StartXViewPort;
Y:= Y + StartYViewPort; Y:= Y + StartYViewPort;
@ -2407,7 +2407,7 @@ End;
xor ax, ax xor ax, ax
// add di, [VideoOfs] { point to correct gfx page ... } // add di, [VideoOfs] { point to correct gfx page ... }
mov al,es:[di] mov al,es:[di]
mov @Result,ax mov word ptr @Result,ax
end ['ax','di']; end ['ax','di'];
end; end;
@ -2556,7 +2556,7 @@ const CrtAddress: word = 0;
end; end;
Function GetPixelX(X,Y: smallint): word; Function GetPixelX(X,Y: smallint): ColorType;
{$ifndef asmgraph} {$ifndef asmgraph}
var offset: word; var offset: word;
{$endif asmgraph} {$endif asmgraph}
@ -2695,7 +2695,7 @@ const CrtAddress: word = 0;
end; end;
end; end;
Procedure PutPixelX(X,Y: smallint; color:word); Procedure PutPixelX(X,Y: smallint; color:ColorType);
{$ifndef asmgraph} {$ifndef asmgraph}
var offset: word; var offset: word;
{$endif asmgraph} {$endif asmgraph}

View File

@ -217,7 +217,7 @@ end;
{* 8-bit pixels VESA mode routines *} {* 8-bit pixels VESA mode routines *}
{************************************************************************} {************************************************************************}
procedure PutPixVESA256(x, y : smallint; color : word); procedure PutPixVESA256(x, y : smallint; color : ColorType);
var var
offs : longint; offs : longint;
begin begin
@ -272,7 +272,7 @@ end;
mem[WinWriteSeg : word(offs)] := Col; mem[WinWriteSeg : word(offs)] := Col;
end; end;
function GetPixVESA256(x, y : smallint): word; function GetPixVESA256(x, y : smallint): ColorType;
var var
offs : longint; offs : longint;
begin begin
@ -983,7 +983,7 @@ end;
{* 15/16bit pixels VESA mode routines *} {* 15/16bit pixels VESA mode routines *}
{************************************************************************} {************************************************************************}
procedure PutPixVESA32kOr64k(x, y : smallint; color : word); procedure PutPixVESA32kOr64k(x, y : smallint; color : ColorType);
var var
offs : longint; offs : longint;
place: word; place: word;
@ -1015,7 +1015,7 @@ end;
memW[WinWriteSeg : place] := color; memW[WinWriteSeg : place] := color;
end; end;
function GetPixVESA32kOr64k(x, y : smallint): word; function GetPixVESA32kOr64k(x, y : smallint): ColorType;
var var
offs : longint; offs : longint;
begin begin
@ -1393,7 +1393,7 @@ end;
{* 4-bit pixels VESA mode routines *} {* 4-bit pixels VESA mode routines *}
{************************************************************************} {************************************************************************}
procedure PutPixVESA16(x, y : smallint; color : word); procedure PutPixVESA16(x, y : smallint; color : ColorType);
var var
offs : longint; offs : longint;
dummy : byte; dummy : byte;
@ -1428,7 +1428,7 @@ end;
end; end;
Function GetPixVESA16(X,Y: smallint):word; Function GetPixVESA16(X,Y: smallint):ColorType;
Var dummy: Word; Var dummy: Word;
offset: longint; offset: longint;
shift: byte; shift: byte;