|
@@ -599,7 +599,6 @@ end;
|
|
|
(HLength >= 4+4-(offs and 3)) Then
|
|
|
{ align target }
|
|
|
Begin
|
|
|
- l := 0;
|
|
|
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 }
|
|
@@ -610,9 +609,9 @@ end;
|
|
|
for l := 1 to 4-(offs and 3) do
|
|
|
Mem[WinWriteSeg:word(offs)+l-1] :=
|
|
|
Mem[WinReadSeg:word(offs)+l-1] And Byte(CurrentColor);
|
|
|
+ Dec(HLength, l);
|
|
|
+ inc(offs, l);
|
|
|
End;
|
|
|
- Dec(HLength, l);
|
|
|
- inc(offs, l);
|
|
|
{$ifdef logging2}
|
|
|
LogLn('Offset is now '+hexstr(offs,8)+', length left: '+strf(hlength));
|
|
|
{$endif logging}
|
|
@@ -671,7 +670,6 @@ end;
|
|
|
(HLength >= 4+4-(offs and 3)) Then
|
|
|
{ align target }
|
|
|
Begin
|
|
|
- l := 0;
|
|
|
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 }
|
|
@@ -682,9 +680,9 @@ end;
|
|
|
for l := 1 to 4-(offs and 3) do
|
|
|
Mem[WinWriteSeg:word(offs)+l-1] :=
|
|
|
Mem[WinReadSeg:word(offs)+l-1] Xor Byte(CurrentColor);
|
|
|
+ Dec(HLength, l);
|
|
|
+ inc(offs, l);
|
|
|
End;
|
|
|
- Dec(HLength, l);
|
|
|
- inc(offs, l);
|
|
|
{$ifdef logging2}
|
|
|
LogLn('Offset is now '+hexstr(offs,8)+', length left: '+strf(hlength));
|
|
|
{$endif logging}
|
|
@@ -743,7 +741,6 @@ end;
|
|
|
(HLength >= 4+4-(offs and 3)) Then
|
|
|
{ align target }
|
|
|
Begin
|
|
|
- l := 0;
|
|
|
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 }
|
|
@@ -754,9 +751,9 @@ end;
|
|
|
for l := 1 to 4-(offs and 3) do
|
|
|
Mem[WinWriteSeg:word(offs)+l-1] :=
|
|
|
Mem[WinReadSeg:word(offs)+l-1] Or Byte(CurrentColor);
|
|
|
+ Dec(HLength, l);
|
|
|
+ inc(offs, l);
|
|
|
End;
|
|
|
- Dec(HLength, l);
|
|
|
- inc(offs, l);
|
|
|
{ it is possible that by aligningm we ended up in a new }
|
|
|
{ bank, so set the correct bank again to make sure }
|
|
|
setwritebank(offs shr 16);
|
|
@@ -816,7 +813,6 @@ end;
|
|
|
(HLength >= 4+4-(offs and 3)) Then
|
|
|
{ align target }
|
|
|
Begin
|
|
|
- l := 0;
|
|
|
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 }
|
|
@@ -826,9 +822,9 @@ end;
|
|
|
{$endif logging}
|
|
|
for l := 1 to 4-(offs and 3) do
|
|
|
Mem[WinWriteSeg:word(offs)+l-1] := Byte(Mask);
|
|
|
+ Dec(HLength, l);
|
|
|
+ inc(offs, l);
|
|
|
End;
|
|
|
- Dec(HLength, l);
|
|
|
- inc(offs, l);
|
|
|
{$ifdef logging2}
|
|
|
LogLn('Offset is now '+hexstr(offs,8)+', length left: '+strf(hlength));
|
|
|
{$endif logging}
|
|
@@ -1092,7 +1088,6 @@ end;
|
|
|
(amount > 7+8-(offs and 7))) Then
|
|
|
Begin
|
|
|
{ align target }
|
|
|
- l := 0;
|
|
|
If (offs and 7) <> 0 then
|
|
|
{ this cannot go past a window boundary bacause the }
|
|
|
{ size of a window is always a multiple of 8 }
|
|
@@ -1107,9 +1102,9 @@ end;
|
|
|
Mem[WinWriteSeg:word(offs)+l-1] := fill.pat[patternPos and 7];
|
|
|
inc(patternPos)
|
|
|
end;
|
|
|
+ Dec(amount, l);
|
|
|
+ inc(offs, l);
|
|
|
End;
|
|
|
- Dec(amount, l);
|
|
|
- inc(offs, l);
|
|
|
{$ifdef logging2}
|
|
|
LogLn('Offset is now '+hexstr(offs,8)+', length left: '+strf(amount));
|
|
|
{$endif logging2}
|