Browse Source

* 32bpp (True Color) compilation fixes

git-svn-id: trunk@40864 -
nickysn 6 years ago
parent
commit
5dadb05bdc
2 changed files with 13 additions and 13 deletions
  1. 4 4
      packages/graph/src/inc/graph.inc
  2. 9 9
      packages/graph/src/ptcgraph/ptcgraph.pp

+ 4 - 4
packages/graph/src/inc/graph.inc

@@ -1250,12 +1250,12 @@ end;
      NotInGraphicsMode;
      NotInGraphicsMode;
    end;
    end;
 
 
-  function GetPixelDefault(X,Y: smallint): word;
+  function GetPixelDefault(X,Y: smallint): ColorType;
    begin
    begin
      NotInGraphicsMode;
      NotInGraphicsMode;
    end;
    end;
 
 
-  procedure PutPixelDefault(X,Y: smallint; Color: Word);
+  procedure PutPixelDefault(X,Y: smallint; Color: ColorType);
    begin
    begin
      NotInGraphicsMode;
      NotInGraphicsMode;
    end;
    end;
@@ -1274,8 +1274,8 @@ end;
 
 
   procedure OutTextXYDefault(x,y : smallint;const TextString : string);forward;
   procedure OutTextXYDefault(x,y : smallint;const TextString : string);forward;
   procedure CircleDefault(X, Y: smallint; Radius:Word);forward;
   procedure CircleDefault(X, Y: smallint; Radius:Word);forward;
-  procedure SetBkColorDefault(ColorNum: Word);forward;
-  function GetBkColorDefault: Word;forward;
+  procedure SetBkColorDefault(ColorNum: ColorType);forward;
+  function GetBkColorDefault: ColorType;forward;
 
 
 {$i palette.inc}
 {$i palette.inc}
 
 

+ 9 - 9
packages/graph/src/ptcgraph/ptcgraph.pp

@@ -977,7 +977,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;
@@ -985,12 +985,12 @@ 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;
 
 
-procedure SetBkColorCGA320(ColorNum: Word);
+procedure SetBkColorCGA320(ColorNum: ColorType);
 begin
 begin
   if ColorNum > 15 then
   if ColorNum > 15 then
     exit;
     exit;
@@ -999,13 +999,13 @@ begin
   ptc_SetEGAPalette(0, ((ColorNum shl 1) and $10) or (ColorNum and $07));
   ptc_SetEGAPalette(0, ((ColorNum shl 1) and $10) or (ColorNum and $07));
 end;
 end;
 
 
-function GetBkColorCGA320: Word;
+function GetBkColorCGA320: ColorType;
 begin
 begin
   GetBkColorCGA320 := CurrentCGABkColor;
   GetBkColorCGA320 := CurrentCGABkColor;
 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;
@@ -1015,14 +1015,14 @@ begin
   ptc_SetEGAPalette(1, ((ColorNum shl 1) and $10) or (ColorNum and $07));
   ptc_SetEGAPalette(1, ((ColorNum shl 1) and $10) or (ColorNum and $07));
 end;
 end;
 
 
-function GetBkColorCGA640: Word;
+function GetBkColorCGA640: ColorType;
 begin
 begin
   GetBkColorCGA640 := CurrentCGABkColor;
   GetBkColorCGA640 := CurrentCGABkColor;
 end;
 end;
 
 
 { nickysn: VGA compatible implementation. I don't have a real MCGA to test
 { nickysn: VGA compatible implementation. I don't have a real MCGA to test
   if there's any difference with VGA }
   if there's any difference with VGA }
-procedure SetBkColorMCGA640(ColorNum: Word);
+procedure SetBkColorMCGA640(ColorNum: ColorType);
 begin
 begin
   if ColorNum > 15 then
   if ColorNum > 15 then
     exit;
     exit;
@@ -1031,7 +1031,7 @@ begin
   ptc_SetEGAPalette(0, ((ColorNum shl 1) and $10) or (ColorNum and $07));
   ptc_SetEGAPalette(0, ((ColorNum shl 1) and $10) or (ColorNum and $07));
 end;
 end;
 
 
-function GetBkColorMCGA640: Word;
+function GetBkColorMCGA640: ColorType;
 begin
 begin
   GetBkColorMCGA640 := CurrentCGABkColor;
   GetBkColorMCGA640 := CurrentCGABkColor;
 end;
 end;
@@ -1171,7 +1171,7 @@ begin
     begin
     begin
       pixels := ptc_surface_lock;
       pixels := ptc_surface_lock;
       {Get the pixel from the surface.}
       {Get the pixel from the surface.}
-      ptc_getpixelproc_16bpp:=pixels[x+y*PTCWidth];
+      ptc_getpixelproc_32bpp:=pixels[x+y*PTCWidth];
       ptc_surface_unlock;
       ptc_surface_unlock;
     end;
     end;
 end;
 end;