Browse Source

* fixed CGA 320x200 hline bug when CurrentColor=1

git-svn-id: trunk@26242 -
nickysn 11 years ago
parent
commit
2a0a8cfc00
2 changed files with 6 additions and 8 deletions
  1. 3 4
      packages/graph/src/go32v2/graph.pp
  2. 3 4
      packages/graph/src/msdos/graph.pp

+ 3 - 4
packages/graph/src/go32v2/graph.pp

@@ -829,7 +829,7 @@ begin
       AndPut:
       AndPut:
         begin
         begin
           { optimization }
           { optimization }
-          if CurrentColor = 1 then
+          if CurrentColor = 3 then
             exit;
             exit;
           Mem[SegB800:CurrentOffset] := Mem[SegB800:CurrentOffset] and (LBackMask or LForeMask);
           Mem[SegB800:CurrentOffset] := Mem[SegB800:CurrentOffset] and (LBackMask or LForeMask);
         end;
         end;
@@ -882,9 +882,8 @@ begin
       AndPut:
       AndPut:
         begin
         begin
           { optimization }
           { optimization }
-          if CurrentColor = 1 then
+          if CurrentColor = 3 then
             exit;
             exit;
-          { therefore, CurrentColor must be 0 }
           while MiddleAreaLength > 0 do
           while MiddleAreaLength > 0 do
           begin
           begin
             Mem[SegB800:CurrentOffset] := Mem[SegB800:CurrentOffset] and ForeMask;
             Mem[SegB800:CurrentOffset] := Mem[SegB800:CurrentOffset] and ForeMask;
@@ -927,7 +926,7 @@ begin
       AndPut:
       AndPut:
         begin
         begin
           { optimization }
           { optimization }
-          if CurrentColor = 1 then
+          if CurrentColor = 3 then
             exit;
             exit;
           Mem[SegB800:CurrentOffset] := Mem[SegB800:CurrentOffset] and (RBackMask or RForeMask);
           Mem[SegB800:CurrentOffset] := Mem[SegB800:CurrentOffset] and (RBackMask or RForeMask);
         end;
         end;

+ 3 - 4
packages/graph/src/msdos/graph.pp

@@ -777,7 +777,7 @@ begin
       AndPut:
       AndPut:
         begin
         begin
           { optimization }
           { optimization }
-          if CurrentColor = 1 then
+          if CurrentColor = 3 then
             exit;
             exit;
           Mem[SegB800:CurrentOffset] := Mem[SegB800:CurrentOffset] and (LBackMask or LForeMask);
           Mem[SegB800:CurrentOffset] := Mem[SegB800:CurrentOffset] and (LBackMask or LForeMask);
         end;
         end;
@@ -830,9 +830,8 @@ begin
       AndPut:
       AndPut:
         begin
         begin
           { optimization }
           { optimization }
-          if CurrentColor = 1 then
+          if CurrentColor = 3 then
             exit;
             exit;
-          { therefore, CurrentColor must be 0 }
           while MiddleAreaLength > 0 do
           while MiddleAreaLength > 0 do
           begin
           begin
             Mem[SegB800:CurrentOffset] := Mem[SegB800:CurrentOffset] and ForeMask;
             Mem[SegB800:CurrentOffset] := Mem[SegB800:CurrentOffset] and ForeMask;
@@ -875,7 +874,7 @@ begin
       AndPut:
       AndPut:
         begin
         begin
           { optimization }
           { optimization }
-          if CurrentColor = 1 then
+          if CurrentColor = 3 then
             exit;
             exit;
           Mem[SegB800:CurrentOffset] := Mem[SegB800:CurrentOffset] and (RBackMask or RForeMask);
           Mem[SegB800:CurrentOffset] := Mem[SegB800:CurrentOffset] and (RBackMask or RForeMask);
         end;
         end;