Changeset 52 for trunk/Start.pas
- Timestamp:
- Jan 11, 2017, 10:14:11 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Start.pas
r46 r52 1034 1034 1035 1035 procedure PaintFileMini; 1036 type1037 TLine = array [0 .. 99999999, 0 .. 2] of Byte;1038 1036 var 1039 1037 i, x, y, xm, cm, Tile, OwnColor, EnemyColor: integer; 1040 Mini Line, PrevMiniLine: ^TLine;1038 MiniPixel, PrevMiniPixel: PPixel32; 1041 1039 begin 1042 1040 OwnColor := GrExt[HGrSystem].Data.Canvas.Pixels[95, 67]; … … 1047 1045 if MiniMode = mmPicture then 1048 1046 begin 1049 MiniLine := nil;1050 1047 Mini.BeginUpdate; 1051 for y := 0 to MiniHeight - 1 do 1052 begin 1053 PrevMiniLine := MiniLine; 1054 MiniLine := Mini.ScanLine[y]; 1055 for x := 0 to MiniWidth - 1 do 1056 for i := 0 to 1 do 1057 begin 1048 for y := 0 to MiniHeight - 1 do begin 1049 for x := 0 to MiniWidth - 1 do begin 1050 for i := 0 to 1 do begin 1058 1051 xm := (x * 2 + i + y and 1) mod (MiniWidth * 2); 1052 MiniPixel := GetBitmapPixelPtr(Mini, xm, y); 1059 1053 Tile := SaveMap[x + MiniWidth * y]; 1060 1054 if Tile and fTerrain = fUNKNOWN then … … 1066 1060 else 1067 1061 cm := EnemyColor; 1068 if PrevMiniLine <> nil then 1069 begin // 2x2 city dot covers two scanlines 1070 PrevMiniLine[xm, 0] := cm shr 16; 1071 PrevMiniLine[xm, 1] := cm shr 8 and $FF; 1072 PrevMiniLine[xm, 2] := cm and $FF; 1062 if y > 0 then begin 1063 // 2x2 city dot covers two lines 1064 PrevMiniPixel := GetBitmapPixelPtr(Mini, xm, y - 1); 1065 PrevMiniPixel^.B := cm shr 16; 1066 PrevMiniPixel^.G:= cm shr 8 and $FF; 1067 PrevMiniPixel^.R := cm and $FF; 1073 1068 end 1074 1069 end … … 1080 1075 else 1081 1076 cm := MiniColors[Tile and fTerrain, i]; 1082 Mini Line[xm, 0]:= cm shr 16;1083 Mini Line[xm, 1]:= cm shr 8 and $FF;1084 Mini Line[xm, 2]:= cm and $FF;1077 MiniPixel^.B := cm shr 16; 1078 MiniPixel^.G:= cm shr 8 and $FF; 1079 MiniPixel^.R := cm and $FF; 1085 1080 end; 1081 end; 1086 1082 end; 1087 1083 Mini.EndUpdate;
Note:
See TracChangeset
for help on using the changeset viewer.