Changeset 188
- Timestamp:
- May 6, 2020, 11:21:12 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Back.pas
r105 r188 65 65 begin 66 66 if Assigned(Img) then 67 BitBlt (Canvas.Handle, Screen.Width - Img.Width - (Screen.Width - 800) *67 BitBltCanvas(Canvas, Screen.Width - Img.Width - (Screen.Width - 800) * 68 68 3 div 8, (Screen.Height - 600) div 3, Img.Width, Img.Height, 69 Img.Canvas .Handle, 0, 0, SRCCOPY);69 Img.Canvas, 0, 0); 70 70 end; 71 71 -
trunk/LocalPlayer/Battle.pas
r111 r188 107 107 VLightGradient(ca, xm - 8, ym + 8 + LABaseDamage, LADamage - LABaseDamage, 108 108 FanaticColor); 109 BitBlt (ca.Handle, xm - 12, ym - 12, 24, 24,110 GrExt[HGrSystem].Mask.Canvas .Handle, 26, 146, SRCAND);111 BitBlt (ca.Handle, xm - 12, ym - 12, 24, 24,112 GrExt[HGrSystem].Data.Canvas .Handle, 26, 146, SRCPAINT);109 BitBltCanvas(ca, xm - 12, ym - 12, 24, 24, 110 GrExt[HGrSystem].Mask.Canvas, 26, 146, SRCAND); 111 BitBltCanvas(ca, xm - 12, ym - 12, 24, 24, 112 GrExt[HGrSystem].Data.Canvas, 26, 146, SRCPAINT); 113 113 114 114 LabelText := Format('%d', [Forecast.AStr]); … … 132 132 if Forecast.EndHealthDef <= 0 then 133 133 begin 134 BitBlt (ca.Handle, xm + 9 + LDDamage - 7, ym - 6, 14, 17,135 GrExt[HGrSystem].Mask.Canvas .Handle, 51, 153, SRCAND);136 BitBlt (ca.Handle, xm + 8 + LDDamage - 7, ym - 7, 14, 17,137 GrExt[HGrSystem].Mask.Canvas .Handle, 51, 153, SRCAND);138 BitBlt (ca.Handle, xm + 8 + LDDamage - 7, ym - 7, 14, 17,139 GrExt[HGrSystem].Data.Canvas .Handle, 51, 153, SRCPAINT);134 BitBltCanvas(ca, xm + 9 + LDDamage - 7, ym - 6, 14, 17, 135 GrExt[HGrSystem].Mask.Canvas, 51, 153, SRCAND); 136 BitBltCanvas(ca, xm + 8 + LDDamage - 7, ym - 7, 14, 17, 137 GrExt[HGrSystem].Mask.Canvas, 51, 153, SRCAND); 138 BitBltCanvas(ca, xm + 8 + LDDamage - 7, ym - 7, 14, 17, 139 GrExt[HGrSystem].Data.Canvas, 51, 153, SRCPAINT); 140 140 end; 141 141 LabelText := Format('%d', [DDamage]); … … 152 152 if Forecast.EndHealthAtt <= 0 then 153 153 begin 154 BitBlt (ca.Handle, xm - 6, ym + 9 + LADamage - 7, 14, 17,155 GrExt[HGrSystem].Mask.Canvas .Handle, 51, 153, SRCAND);156 BitBlt (ca.Handle, xm - 7, ym + 8 + LADamage - 7, 14, 17,157 GrExt[HGrSystem].Mask.Canvas .Handle, 51, 153, SRCAND);158 BitBlt (ca.Handle, xm - 7, ym + 8 + LADamage - 7, 14, 17,159 GrExt[HGrSystem].Data.Canvas .Handle, 51, 153, SRCPAINT);154 BitBltCanvas(ca, xm - 6, ym + 9 + LADamage - 7, 14, 17, 155 GrExt[HGrSystem].Mask.Canvas, 51, 153, SRCAND); 156 BitBltCanvas(ca, xm - 7, ym + 8 + LADamage - 7, 14, 17, 157 GrExt[HGrSystem].Mask.Canvas, 51, 153, SRCAND); 158 BitBltCanvas(ca, xm - 7, ym + 8 + LADamage - 7, 14, 17, 159 GrExt[HGrSystem].Data.Canvas, 51, 153, SRCPAINT); 160 160 end; 161 161 LabelText := Format('%d', [MyUn[uix].Health - Forecast.EndHealthAtt]); … … 173 173 174 174 NoMap.SetOutput(Buffer); 175 BitBlt (Buffer.Canvas.Handle, 0, 0, 66, 48, ca.Handle, xm + 8 + 4,176 ym - 8 - 12 - 48 , SRCCOPY);175 BitBltCanvas(Buffer.Canvas, 0, 0, 66, 48, ca, xm + 8 + 4, 176 ym - 8 - 12 - 48); 177 177 { if TerrType<fForest then 178 178 Sprite(Buffer,HGrTerrain,0,16,66,32,1+TerrType*(xxt*2+1),1+yyt) … … 185 185 end; } 186 186 NoMap.PaintUnit(1, 0, UnitInfo, 0); 187 BitBlt (ca.Handle, xm + 8 + 4, ym - 8 - 12 - 48, 66, 48, Buffer.Canvas.Handle,188 0, 0 , SRCCOPY);189 190 BitBlt (Buffer.Canvas.Handle, 0, 0, 66, 48, ca.Handle, xm - 8 - 4 - 66,191 ym + 8 + 12 , SRCCOPY);187 BitBltCanvas(ca, xm + 8 + 4, ym - 8 - 12 - 48, 66, 48, Buffer.Canvas, 188 0, 0); 189 190 BitBltCanvas(Buffer.Canvas, 0, 0, 66, 48, ca, xm - 8 - 4 - 66, 191 ym + 8 + 12); 192 192 MakeUnitInfo(me, MyUn[uix], UnitInfo); 193 193 UnitInfo.Flags := UnitInfo.Flags and not unFortified; 194 194 NoMap.PaintUnit(1, 0, UnitInfo, 0); 195 BitBlt(ca.Handle, xm - 8 - 4 - 66, ym + 8 + 12, 66, 48, Buffer.Canvas.Handle, 196 0, 0, SRCCOPY); 195 BitBltCanvas(ca, xm - 8 - 4 - 66, ym + 8 + 12, 66, 48, Buffer.Canvas, 0, 0); 197 196 end; { PaintBattleOutcome } 198 197 -
trunk/LocalPlayer/CityScreen.pas
r173 r188 260 260 Back.Canvas.FillRect(0, 0, ClientWidth, ClientHeight); 261 261 262 bitblt (Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,263 MainTexture.Image.Canvas .Handle, 0, 0, SRCCOPY);262 bitbltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight, 263 MainTexture.Image.Canvas, 0, 0); 264 264 ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight); 265 265 end; … … 291 291 Color2 := Colors.Canvas.Pixels[clkAge0 + Age, cliHouse]; 292 292 SmallCityMap.Canvas.FillRect(0, 0, SmallCityMap.Width, SmallCityMap.Height); 293 bitblt (SmallCityMap.Canvas.Handle, 0, 0, 83, hSmallMap,294 SmallCityMapTemplate.Canvas .Handle, 83 * SizeClass, 0, SRCCOPY);293 bitbltCanvas(SmallCityMap.Canvas, 0, 0, 83, hSmallMap, 294 SmallCityMapTemplate.Canvas, 83 * SizeClass, 0); 295 295 if IsPort then 296 296 begin 297 bitblt (SmallCityMap.Canvas.Handle, 83, 0, 15, hSmallMap,298 SmallCityMapTemplate.Canvas .Handle, 332 + 15, 0, SRCCOPY);297 bitbltCanvas(SmallCityMap.Canvas, 83, 0, 15, hSmallMap, 298 SmallCityMapTemplate.Canvas, 332 + 15, 0); 299 299 ImageOp_CCC(SmallCityMap, 0, 0, 83, hSmallMap, Color0, Color1, Color2); 300 300 Color2 := Colors.Canvas.Pixels[clkCity, cliWater]; … … 303 303 else 304 304 begin 305 bitblt (SmallCityMap.Canvas.Handle, 83, 0, 15, hSmallMap,306 SmallCityMapTemplate.Canvas .Handle, 332, 0, SRCCOPY);305 bitbltCanvas(SmallCityMap.Canvas, 83, 0, 15, hSmallMap, 306 SmallCityMapTemplate.Canvas, 332, 0); 307 307 ImageOp_CCC(SmallCityMap, 0, 0, wSmallMap, hSmallMap, Color0, 308 308 Color1, Color2); … … 359 359 ZoomCityMap.Canvas.FillRect(0, 0, ZoomCityMap.Width, ZoomCityMap.Height); 360 360 361 bitblt (ZoomCityMap.Canvas.Handle, 0, 0, wZoomMap, hZoomMap,362 Back.Canvas .Handle, xZoomMap, yZoomMap, SRCCOPY);361 bitbltCanvas(ZoomCityMap.Canvas, 0, 0, wZoomMap, hZoomMap, 362 Back.Canvas, xZoomMap, yZoomMap); 363 363 if Mode = mImp then begin 364 364 if ZoomArea < 3 then begin … … 542 542 RedTex.clTextShade := $0000FF; 543 543 544 bitblt(offscreen.Canvas.Handle, 0, 0, 640, 480, Back.Canvas.Handle, 0, 545 0, SRCCOPY); 544 bitbltCanvas(offscreen.Canvas, 0, 0, 640, 480, Back.Canvas, 0, 0); 546 545 547 546 offscreen.Canvas.Font.Assign(UniFont[ftCaption]); … … 614 613 false, AllowChange and IsCityAlive and 615 614 (c.Status and csResourceWeightsMask = 0)); 616 bitblt (offscreen.Canvas.Handle, xmArea + 102, 42, 90, 33, Back.Canvas.Handle,617 xmArea + 102, 42 , SRCCOPY);615 bitbltCanvas(offscreen.Canvas, xmArea + 102, 42, 90, 33, Back.Canvas, 616 xmArea + 102, 42); 618 617 619 618 if IsCityAlive then … … 645 644 else 646 645 xGr := 141; 647 bitblt (offscreen.Canvas.Handle, xmArea - 192 + 5 + i * d, ymArea - 96 - 29,648 27, 30, GrExt[HGrSystem].Mask.Canvas .Handle, xGr, 171, SRCAND); { shadow }646 bitbltCanvas(offscreen.Canvas, xmArea - 192 + 5 + i * d, ymArea - 96 - 29, 647 27, 30, GrExt[HGrSystem].Mask.Canvas, xGr, 171, SRCAND); { shadow } 649 648 Sprite(offscreen, HGrSystem, xmArea - 192 + 4 + i * d, ymArea - 96 - 30, 27, 650 649 30, xGr, 171); … … 657 656 begin 658 657 xGr := 1 + 112; 659 bitblt (offscreen.Canvas.Handle, xmArea + 192 - 27 + 1 - i * d, 29 + 1, 27,660 30, GrExt[HGrSystem].Mask.Canvas .Handle, xGr, 171, SRCAND); { shadow }658 bitbltCanvas(offscreen.Canvas, xmArea + 192 - 27 + 1 - i * d, 29 + 1, 27, 659 30, GrExt[HGrSystem].Mask.Canvas, xGr, 171, SRCAND); { shadow } 661 660 Sprite(offscreen, HGrSystem, xmArea + 192 - 27 - i * d, 29, 27, 30, 662 661 xGr, 171); … … 803 802 804 803 // small map 805 bitblt (offscreen.Canvas.Handle, xSmallMap, ySmallMap, wSmallMap, hSmallMap,806 SmallCityMap.Canvas .Handle, 0, 0, SRCCOPY);804 bitbltCanvas(offscreen.Canvas, xSmallMap, ySmallMap, wSmallMap, hSmallMap, 805 SmallCityMap.Canvas, 0, 0); 807 806 if Mode = mImp then 808 807 Frame(offscreen.Canvas, xSmallMap + 48 * (ZoomArea div 3), … … 831 830 Sprite(offscreen, HGrSystem, x + 6, y - 5, 10, 10, 154, 126); 832 831 833 bitblt (offscreen.Canvas.Handle, xZoomMap, yZoomMap, wZoomMap, hZoomMap,834 ZoomCityMap.Canvas .Handle, 0, 0, SRCCOPY);832 bitbltCanvas(offscreen.Canvas, xZoomMap, yZoomMap, wZoomMap, hZoomMap, 833 ZoomCityMap.Canvas, 0, 0); 835 834 836 835 for i := 0 to 5 do … … 1620 1619 with Canvas do 1621 1620 begin 1622 bitblt (Canvas.Handle, xView + 5, yView + 1, 64, 2, Back.Canvas.Handle,1623 xView + 5, yView + 1 , SRCCOPY);1624 bitblt (Canvas.Handle, xView + 5, yView + 3, 2, 42, Back.Canvas.Handle,1625 xView + 5, yView + 3 , SRCCOPY);1626 bitblt (Canvas.Handle, xView + 5 + 62, yView + 3, 2, 42,1627 Back.Canvas .Handle, xView + 5 + 62, yView + 3, SRCCOPY);1621 bitbltCanvas(Canvas, xView + 5, yView + 1, 64, 2, Back.Canvas, 1622 xView + 5, yView + 1); 1623 bitbltCanvas(Canvas, xView + 5, yView + 3, 2, 42, Back.Canvas, 1624 xView + 5, yView + 3); 1625 bitbltCanvas(Canvas, xView + 5 + 62, yView + 3, 2, 42, 1626 Back.Canvas, xView + 5 + 62, yView + 3); 1628 1627 ScreenTools.Frame(Canvas, xView + 9 - 1, yView + 5 - 1, xView + 9 + xSizeBig, 1629 1628 yView + 5 + ySizeBig, $B0B0B0, $FFFFFF); … … 1644 1643 else if c.Project and cpImp = 0 then 1645 1644 begin // project is unit 1646 bitblt (Canvas.Handle, xView + 9, yView + 5, xSizeBig, ySizeBig,1647 bigimp.Canvas .Handle, 0, 0, SRCCOPY);1645 bitbltCanvas(Canvas, xView + 9, yView + 5, xSizeBig, ySizeBig, 1646 bigimp.Canvas, 0, 0); 1648 1647 with Tribe[cOwner].ModelPicture[c.Project and cpIndex] do 1649 1648 Sprite(Canvas, HGr, xView + 5, yView + 1, 64, 44, pix mod 10 * 65 + 1, -
trunk/LocalPlayer/CityType.pas
r57 r188 114 114 xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.clBevelLight, 115 115 MainTexture.clBevelShade); 116 BitBlt(offscreen.Canvas.Handle, xSwitch + 2 + i * 42, ySwitch + 2, 117 xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle, (i + 3) * xSizeSmall, 118 0, SRCCOPY) 116 BitBltCanvas(offscreen.Canvas, xSwitch + 2 + i * 42, ySwitch + 2, 117 xSizeSmall, ySizeSmall, SmallImp.Canvas, (i + 3) * xSizeSmall, 0); 119 118 end; 120 119 RisedTextOut(offscreen.Canvas, 8, yList + 32 * nListRow + 2, … … 149 148 yList + 16 + ySizeSmall div 2 + i div nListCol * 32, 150 149 MainTexture.clBevelLight, MainTexture.clBevelShade); 151 BitBlt (offscreen.Canvas.Handle, xList + 21 - xSizeSmall div 2 +150 BitBltCanvas(offscreen.Canvas, xList + 21 - xSizeSmall div 2 + 152 151 i mod nListCol * 42, yList + 16 - ySizeSmall div 2 + i div nListCol * 32, 153 xSizeSmall, ySizeSmall, SmallImp.Canvas .Handle,152 xSizeSmall, ySizeSmall, SmallImp.Canvas, 154 153 MyData.ImpOrder[ctype, i] mod 7 * xSizeSmall, 155 154 (MyData.ImpOrder[ctype, i] + SystemIconLines * 7) div 7 * 156 ySizeSmall , SRCCOPY);155 ySizeSmall); 157 156 inc(i); 158 157 end; … … 172 171 nPool div nPoolCol * 32, MainTexture.clBevelLight, 173 172 MainTexture.clBevelShade); 174 BitBlt (offscreen.Canvas.Handle, xPool + 21 - xSizeSmall div 2 +173 BitBltCanvas(offscreen.Canvas, xPool + 21 - xSizeSmall div 2 + 175 174 nPool mod nPoolCol * 42, yPool + 16 - ySizeSmall div 2 + 176 nPool div nPoolCol * 32, xSizeSmall, ySizeSmall, SmallImp.Canvas .Handle,175 nPool div nPoolCol * 32, xSizeSmall, ySizeSmall, SmallImp.Canvas, 177 176 iix mod 7 * xSizeSmall, (iix + SystemIconLines * 7) div 7 * 178 ySizeSmall , SRCCOPY);179 inc(nPool) 177 ySizeSmall); 178 inc(nPool); 180 179 end; 181 180 DeleteBtn.Visible := MyData.ImpOrder[ctype, 0] >= 0; -
trunk/LocalPlayer/Draft.pas
r104 r188 239 239 // assemble background from 2 texture tiles 240 240 begin 241 bitblt (Back.Canvas.Handle, 0, 0, ClientWidth, 64,242 MainTexture.Image.Canvas .Handle, (wMainTexture - ClientWidth) div 2,243 hMainTexture - 64 , SRCCOPY);244 bitblt (Back.Canvas.Handle, 0, 64, ClientWidth, ClientHeight - 64,245 MainTexture.Image.Canvas .Handle, (wMainTexture - ClientWidth) div 2,246 0 , SRCCOPY);241 bitbltCanvas(Back.Canvas, 0, 0, ClientWidth, 64, 242 MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2, 243 hMainTexture - 64); 244 bitbltCanvas(Back.Canvas, 0, 64, ClientWidth, ClientHeight - 64, 245 MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2, 246 0); 247 247 end 248 248 else 249 bitblt (Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,250 MainTexture.Image.Canvas .Handle, (wMainTexture - ClientWidth) div 2,251 (hMainTexture - ClientHeight) div 2 , SRCCOPY);249 bitbltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight, 250 MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2, 251 (hMainTexture - ClientHeight) div 2); 252 252 ImageOp_B(Back, Template, 0, 0, 0, 0, Template.Width, 64); 253 253 ImageOp_B(Back, Template, 0, 64, 0, 64 + Cut, Template.Width, 254 254 Template.Height - 64 - Cut); 255 255 256 bitblt (offscreen.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,257 Back.Canvas .Handle, 0, 0, SRCCOPY);256 bitbltCanvas(offscreen.Canvas, 0, 0, ClientWidth, ClientHeight, 257 Back.Canvas, 0, 0); 258 258 259 259 offscreen.Canvas.Font.Assign(UniFont[ftCaption]); -
trunk/LocalPlayer/Enhance.pas
r57 r188 96 96 for i := 0 to ControlCount - 1 do 97 97 if Controls[i] is TButtonC then 98 BitBlt (Canvas.Handle, Controls[i].Left + 2, Controls[i].Top - 11, 8, 8,99 GrExt[HGrSystem].Data.Canvas .Handle, 121 + Controls[i].Tag mod 7 * 9,100 1 + Controls[i].Tag div 7 * 9 , SRCCOPY);98 BitBltCanvas(Canvas, Controls[i].Left + 2, Controls[i].Top - 11, 8, 8, 99 GrExt[HGrSystem].Data.Canvas, 121 + Controls[i].Tag mod 7 * 9, 100 1 + Controls[i].Tag div 7 * 9); 101 101 end; 102 102 -
trunk/LocalPlayer/Help.pas
r172 r188 395 395 ca.FrameRect(rect(x+1,i*24+1,x+24-1,i*24+24-1)); 396 396 ca.Brush.Style:=bsClear; } 397 BitBlt (ca.Handle, x, y - 4, 24, 24, GrExt[HGrSystem].Data.Canvas.Handle, 1,398 146 , SRCCOPY);397 BitBltCanvas(ca, x, y - 4, 24, 24, GrExt[HGrSystem].Data.Canvas, 1, 398 146); 399 399 BiColorTextOut(ca, $FFFFFF, $7F007F, x + 10 - ca.Textwidth(s[1]) div 2, 400 400 y - 3, s[1]); … … 533 533 if 4 + i * 24 + yl > InnerHeight then 534 534 yl := InnerHeight - (4 + i * 24); 535 BitBlt (Handle, 8, 4 + i * 24, ExtPic.Width, yl, ExtPic.Canvas.Handle,536 0, 0 , SRCCOPY);535 BitBltCanvas(OffScreen.Canvas, 8, 4 + i * 24, ExtPic.Width, yl, ExtPic.Canvas, 536 0, 0); 537 537 end; 538 538 end; … … 574 574 8 + xSizeSmall + x0[i], 2 + 20 + i * 24, $000000, $000000); 575 575 if HelpLineInfo.Picpix = imPalace then 576 BitBlt (OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24,577 xSizeSmall, ySizeSmall, SmallImp.Canvas .Handle,578 0 * xSizeSmall, 1 * ySizeSmall , SRCCOPY)576 BitBltCanvas(OffScreen.Canvas, 8 + x0[i], 2 + i * 24, 577 xSizeSmall, ySizeSmall, SmallImp.Canvas, 578 0 * xSizeSmall, 1 * ySizeSmall) 579 579 else 580 BitBlt (OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24,581 xSizeSmall, ySizeSmall, SmallImp.Canvas .Handle,580 BitBltCanvas(OffScreen.Canvas, 8 + x0[i], 2 + i * 24, 581 xSizeSmall, ySizeSmall, SmallImp.Canvas, 582 582 HelpLineInfo.Picpix mod 7 * xSizeSmall, 583 583 (HelpLineInfo.Picpix + SystemIconLines * 7) div 7 * 584 ySizeSmall , SRCCOPY);584 ySizeSmall); 585 585 x0[i] := x0[i] + (8 + 8 + 36); 586 586 end; … … 641 641 $000000, $000000); 642 642 if AdvIcon[HelpLineInfo.Picpix] < 84 then 643 BitBlt (OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24,644 xSizeSmall, ySizeSmall, SmallImp.Canvas .Handle,643 BitBltCanvas(OffScreen.Canvas, 8 + x0[i], 2 + i * 24, 644 xSizeSmall, ySizeSmall, SmallImp.Canvas, 645 645 (AdvIcon[HelpLineInfo.Picpix] + SystemIconLines * 7) mod 7 * 646 646 xSizeSmall, (AdvIcon[HelpLineInfo.Picpix] + SystemIconLines * 647 7) div 7 * ySizeSmall , SRCCOPY)647 7) div 7 * ySizeSmall) 648 648 else 649 649 Dump(OffScreen, HGrSystem, 8 + x0[i], 2 + i * 24, 36, 20, … … 651 651 295 + (AdvIcon[HelpLineInfo.Picpix] - 84) div 8 * 21); 652 652 j := AdvValue[HelpLineInfo.Picpix] div 1000; 653 BitBlt (Handle, x0[i] + 4, 4 + i * 24, 14, 14,654 GrExt[HGrSystem].Mask.Canvas .Handle, 127 + j * 15, 85, SRCAND);653 BitBltCanvas(OffScreen.Canvas, x0[i] + 4, 4 + i * 24, 14, 14, 654 GrExt[HGrSystem].Mask.Canvas, 127 + j * 15, 85, SRCAND); 655 655 Sprite(OffScreen, HGrSystem, x0[i] + 3, 3 + i * 24, 14, 14, 656 656 127 + j * 15, 85); … … 828 828 ScreenTools.Frame(OffScreen.Canvas, 8 - 1 + x0[i], 2 - 1 + i * 24, 829 829 8 + xSizeSmall + x0[i], 2 + 20 + i * 24, $000000, $000000); 830 BitBlt (OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24, xSizeSmall,831 ySizeSmall, SmallImp.Canvas .Handle, (HelpLineInfo.Picpix - 1) *832 xSizeSmall, ySizeSmall , SRCCOPY);830 BitBltCanvas(OffScreen.Canvas, 8 + x0[i], 2 + i * 24, xSizeSmall, 831 ySizeSmall, SmallImp.Canvas, (HelpLineInfo.Picpix - 1) * 832 xSizeSmall, ySizeSmall); 833 833 x0[i] := x0[i] + (8 + 8 + 36); 834 834 end; -
trunk/LocalPlayer/IsoEngine.pas
r186 r188 23 23 procedure PaintCity(x, y: integer; const CityInfo: TCityInfo; 24 24 accessory: boolean = true); 25 procedure BitBlt (Src: TBitmap; x, y, Width, Height, xSrc, ySrc,25 procedure BitBltBitmap(Src: TBitmap; x, y, Width, Height, xSrc, ySrc, 26 26 Rop: integer); 27 27 … … 39 39 FLeft, FTop, FRight, FBottom, RealTop, RealBottom, AttLoc, DefLoc, 40 40 DefHealth, FAdviceLoc: integer; 41 DataDC, MaskDC: HDC; 41 DataCanvas: TCanvas; 42 MaskCanvas: TCanvas; 42 43 function Connection4(Loc, Mask, Value: integer): integer; 43 44 function Connection8(Loc, Mask: integer): integer; … … 194 195 DitherMask.SetSize(xxt * 2, yyt * 2); 195 196 DitherMask.Canvas.FillRect(0, 0, DitherMask.Width, DitherMask.Height); 196 BitBlt (DitherMask.Canvas.Handle, 0, 0, xxt * 2, yyt * 2,197 GrExt[HGrTerrain].Mask.Canvas .Handle, 1 + 7 * (xxt * 2 + 1),197 BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt * 2, 198 GrExt[HGrTerrain].Mask.Canvas, 1 + 7 * (xxt * 2 + 1), 198 199 1 + yyt + 15 * (yyt * 3 + 1), SRCAND); 199 200 … … 216 217 end; 217 218 for y := -1 to 6 do 218 BitBlt(LandPatch.Canvas.Handle, (x + 2) * (xxt * 2), (y + 2) * yyt, 219 xxt * 2, yyt, GrExt[HGrTerrain].Data.Canvas.Handle, xSrc, ySrc, 220 SRCCOPY); 219 BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2), (y + 2) * yyt, 220 xxt * 2, yyt, GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc); 221 221 for y := -2 to 6 do 222 BitBlt (LandPatch.Canvas.Handle, (x + 2) * (xxt * 2), (y + 2) * yyt, xxt,223 yyt, GrExt[HGrTerrain].Data.Canvas .Handle, xSrc + xxt, ySrc + yyt,222 BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2), (y + 2) * yyt, xxt, 223 yyt, GrExt[HGrTerrain].Data.Canvas, xSrc + xxt, ySrc + yyt, 224 224 SRCPAINT); 225 225 for y := -2 to 6 do 226 BitBlt (LandPatch.Canvas.Handle, (x + 2) * (xxt * 2) + xxt, (y + 2) * yyt,227 xxt, yyt, GrExt[HGrTerrain].Data.Canvas .Handle, xSrc, ySrc + yyt,226 BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2) + xxt, (y + 2) * yyt, 227 xxt, yyt, GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc + yyt, 228 228 SRCPAINT); 229 229 for y := -2 to 6 do 230 BitBlt (LandPatch.Canvas.Handle, (x + 2) * (xxt * 2), (y + 2) * yyt, xxt,231 yyt, DitherMask.Canvas .Handle, xxt, yyt, SRCAND);230 BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2), (y + 2) * yyt, xxt, 231 yyt, DitherMask.Canvas, xxt, yyt, SRCAND); 232 232 for y := -2 to 6 do 233 BitBlt (LandPatch.Canvas.Handle, (x + 2) * (xxt * 2) + xxt, (y + 2) * yyt,234 xxt, yyt, DitherMask.Canvas .Handle, 0, yyt, SRCAND);233 BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2) + xxt, (y + 2) * yyt, 234 xxt, yyt, DitherMask.Canvas, 0, yyt, SRCAND); 235 235 end; 236 236 … … 253 253 end; 254 254 for x := -2 to 6 do 255 BitBlt(LandMore.Canvas.Handle, (x + 2) * (xxt * 2), (y + 2) * yyt, 256 xxt * 2, yyt, GrExt[HGrTerrain].Data.Canvas.Handle, xSrc, ySrc, 257 SRCCOPY); 258 BitBlt(LandMore.Canvas.Handle, xxt * 2, (y + 2) * yyt, xxt, yyt, 259 GrExt[HGrTerrain].Data.Canvas.Handle, xSrc + xxt, ySrc + yyt, SRCPAINT); 255 BitBltCanvas(LandMore.Canvas, (x + 2) * (xxt * 2), (y + 2) * yyt, 256 xxt * 2, yyt, GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc); 257 BitBltCanvas(LandMore.Canvas, xxt * 2, (y + 2) * yyt, xxt, yyt, 258 GrExt[HGrTerrain].Data.Canvas, xSrc + xxt, ySrc + yyt, SRCPAINT); 260 259 for x := 0 to 7 do 261 BitBlt (LandMore.Canvas.Handle, (x + 2) * (xxt * 2) - xxt, (y + 2) * yyt,262 xxt * 2, yyt, GrExt[HGrTerrain].Data.Canvas .Handle, xSrc, ySrc + yyt,260 BitBltCanvas(LandMore.Canvas, (x + 2) * (xxt * 2) - xxt, (y + 2) * yyt, 261 xxt * 2, yyt, GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc + yyt, 263 262 SRCPAINT); 264 263 for x := -2 to 6 do 265 BitBlt (LandMore.Canvas.Handle, (x + 2) * (xxt * 2), (y + 2) * yyt,266 xxt * 2, yyt, DitherMask.Canvas .Handle, 0, 0, SRCAND);264 BitBltCanvas(LandMore.Canvas, (x + 2) * (xxt * 2), (y + 2) * yyt, 265 xxt * 2, yyt, DitherMask.Canvas, 0, 0, SRCAND); 267 266 end; 268 267 … … 276 275 ySrc := 1 + yyt; 277 276 if (x >= 1) = (y >= 2) then 278 BitBlt (OceanPatch.Canvas.Handle, x * (xxt * 2), y * yyt, xxt * 2, yyt,279 GrExt[HGrTerrain].Data.Canvas .Handle, xSrc, ySrc, SRCCOPY);277 BitBltCanvas(OceanPatch.Canvas, x * (xxt * 2), y * yyt, xxt * 2, yyt, 278 GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc); 280 279 if (x >= 1) and ((y < 2) or (x >= 2)) then 281 280 begin 282 BitBlt (OceanPatch.Canvas.Handle, x * (xxt * 2), y * yyt, xxt, yyt,283 GrExt[HGrTerrain].Data.Canvas .Handle, xSrc + xxt, ySrc + yyt,281 BitBltCanvas(OceanPatch.Canvas, x * (xxt * 2), y * yyt, xxt, yyt, 282 GrExt[HGrTerrain].Data.Canvas, xSrc + xxt, ySrc + yyt, 284 283 SRCPAINT); 285 BitBlt (OceanPatch.Canvas.Handle, x * (xxt * 2) + xxt, y * yyt, xxt, yyt,286 GrExt[HGrTerrain].Data.Canvas .Handle, xSrc, ySrc + yyt, SRCPAINT);284 BitBltCanvas(OceanPatch.Canvas, x * (xxt * 2) + xxt, y * yyt, xxt, yyt, 285 GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc + yyt, SRCPAINT); 287 286 end; 288 BitBlt (OceanPatch.Canvas.Handle, x * (xxt * 2), y * yyt, xxt, yyt,289 DitherMask.Canvas .Handle, xxt, yyt, SRCAND);290 BitBlt (OceanPatch.Canvas.Handle, x * (xxt * 2) + xxt, y * yyt, xxt, yyt,291 DitherMask.Canvas .Handle, 0, yyt, SRCAND);287 BitBltCanvas(OceanPatch.Canvas, x * (xxt * 2), y * yyt, xxt, yyt, 288 DitherMask.Canvas, xxt, yyt, SRCAND); 289 BitBltCanvas(OceanPatch.Canvas, x * (xxt * 2) + xxt, y * yyt, xxt, yyt, 290 DitherMask.Canvas, 0, yyt, SRCAND); 292 291 end; 293 292 … … 301 300 ySrc := 1 + yyt; 302 301 if (x < 1) or (y >= 2) then 303 BitBlt (OceanMore.Canvas.Handle, x * (xxt * 2), y * yyt, xxt * 2, yyt,304 GrExt[HGrTerrain].Data.Canvas .Handle, xSrc, ySrc, SRCCOPY);302 BitBltCanvas(OceanMore.Canvas, x * (xxt * 2), y * yyt, xxt * 2, yyt, 303 GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc); 305 304 if (x = 1) and (y < 2) or (x >= 2) and (y >= 1) then 306 305 begin 307 BitBlt (OceanMore.Canvas.Handle, x * (xxt * 2), y * yyt, xxt, yyt,308 GrExt[HGrTerrain].Data.Canvas .Handle, xSrc + xxt, ySrc + yyt,306 BitBltCanvas(OceanMore.Canvas, x * (xxt * 2), y * yyt, xxt, yyt, 307 GrExt[HGrTerrain].Data.Canvas, xSrc + xxt, ySrc + yyt, 309 308 SRCPAINT); 310 BitBlt (OceanMore.Canvas.Handle, x * (xxt * 2) + xxt, y * yyt, xxt, yyt,311 GrExt[HGrTerrain].Data.Canvas .Handle, xSrc, ySrc + yyt, SRCPAINT);309 BitBltCanvas(OceanMore.Canvas, x * (xxt * 2) + xxt, y * yyt, xxt, yyt, 310 GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc + yyt, SRCPAINT); 312 311 end; 313 BitBlt (OceanMore.Canvas.Handle, x * (xxt * 2), y * yyt, xxt * 2, yyt,314 DitherMask.Canvas .Handle, 0, 0, SRCAND);312 BitBltCanvas(OceanMore.Canvas, x * (xxt * 2), y * yyt, xxt * 2, yyt, 313 DitherMask.Canvas, 0, 0, SRCAND); 315 314 end; 316 315 317 BitBlt (DitherMask.Canvas.Handle, 0, 0, xxt * 2, yyt * 2,318 DitherMask.Canvas .Handle, 0, 0, DSTINVERT); { invert dither mask }319 BitBlt (DitherMask.Canvas.Handle, 0, 0, xxt * 2, yyt * 2,320 GrExt[HGrTerrain].Mask.Canvas .Handle, 1, 1 + yyt, SRCPAINT);316 BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt * 2, 317 DitherMask.Canvas, 0, 0, DSTINVERT); { invert dither mask } 318 BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt * 2, 319 GrExt[HGrTerrain].Mask.Canvas, 1, 1 + yyt, SRCPAINT); 321 320 322 321 for x := -1 to 6 do 323 322 for y := -2 to 6 do 324 BitBlt (LandPatch.Canvas.Handle, (x + 2) * (xxt * 2), (y + 2) * yyt,325 xxt * 2, yyt, DitherMask.Canvas .Handle, 0, 0, SRCAND);323 BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2), (y + 2) * yyt, 324 xxt * 2, yyt, DitherMask.Canvas, 0, 0, SRCAND); 326 325 327 326 for y := -1 to 6 do 328 327 for x := -2 to 7 do 329 BitBlt (LandMore.Canvas.Handle, (x + 2) * (xxt * 2) - xxt, (y + 2) * yyt,330 xxt * 2, yyt, DitherMask.Canvas .Handle, 0, yyt, SRCAND);331 332 BitBlt (LandPatch.Canvas.Handle, 0, 0, (xxt * 2) * 9, yyt * 9,333 LandMore.Canvas .Handle, 0, 0, SRCPAINT);328 BitBltCanvas(LandMore.Canvas, (x + 2) * (xxt * 2) - xxt, (y + 2) * yyt, 329 xxt * 2, yyt, DitherMask.Canvas, 0, yyt, SRCAND); 330 331 BitBltCanvas(LandPatch.Canvas, 0, 0, (xxt * 2) * 9, yyt * 9, 332 LandMore.Canvas, 0, 0, SRCPAINT); 334 333 335 334 for x := 0 to 3 do 336 335 for y := 0 to 3 do 337 BitBlt (OceanPatch.Canvas.Handle, x * (xxt * 2), y * yyt, xxt * 2, yyt,338 DitherMask.Canvas .Handle, 0, 0, SRCAND);336 BitBltCanvas(OceanPatch.Canvas, x * (xxt * 2), y * yyt, xxt * 2, yyt, 337 DitherMask.Canvas, 0, 0, SRCAND); 339 338 340 339 for y := 0 to 3 do 341 340 for x := 0 to 4 do 342 BitBlt (OceanMore.Canvas.Handle, x * (xxt * 2) - xxt, y * yyt, xxt * 2,343 yyt, DitherMask.Canvas .Handle, 0, yyt, SRCAND);344 345 BitBlt (OceanPatch.Canvas.Handle, 0, 0, (xxt * 2) * 4, yyt * 4,346 OceanMore.Canvas .Handle, 0, 0, SRCPAINT);341 BitBltCanvas(OceanMore.Canvas, x * (xxt * 2) - xxt, y * yyt, xxt * 2, 342 yyt, DitherMask.Canvas, 0, yyt, SRCAND); 343 344 BitBltCanvas(OceanPatch.Canvas, 0, 0, (xxt * 2) * 4, yyt * 4, 345 OceanMore.Canvas, 0, 0, SRCPAINT); 347 346 348 347 with DitherMask.Canvas do … … 351 350 FillRect(Rect(0, 0, xxt * 2, yyt)); 352 351 end; 353 BitBlt (DitherMask.Canvas.Handle, 0, 0, xxt * 2, yyt,354 GrExt[HGrTerrain].Mask.Canvas .Handle, 1, 1 + yyt, SRCCOPY);352 BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt, 353 GrExt[HGrTerrain].Mask.Canvas, 1, 1 + yyt); 355 354 356 355 for x := 0 to 6 do 357 BitBlt (LandPatch.Canvas.Handle, (x + 2) * (xxt * 2), yyt, xxt * 2, yyt,358 DitherMask.Canvas .Handle, 0, 0, SRCAND);359 BitBlt (DitherMask.Canvas.Handle, 0, 0, xxt * 2, yyt, DitherMask.Canvas.Handle,356 BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2), yyt, xxt * 2, yyt, 357 DitherMask.Canvas, 0, 0, SRCAND); 358 BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt, DitherMask.Canvas, 360 359 0, 0, DSTINVERT); 361 360 362 361 for y := 0 to 6 do 363 BitBlt (LandPatch.Canvas.Handle, xxt * 2, (y + 2) * yyt, xxt * 2, yyt,364 DitherMask.Canvas .Handle, 0, 0, SRCAND);362 BitBltCanvas(LandPatch.Canvas, xxt * 2, (y + 2) * yyt, xxt * 2, yyt, 363 DitherMask.Canvas, 0, 0, SRCAND); 365 364 366 365 LandMore.Free; … … 502 501 end; 503 502 504 procedure TIsoMap.BitBlt (Src: TBitmap; x, y, Width, Height, xSrc, ySrc,503 procedure TIsoMap.BitBltBitmap(Src: TBitmap; x, y, Width, Height, xSrc, ySrc, 505 504 Rop: integer); 506 505 begin … … 524 523 exit; 525 524 526 LCLIntf.BitBlt(FOutput.Canvas.Handle, x, y, Width, Height, Src.Canvas.Handle, 527 xSrc, ySrc, Rop); 525 BitBltCanvas(FOutput.Canvas, x, y, Width, Height, Src.Canvas, xSrc, ySrc, Rop); 528 526 end; 529 527 530 528 procedure TIsoMap.Sprite(HGr, xDst, yDst, Width, Height, xGr, yGr: integer); 531 529 begin 532 BitBlt (GrExt[HGr].Mask, xDst, yDst, Width, Height, xGr, yGr, SRCAND);533 BitBlt (GrExt[HGr].Data, xDst, yDst, Width, Height, xGr, yGr, SRCPAINT);530 BitBltBitmap(GrExt[HGr].Mask, xDst, yDst, Width, Height, xGr, yGr, SRCAND); 531 BitBltBitmap(GrExt[HGr].Data, xDst, yDst, Width, Height, xGr, yGr, SRCPAINT); 534 532 end; 535 533 … … 564 562 exit; 565 563 566 LCLIntf.BitBlt(FOutput.Canvas.Handle, xDst, yDst, Width, Height, MaskDC, xSrc, ySrc, SRCAND);564 BitBltCanvas(FOutput.Canvas, xDst, yDst, Width, Height, MaskCanvas, xSrc, ySrc, SRCAND); 567 565 if not PureBlack then 568 LCLIntf.BitBlt(FOutput.Canvas.Handle, xDst, yDst, Width, Height, DataDC, xSrc, ySrc, 569 SRCPAINT); 566 BitBltCanvas(FOutput.Canvas, xDst, yDst, Width, Height, DataCanvas, xSrc, ySrc, SRCPAINT); 570 567 end; 571 568 … … 615 612 xGr := 121 + j mod 7 * 9; 616 613 yGr := 1 + j div 7 * 9; 617 BitBlt (GrExt[HGrSystem].Mask, x + xsh + 3, y + ysh + 9, 8, 8, xGr,614 BitBltBitmap(GrExt[HGrSystem].Mask, x + xsh + 3, y + ysh + 9, 8, 8, xGr, 618 615 yGr, SRCAND); 619 616 Sprite(HGrSystem, x + xsh + 2, y + ysh + 8, 8, 8, xGr, yGr); … … 822 819 exit; 823 820 824 BitBlt (GrExt[HGrTerrain].Data, x + xxt div 2, y, xxt, yyt,821 BitBltBitmap(GrExt[HGrTerrain].Data, x + xxt div 2, y, xxt, yyt, 825 822 1 + (Conn shr 6 + Conn and 1 shl 2) * (xxt * 2 + 1), 826 823 1 + yyt + (16 + Tile and fTerrain) * (yyt * 3 + 1), SRCPAINT); 827 BitBlt (GrExt[HGrTerrain].Data, x + xxt, y + yyt div 2, xxt, yyt,824 BitBltBitmap(GrExt[HGrTerrain].Data, x + xxt, y + yyt div 2, xxt, yyt, 828 825 1 + (Conn and 7) * (xxt * 2 + 1) + xxt, 829 826 1 + yyt * 2 + (16 + Tile and fTerrain) * (yyt * 3 + 1), SRCPAINT); 830 BitBlt (GrExt[HGrTerrain].Data, x + xxt div 2, y + yyt, xxt, yyt,827 BitBltBitmap(GrExt[HGrTerrain].Data, x + xxt div 2, y + yyt, xxt, yyt, 831 828 1 + (Conn shr 2 and 7) * (xxt * 2 + 1) + xxt, 832 829 1 + yyt + (16 + Tile and fTerrain) * (yyt * 3 + 1), SRCPAINT); 833 BitBlt (GrExt[HGrTerrain].Data, x, y + yyt div 2, xxt, yyt,830 BitBltBitmap(GrExt[HGrTerrain].Data, x, y + yyt div 2, xxt, yyt, 834 831 1 + (Conn shr 4 and 7) * (xxt * 2 + 1), 835 832 1 + yyt * 2 + (16 + Tile and fTerrain) * (yyt * 3 + 1), SRCPAINT); 836 833 Conn := Connection4(Loc, fTerrain, fUNKNOWN); { dither to black } 837 834 if Conn and 1 <> 0 then 838 BitBlt (GrExt[HGrTerrain].Mask, x + xxt, y, xxt, yyt, 1 + 7 * (xxt * 2 + 1) +835 BitBltBitmap(GrExt[HGrTerrain].Mask, x + xxt, y, xxt, yyt, 1 + 7 * (xxt * 2 + 1) + 839 836 xxt, 1 + yyt + 15 * (yyt * 3 + 1), SRCAND); 840 837 if Conn and 2 <> 0 then 841 BitBlt (GrExt[HGrTerrain].Mask, x + xxt, y + yyt, xxt, yyt,838 BitBltBitmap(GrExt[HGrTerrain].Mask, x + xxt, y + yyt, xxt, yyt, 842 839 1 + 7 * (xxt * 2 + 1) + xxt, 1 + yyt * 2 + 15 * (yyt * 3 + 1), SRCAND); 843 840 if Conn and 4 <> 0 then 844 BitBlt (GrExt[HGrTerrain].Mask, x, y + yyt, xxt, yyt, 1 + 7 * (xxt * 2 + 1),841 BitBltBitmap(GrExt[HGrTerrain].Mask, x, y + yyt, xxt, yyt, 1 + 7 * (xxt * 2 + 1), 845 842 1 + yyt * 2 + 15 * (yyt * 3 + 1), SRCAND); 846 843 if Conn and 8 <> 0 then 847 BitBlt (GrExt[HGrTerrain].Mask, x, y, xxt, yyt, 1 + 7 * (xxt * 2 + 1),844 BitBltBitmap(GrExt[HGrTerrain].Mask, x, y, xxt, yyt, 1 + 7 * (xxt * 2 + 1), 848 845 1 + yyt + 15 * (yyt * 3 + 1), SRCAND); 849 846 end; … … 1010 1007 if BordersOK and (1 shl p1) = 0 then 1011 1008 begin 1012 // Clearing before bitbltSRCCOPY shouldn't be neccesary but for some1009 // Clearing before BitBltBitmap SRCCOPY shouldn't be neccesary but for some 1013 1010 // reason without it code works different then under Delphi 1014 1011 Borders.Canvas.FillRect(Bounds(0, p1 * (yyt * 2), xxt * 2, yyt * 2)); 1015 1012 1016 LCLIntf.BitBlt(Borders.Canvas.Handle, 0, p1 * (yyt * 2), xxt * 2,1017 yyt * 2, GrExt[HGrTerrain].Data.Canvas .Handle,1018 1 + 8 * (xxt * 2 + 1), 1 + yyt + 16 * (yyt * 3 + 1) , SRCCOPY);1013 BitBltCanvas(Borders.Canvas, 0, p1 * (yyt * 2), xxt * 2, 1014 yyt * 2, GrExt[HGrTerrain].Data.Canvas, 1015 1 + 8 * (xxt * 2 + 1), 1 + yyt + 16 * (yyt * 3 + 1)); 1019 1016 Borders.BeginUpdate; 1020 1017 for dy := 0 to yyt * 2 - 1 do … … 1046 1043 if p2 <> p1 then 1047 1044 begin 1048 BitBlt (GrExt[HGrTerrain].Mask, x + dx * xxt, y + dy * yyt, xxt,1045 BitBltBitmap(GrExt[HGrTerrain].Mask, x + dx * xxt, y + dy * yyt, xxt, 1049 1046 yyt, 1 + 8 * (xxt * 2 + 1) + dx * xxt, 1050 1047 1 + yyt + 16 * (yyt * 3 + 1) + dy * yyt, SRCAND); 1051 BitBlt (Borders, x + dx * xxt, y + dy * yyt, xxt, yyt, dx * xxt,1048 BitBltBitmap(Borders, x + dx * xxt, y + dy * yyt, xxt, yyt, dx * xxt, 1052 1049 p1 * (yyt * 2) + dy * yyt, SRCPAINT); 1053 1050 end … … 1490 1487 bix := 0 1491 1488 end; 1492 BitBlt (OceanPatch, x + dx * xxt, y + dy * yyt, xxt, yyt,1489 BitBltBitmap(OceanPatch, x + dx * xxt, y + dy * yyt, xxt, yyt, 1493 1490 Aix * (xxt * 2) + (dx + dy + 1) and 1 * xxt, bix * yyt, SRCCOPY) 1494 1491 end … … 1538 1535 bix := Aix; 1539 1536 if Aix = -1 then 1540 BitBlt (GrExt[HGrTerrain].Data, x + dx * xxt, y + dy * yyt, xxt,1537 BitBltBitmap(GrExt[HGrTerrain].Data, x + dx * xxt, y + dy * yyt, xxt, 1541 1538 yyt, 1 + 6 * (xxt * 2 + 1) + (dx + dy + 1) and 1 * xxt, 1 + yyt, 1542 1539 SRCCOPY) // arctic <-> ocean 1543 1540 else if bix = -1 then 1544 BitBlt (GrExt[HGrTerrain].Data, x + dx * xxt, y + dy * yyt, xxt,1541 BitBltBitmap(GrExt[HGrTerrain].Data, x + dx * xxt, y + dy * yyt, xxt, 1545 1542 yyt, 1 + 6 * (xxt * 2 + 1) + xxt - (dx + dy + 1) and 1 * xxt, 1546 1543 1 + yyt * 2, SRCCOPY) // arctic <-> ocean 1547 1544 else 1548 BitBlt (LandPatch, x + dx * xxt, y + dy * yyt, xxt, yyt,1545 BitBltBitmap(LandPatch, x + dx * xxt, y + dy * yyt, xxt, yyt, 1549 1546 Aix * (xxt * 2) + (dx + dy + 1) and 1 * xxt, bix * yyt, SRCCOPY) 1550 1547 end 1551 1548 end; 1552 1549 1553 Data DC := GrExt[HGrTerrain].Data.Canvas.Handle;1554 Mask DC := GrExt[HGrTerrain].Mask.Canvas.Handle;1550 DataCanvas := GrExt[HGrTerrain].Data.Canvas; 1551 MaskCanvas := GrExt[HGrTerrain].Mask.Canvas; 1555 1552 for dy := -2 to ny + 1 do 1556 1553 for dx := -1 to nx do -
trunk/LocalPlayer/MessgEx.pas
r173 r188 291 291 292 292 // paint 293 BitBltCanvas(LogoBuffer.Canvas, 0, 0, wb, hb, ca, x, y , SRCCOPY);293 BitBltCanvas(LogoBuffer.Canvas, 0, 0, wb, hb, ca, x, y); 294 294 295 295 if IconIndex >= 0 then … … 304 304 ImageOp_BCC(LogoBuffer, Templates, 0, 0, xb, yb, wb, hb, clCover, clPage); 305 305 306 BitBlt (ca.Handle, x, y, wb, hb, LogoBuffer.Canvas.Handle, 0, 0, SRCCOPY);306 BitBltCanvas(ca, x, y, wb, hb, LogoBuffer.Canvas, 0, 0); 307 307 end; 308 308 … … 328 328 with MyRO.EnemyModel[emix], Tribe[Owner].ModelPicture[mix] do 329 329 begin 330 BitBlt (Canvas.Handle, x, y, 64, 48, GrExt[HGr].Mask.Canvas.Handle,330 BitBltCanvas(Canvas, x, y, 64, 48, GrExt[HGr].Mask.Canvas, 331 331 pix mod 10 * 65 + 1, pix div 10 * 49 + 1, SRCAND); 332 BitBlt (Canvas.Handle, x, y, 64, 48, GrExt[HGr].Data.Canvas.Handle,332 BitBltCanvas(Canvas, x, y, 64, 48, GrExt[HGr].Data.Canvas, 333 333 pix mod 10 * 65 + 1, pix div 10 * 49 + 1, SRCPAINT); 334 334 end; … … 371 371 begin 372 372 p1 := MyRO.Wonder[IconIndex].EffectiveOwner; 373 BitBlt (Buffer.Canvas.Handle, 0, 0, xSizeBig + 2 * GlowRange,374 ySizeBig + 2 * GlowRange, Canvas .Handle,375 ClientWidth div 2 - (28 + GlowRange), 24 - GlowRange , SRCCOPY);376 BitBlt (Buffer.Canvas.Handle, GlowRange, GlowRange, xSizeBig, ySizeBig,377 BigImp.Canvas .Handle, IconIndex mod 7 * xSizeBig,378 (IconIndex + SystemIconLines * 7) div 7 * ySizeBig , SRCCOPY);373 BitBltCanvas(Buffer.Canvas, 0, 0, xSizeBig + 2 * GlowRange, 374 ySizeBig + 2 * GlowRange, Canvas, 375 ClientWidth div 2 - (28 + GlowRange), 24 - GlowRange); 376 BitBltCanvas(Buffer.Canvas, GlowRange, GlowRange, xSizeBig, ySizeBig, 377 BigImp.Canvas, IconIndex mod 7 * xSizeBig, 378 (IconIndex + SystemIconLines * 7) div 7 * ySizeBig); 379 379 if p1 < 0 then 380 380 GlowFrame(Buffer, GlowRange, GlowRange, xSizeBig, ySizeBig, $000000) … … 382 382 GlowFrame(Buffer, GlowRange, GlowRange, xSizeBig, ySizeBig, 383 383 Tribe[p1].Color); 384 BitBlt (Canvas.Handle, ClientWidth div 2 - (28 + GlowRange),384 BitBltCanvas(Canvas, ClientWidth div 2 - (28 + GlowRange), 385 385 24 - GlowRange, xSizeBig + 2 * GlowRange, ySizeBig + 2 * GlowRange, 386 Buffer.Canvas .Handle, 0, 0, SRCCOPY);386 Buffer.Canvas, 0, 0); 387 387 end 388 388 else … … 400 400 FrameImage(Canvas, BigImp, ClientWidth div 2 - 28, 24, xSizeBig, 401 401 ySizeBig, 0, 0); 402 BitBlt (Canvas.Handle, ClientWidth div 2 - 32, 20, 64, 44,403 GrExt[HGr].Mask.Canvas .Handle, pix mod 10 * 65 + 1,402 BitBltCanvas(Canvas, ClientWidth div 2 - 32, 20, 64, 44, 403 GrExt[HGr].Mask.Canvas, pix mod 10 * 65 + 1, 404 404 pix div 10 * 49 + 1, SRCAND); 405 BitBlt (Canvas.Handle, ClientWidth div 2 - 32, 20, 64, 44,406 GrExt[HGr].Data.Canvas .Handle, pix mod 10 * 65 + 1,405 BitBltCanvas(Canvas, ClientWidth div 2 - 32, 20, 64, 44, 406 GrExt[HGr].Data.Canvas, pix mod 10 * 65 + 1, 407 407 pix div 10 * 49 + 1, SRCPAINT); 408 408 end; … … 415 415 Frame(Canvas, ClientWidth div 2 - 32 - 1, 24 - 1, 416 416 ClientWidth div 2 + 32, 24 + 48, $000000, $000000); 417 BitBlt (Canvas.Handle, ClientWidth div 2 - 32, 24, 64, 48,418 GrExt[Tribe[IconIndex].faceHGr].Data.Canvas .Handle,417 BitBltCanvas(Canvas, ClientWidth div 2 - 32, 24, 64, 48, 418 GrExt[Tribe[IconIndex].faceHGr].Data.Canvas, 419 419 1 + Tribe[IconIndex].facepix mod 10 * 65, 420 1 + Tribe[IconIndex].facepix div 10 * 49 , SRCCOPY)420 1 + Tribe[IconIndex].facepix div 10 * 49) 421 421 end; 422 422 mikPureIcon: … … 430 430 begin 431 431 BitBltCanvas(Buffer.Canvas, 0, 0, 140, 120, Canvas, 432 (ClientWidth - 140) div 2, 24 , SRCCOPY);432 (ClientWidth - 140) div 2, 24); 433 433 ImageOp_BCC(Buffer, Templates, 0, 0, 1, 279, 140, 120, 0, $FFFFFF); 434 BitBlt (Canvas.Handle, (ClientWidth - 140) div 2, 24, 140, 120,435 Buffer.Canvas .Handle, 0, 0, SRCCOPY);434 BitBltCanvas(Canvas, (ClientWidth - 140) div 2, 24, 140, 120, 435 Buffer.Canvas, 0, 0); 436 436 end; 437 437 mikMyArmy: -
trunk/LocalPlayer/NatStat.pas
r104 r188 109 109 begin 110 110 AgePrepared := MainTextureAge; 111 bitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,112 MainTexture.Image.Canvas .Handle, (wMainTexture - ClientWidth) div 2,113 (hMainTexture - ClientHeight) div 2 , SRCCOPY);111 BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight, 112 MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2, 113 (hMainTexture - ClientHeight) div 2); 114 114 ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight); 115 115 end … … 264 264 Extinct := 1 shl pView and MyRO.Alive = 0; 265 265 266 bitblt(offscreen.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,267 Back.Canvas .Handle, 0, 0, SRCCOPY);266 BitBltCanvas(offscreen.Canvas, 0, 0, ClientWidth, ClientHeight, 267 Back.Canvas, 0, 0); 268 268 269 269 offscreen.Canvas.Font.Assign(UniFont[ftCaption]); -
trunk/LocalPlayer/Rates.pas
r61 r188 95 95 GlowFrame(Offscreen, ClientWidth div 2 - xSizeBig div 2, 52, xSizeBig, 96 96 ySizeBig, Tribe[me].Color); 97 BitBlt (Offscreen.Canvas.Handle, ClientWidth div 2 - xSizeBig div 2, 52,98 xSizeBig, ySizeBig, BigImp.Canvas .Handle, (woLiberty mod 7) * xSizeBig,99 (woLiberty div 7 + SystemIconLines) * ySizeBig , SRCCOPY);97 BitBltCanvas(Offscreen.Canvas, ClientWidth div 2 - xSizeBig div 2, 52, 98 xSizeBig, ySizeBig, BigImp.Canvas, (woLiberty mod 7) * xSizeBig, 99 (woLiberty div 7 + SystemIconLines) * ySizeBig); 100 100 end 101 101 else … … 122 122 begin 123 123 for i := 0 to current div 8 - 1 do 124 BitBlt (Handle, x + max - 8 - i * 8, y, 8, 7,125 GrExt[HGrSystem].Data.Canvas .Handle, 104, 9 + 8 * 2, SRCCOPY);126 BitBlt (Handle, x + max - current, y, current - 8 * (current div 8), 7,127 GrExt[HGrSystem].Data.Canvas .Handle, 104, 9 + 8 * 2, SRCCOPY);124 BitBltCanvas(Offscreen.Canvas, x + max - 8 - i * 8, y, 8, 7, 125 GrExt[HGrSystem].Data.Canvas, 104, 9 + 8 * 2); 126 BitBltCanvas(Offscreen.Canvas, x + max - current, y, current - 8 * (current div 8), 7, 127 GrExt[HGrSystem].Data.Canvas, 104, 9 + 8 * 2); 128 128 Brush.Color := $000000; 129 129 FillRect(Rect(x, y, x + max - current, y + 7)); -
trunk/LocalPlayer/Select.pas
r89 r188 197 197 if pix and cpType = 0 then 198 198 if (pix and cpIndex = imPalace) and (MyRO.Government <> gAnarchy) then 199 BitBlt (offscreen.Canvas.Handle, x + 16, y + (16 - 1), xSizeSmall,200 ySizeSmall, SmallImp.Canvas .Handle, (MyRO.Government - 1) *201 xSizeSmall, ySizeSmall , SRCCOPY)199 BitBltCanvas(offscreen.Canvas, x + 16, y + (16 - 1), xSizeSmall, 200 ySizeSmall, SmallImp.Canvas, (MyRO.Government - 1) * 201 xSizeSmall, ySizeSmall) 202 202 else 203 BitBlt (offscreen.Canvas.Handle, x + 16, y + (16 - 1), xSizeSmall,204 ySizeSmall, SmallImp.Canvas .Handle, pix and cpIndex mod 7 *203 BitBltCanvas(offscreen.Canvas, x + 16, y + (16 - 1), xSizeSmall, 204 ySizeSmall, SmallImp.Canvas, pix and cpIndex mod 7 * 205 205 xSizeSmall, (pix and cpIndex + SystemIconLines * 7) div 7 * 206 ySizeSmall , SRCCOPY)206 ySizeSmall) 207 207 else 208 BitBlt (offscreen.Canvas.Handle, x + 16, y + (16 - 1), xSizeSmall,209 ySizeSmall, SmallImp.Canvas .Handle, (3 + pix and cpIndex) *210 xSizeSmall, 0 , SRCCOPY)208 BitBltCanvas(offscreen.Canvas, x + 16, y + (16 - 1), xSizeSmall, 209 ySizeSmall, SmallImp.Canvas, (3 + pix and cpIndex) * 210 xSizeSmall, 0); 211 211 end; 212 212 end; … … 568 568 MainTexture.clBevelLight, MainTexture.clBevelShade); 569 569 if AdvIcon[lix] < 84 then 570 BitBlt (offscreen.Canvas.Handle, (8 + 16), y0, xSizeSmall,571 ySizeSmall, SmallImp.Canvas .Handle,570 BitBltCanvas(offscreen.Canvas, (8 + 16), y0, xSizeSmall, 571 ySizeSmall, SmallImp.Canvas, 572 572 (AdvIcon[lix] + SystemIconLines * 7) mod 7 * xSizeSmall, 573 573 (AdvIcon[lix] + SystemIconLines * 7) div 7 * 574 ySizeSmall , SRCCOPY)574 ySizeSmall) 575 575 else 576 576 Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, … … 578 578 295 + (AdvIcon[lix] - 84) div 8 * 21); 579 579 j := AdvValue[lix] div 1000; 580 BitBlt (Handle, (8 + 16 - 4), y0 + 2, 14, 14,581 GrExt[HGrSystem].Mask.Canvas .Handle, 127 + j * 15,580 BitBltCanvas(Canvas, (8 + 16 - 4), y0 + 2, 14, 14, 581 GrExt[HGrSystem].Mask.Canvas, 127 + j * 15, 582 582 85, SRCAND); 583 583 Sprite(offscreen, HGrSystem, (8 + 16 - 5), y0 + 1, 14, 14, … … 673 673 8 + 16 + xSizeSmall, y0 - 15 + (16 - 1 + ySizeSmall), 674 674 MainTexture.clBevelLight, MainTexture.clBevelShade); 675 BitBlt (offscreen.Canvas.Handle, 8 + 16, y0 - 15 + (16 - 1),676 xSizeSmall, ySizeSmall, SmallImp.Canvas .Handle,677 (lix - 1) * xSizeSmall, ySizeSmall , SRCCOPY);675 BitBltCanvas(offscreen.Canvas, 8 + 16, y0 - 15 + (16 - 1), 676 xSizeSmall, ySizeSmall, SmallImp.Canvas, 677 (lix - 1) * xSizeSmall, ySizeSmall); 678 678 end 679 679 end; … … 817 817 ClientHeight - 29, s); 818 818 BitBltCanvas(ScienceNationDot.Canvas, 0, 0, 17, 17, Canvas, 819 xScreen - 10, ClientHeight - 27 , SRCCOPY);819 xScreen - 10, ClientHeight - 27); 820 820 ImageOp_BCC(ScienceNationDot, Templates, 0, 0, 114, 211, 17, 17, 821 821 MainTexture.clBevelShade, Tribe[ScienceNation].Color); 822 BitBlt (Canvas.Handle, xScreen - 10, ClientHeight - 27, 17, 17,823 ScienceNationDot.Canvas .Handle, 0, 0, SRCCOPY);822 BitBltCanvas(Canvas, xScreen - 10, ClientHeight - 27, 17, 17, 823 ScienceNationDot.Canvas, 0, 0); 824 824 end; 825 825 end -
trunk/LocalPlayer/TechTree.pas
r170 r188 108 108 -BlackBorder - yOffset, Paper); 109 109 end; 110 BitBlt (Canvas.Handle, max(BlackBorder, BlackBorder + xOffset),110 BitBltCanvas(Canvas, max(BlackBorder, BlackBorder + xOffset), 111 111 max(BlackBorder, BlackBorder + yOffset), 112 112 min(Image.width, min(Image.width + xOffset, … … 114 114 ), min(Image.height, min(Image.height + yOffset, 115 115 min(ClientHeight - 2 * BlackBorder, ClientHeight - 2 * BlackBorder - 116 yOffset))), Image.Canvas .Handle, max(0, -xOffset),117 max(0, -yOffset) , SRCCOPY);116 yOffset))), Image.Canvas, max(0, -xOffset), 117 max(0, -yOffset)); 118 118 end; 119 119 -
trunk/LocalPlayer/Term.pas
r182 r188 2748 2748 begin 2749 2749 if AILogo[pLogo] <> nil then 2750 BitBlt (Canvas.Handle, (xRightPanel + 10) - (16 + 64),2751 ClientHeight - PanelHeight, 64, 64, AILogo[pLogo].Canvas .Handle,2752 0, 0 , SRCCOPY);2750 BitBltCanvas(Canvas, (xRightPanel + 10) - (16 + 64), 2751 ClientHeight - PanelHeight, 64, 64, AILogo[pLogo].Canvas, 2752 0, 0); 2753 2753 end 2754 2754 end … … 4038 4038 exit; 4039 4039 4040 NoMap.BitBlt (Panel, -xMap - MapOffset, -yMap + MapHeight - overlap, xMidPanel,4040 NoMap.BitBltBitmap(Panel, -xMap - MapOffset, -yMap + MapHeight - overlap, xMidPanel, 4041 4041 overlap, 0, 0, SRCCOPY); 4042 NoMap.BitBlt (Panel, -xMap - MapOffset + xRightPanel,4042 NoMap.BitBltBitmap(Panel, -xMap - MapOffset + xRightPanel, 4043 4043 -yMap + MapHeight - overlap, Panel.width - xRightPanel, overlap, 4044 4044 xRightPanel, 0, SRCCOPY); … … 4046 4046 begin 4047 4047 if xMap < 0 then 4048 BitBlt (Canvas.Handle, MapOffset, TopBarHeight, width + xMap,4049 height + yMap, Buffer.Canvas .Handle, -xMap, -yMap, SRCCOPY)4048 BitBltCanvas(Canvas, MapOffset, TopBarHeight, width + xMap, 4049 height + yMap, Buffer.Canvas, -xMap, -yMap) 4050 4050 else 4051 BitBlt (Canvas.Handle, xMap + MapOffset, TopBarHeight, width,4052 height + yMap, Buffer.Canvas .Handle, 0, -yMap, SRCCOPY)4051 BitBltCanvas(Canvas, xMap + MapOffset, TopBarHeight, width, 4052 height + yMap, Buffer.Canvas, 0, -yMap) 4053 4053 end 4054 4054 else 4055 4055 begin 4056 4056 if xMap < 0 then 4057 BitBlt (Canvas.Handle, MapOffset, TopBarHeight + yMap, width + xMap,4058 height, Buffer.Canvas .Handle, -xMap, 0, SRCCOPY)4057 BitBltCanvas(Canvas, MapOffset, TopBarHeight + yMap, width + xMap, 4058 height, Buffer.Canvas, -xMap, 0) 4059 4059 else 4060 BitBlt (Canvas.Handle, xMap + MapOffset, TopBarHeight + yMap, width,4061 height, Buffer.Canvas .Handle, 0, 0, SRCCOPY);4060 BitBltCanvas(Canvas, xMap + MapOffset, TopBarHeight + yMap, width, 4061 height, Buffer.Canvas, 0, 0); 4062 4062 end 4063 4063 end; … … 4184 4184 begin 4185 4185 BitBltCanvas(Canvas, lprcScroll.Left + dx, lprcScroll.Top + dy, lprcScroll.Right - lprcScroll.Left, lprcScroll.Bottom - lprcScroll.Top, 4186 Canvas, lprcScroll.Left, lprcScroll.Top , SRCCOPY);4186 Canvas, lprcScroll.Left, lprcScroll.Top); 4187 4187 end; 4188 4188 {$ENDIF} … … 4329 4329 procedure TMainScreen.CopyMiniToPanel; 4330 4330 begin 4331 BitBlt (Panel.Canvas.Handle, xMini + 2, yMini + 2, G.lx * 2, G.ly,4332 Mini.Canvas .Handle, 0, 0, SRCCOPY);4331 BitBltCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly, 4332 Mini.Canvas, 0, 0); 4333 4333 if MarkCityLoc >= 0 then 4334 4334 Sprite(Panel, HGrSystem, xMini - 2 + (4 * G.lx + 2 * (MarkCityLoc mod G.lx) … … 4418 4418 ClientWidth - xPalace + xSizeBig + 1, yPalace + ySizeBig + 1, 4419 4419 $FFFFFF, $B0B0B0); 4420 BitBlt (Panel.Canvas.Handle, ClientWidth - xPalace, yPalace, xSizeBig,4421 ySizeBig, GrExt[HGrSystem2].Data.Canvas .Handle, 70, 123, SRCCOPY);4420 BitBltCanvas(Panel.Canvas, ClientWidth - xPalace, yPalace, xSizeBig, 4421 ySizeBig, GrExt[HGrSystem2].Data.Canvas, 70, 123); 4422 4422 end 4423 4423 else if MyRO.NatBuilt[imPalace] > 0 then … … 5276 5276 PaintLoc(MouseLoc, 2); 5277 5277 MiniPaint; 5278 BitBlt (Panel.Canvas.Handle, xMini + 2, yMini + 2, G.lx * 2, G.ly,5279 Mini.Canvas .Handle, 0, 0, SRCCOPY);5278 BitBltCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly, 5279 Mini.Canvas, 0, 0); 5280 5280 if ywmax <= 0 then 5281 5281 Frame(Panel.Canvas, xMini + 2 + G.lx - MapWidth div (2 * xxt), … … 6100 6100 for Step := 0 to abs(Step1 - Step0) do 6101 6101 begin 6102 BitBlt (Buffer.Canvas.Handle, 0, 0, xRange, yRange,6103 offscreen.Canvas .Handle, xMin, yMin, SRCCOPY);6102 BitBltCanvas(Buffer.Canvas, 0, 0, xRange, yRange, 6103 offscreen.Canvas, xMin, yMin); 6104 6104 if Step1 <> Step0 then 6105 6105 begin … … 6142 6142 if Restore then 6143 6143 begin 6144 BitBlt(Buffer.Canvas.Handle, 0, 0, xRange, yRange, offscreen.Canvas.Handle, 6145 xMin, yMin, SRCCOPY); 6144 BitBltCanvas(Buffer.Canvas, 0, 0, xRange, yRange, offscreen.Canvas, xMin, yMin); 6146 6145 PaintBufferToScreen(xMin, yMin, xRange, yRange); 6147 6146 end; … … 7558 7557 yw := ywmax; 7559 7558 end; 7560 BitBlt(Buffer.Canvas.Handle, 0, 0, G.lx * 2, G.ly, Mini.Canvas.Handle, 0, 7561 0, SRCCOPY); 7559 BitBltCanvas(Buffer.Canvas, 0, 0, G.lx * 2, G.ly, Mini.Canvas, 0, 0); 7562 7560 if ywmax <= 0 then 7563 7561 Frame(Buffer.Canvas, x - xMini - 2 - MapWidth div (xxt * 2), 0, … … 7568 7566 x - xMini - 2 + MapWidth div (xxt * 2) - 1, yw + MapHeight div yyt - 7569 7567 2, MainTexture.clMark, MainTexture.clMark); 7570 BitBlt (Panel.Canvas.Handle, xMini + 2, yMini + 2, G.lx * 2, G.ly,7571 Buffer.Canvas .Handle, 0, 0, SRCCOPY);7568 BitBltCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly, 7569 Buffer.Canvas, 0, 0); 7572 7570 MainOffscreenPaint; 7573 7571 RectInvalidate(xMini + 2, TopBarHeight + MapHeight - overlap + yMini + 2, … … 7578 7576 end 7579 7577 else 7580 Tracking := false 7578 Tracking := false; 7581 7579 end; 7582 7580 … … 7720 7718 Brush.Style := bsClear; 7721 7719 end; 7722 BitBlt (Canvas.Handle, MapOffset, TopBarHeight, MapWidth, MapHeight - overlap,7723 offscreen.Canvas .Handle, 0, 0, SRCCOPY);7724 BitBlt (Canvas.Handle, 0, 0, ClientWidth, TopBarHeight, TopBar.Canvas.Handle,7725 0, 0 , SRCCOPY);7720 BitBltCanvas(Canvas, MapOffset, TopBarHeight, MapWidth, MapHeight - overlap, 7721 offscreen.Canvas, 0, 0); 7722 BitBltCanvas(Canvas, 0, 0, ClientWidth, TopBarHeight, TopBar.Canvas, 7723 0, 0); 7726 7724 if xMidPanel > MapOffset then 7727 BitBlt (Canvas.Handle, xMidPanel, TopBarHeight + MapHeight - overlap,7728 ClientWidth div 2 - xMidPanel, overlap, offscreen.Canvas .Handle,7729 xMidPanel - MapOffset, MapHeight - overlap , SRCCOPY)7725 BitBltCanvas(Canvas, xMidPanel, TopBarHeight + MapHeight - overlap, 7726 ClientWidth div 2 - xMidPanel, overlap, offscreen.Canvas, 7727 xMidPanel - MapOffset, MapHeight - overlap) 7730 7728 else 7731 BitBlt (Canvas.Handle, MapOffset, TopBarHeight + MapHeight - overlap,7732 ClientWidth div 2 - MapOffset, overlap, offscreen.Canvas .Handle, 0,7733 MapHeight - overlap , SRCCOPY);7729 BitBltCanvas(Canvas, MapOffset, TopBarHeight + MapHeight - overlap, 7730 ClientWidth div 2 - MapOffset, overlap, offscreen.Canvas, 0, 7731 MapHeight - overlap); 7734 7732 if xRightPanel < MapOffset + MapWidth then 7735 BitBlt (Canvas.Handle, ClientWidth div 2, TopBarHeight + MapHeight - overlap,7736 xRightPanel - ClientWidth div 2, overlap, offscreen.Canvas .Handle,7737 ClientWidth div 2 - MapOffset, MapHeight - overlap , SRCCOPY)7733 BitBltCanvas(Canvas, ClientWidth div 2, TopBarHeight + MapHeight - overlap, 7734 xRightPanel - ClientWidth div 2, overlap, offscreen.Canvas, 7735 ClientWidth div 2 - MapOffset, MapHeight - overlap) 7738 7736 else 7739 BitBlt (Canvas.Handle, ClientWidth div 2, TopBarHeight + MapHeight - overlap,7737 BitBltCanvas(Canvas, ClientWidth div 2, TopBarHeight + MapHeight - overlap, 7740 7738 MapOffset + MapWidth - ClientWidth div 2, overlap, 7741 offscreen.Canvas.Handle, ClientWidth div 2 - MapOffset, 7742 MapHeight - overlap, SRCCOPY); 7743 BitBlt(Canvas.Handle, 0, TopBarHeight + MapHeight - overlap, xMidPanel, 7744 overlap, Panel.Canvas.Handle, 0, 0, SRCCOPY); 7745 BitBlt(Canvas.Handle, xRightPanel, TopBarHeight + MapHeight - overlap, 7746 Panel.width - xRightPanel, overlap, Panel.Canvas.Handle, xRightPanel, 7747 0, SRCCOPY); 7748 BitBlt(Canvas.Handle, 0, TopBarHeight + MapHeight, Panel.width, 7749 PanelHeight - overlap, Panel.Canvas.Handle, 0, overlap, SRCCOPY); 7739 offscreen.Canvas, ClientWidth div 2 - MapOffset, 7740 MapHeight - overlap); 7741 BitBltCanvas(Canvas, 0, TopBarHeight + MapHeight - overlap, xMidPanel, 7742 overlap, Panel.Canvas, 0, 0); 7743 BitBltCanvas(Canvas, xRightPanel, TopBarHeight + MapHeight - overlap, 7744 Panel.width - xRightPanel, overlap, Panel.Canvas, xRightPanel, 0); 7745 BitBltCanvas(Canvas, 0, TopBarHeight + MapHeight, Panel.width, 7746 PanelHeight - overlap, Panel.Canvas, 0, overlap); 7750 7747 if (pLogo >= 0) and (G.RO[pLogo] = nil) and (AILogo[pLogo] <> nil) then 7751 BitBlt(Canvas.Handle, xRightPanel + 10 - (16 + 64), 7752 ClientHeight - PanelHeight, 64, 64, AILogo[pLogo].Canvas.Handle, 0, 7753 0, SRCCOPY); 7748 BitBltCanvas(Canvas, xRightPanel + 10 - (16 + 64), 7749 ClientHeight - PanelHeight, 64, 64, AILogo[pLogo].Canvas, 0, 0); 7754 7750 end; 7755 7751 -
trunk/LocalPlayer/UnitStat.pas
r73 r188 97 97 begin 98 98 AgePrepared := MainTextureAge; 99 bitblt(Back.Canvas.Handle, 0, 0, wCommon, hOwnModel,100 MainTexture.Image.Canvas .Handle, (wMainTexture - wCommon) div 2,101 (hMainTexture - hOwnModel) div 2 , SRCCOPY);102 bitblt(Back.Canvas.Handle, wCommon, 0, wCommon, hEnemyModel,103 MainTexture.Image.Canvas .Handle, (wMainTexture - wCommon) div 2,104 (hMainTexture - hEnemyModel) div 2 , SRCCOPY);105 bitblt(Back.Canvas.Handle, 2 * wCommon, 0, wCommon, hEnemyUnit,106 MainTexture.Image.Canvas .Handle, (wMainTexture - wCommon) div 2,107 (hMainTexture - hEnemyUnit) div 2 , SRCCOPY);108 bitblt(Back.Canvas.Handle, 3 * wCommon, 0, wCommon, hEnemyCityDefense,109 MainTexture.Image.Canvas .Handle, (wMainTexture - wCommon) div 2,110 (hMainTexture - hEnemyCityDefense) div 2 , SRCCOPY);111 bitblt(Back.Canvas.Handle, 4 * wCommon, 0, wCommon, hEnemyCity,112 MainTexture.Image.Canvas .Handle, (wMainTexture - wCommon) div 2,113 (hMainTexture - hEnemyCity) div 2 , SRCCOPY);99 BitBltCanvas(Back.Canvas, 0, 0, wCommon, hOwnModel, 100 MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2, 101 (hMainTexture - hOwnModel) div 2); 102 BitBltCanvas(Back.Canvas, wCommon, 0, wCommon, hEnemyModel, 103 MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2, 104 (hMainTexture - hEnemyModel) div 2); 105 BitBltCanvas(Back.Canvas, 2 * wCommon, 0, wCommon, hEnemyUnit, 106 MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2, 107 (hMainTexture - hEnemyUnit) div 2); 108 BitBltCanvas(Back.Canvas, 3 * wCommon, 0, wCommon, hEnemyCityDefense, 109 MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2, 110 (hMainTexture - hEnemyCityDefense) div 2); 111 BitBltCanvas(Back.Canvas, 4 * wCommon, 0, wCommon, hEnemyCity, 112 MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2, 113 (hMainTexture - hEnemyCity) div 2); 114 114 ImageOp_B(Back, Template, 0, 0, 0, 0, 5 * wCommon, hMax); 115 115 end … … 387 387 dkOwnModel: 388 388 begin 389 bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hOwnModel,390 Back.Canvas .Handle, 0, 0, SRCCOPY);389 BitBltCanvas(offscreen.Canvas, 0, 0, wCommon, hOwnModel, 390 Back.Canvas, 0, 0); 391 391 yView := 13; 392 392 yTotal := 92; … … 394 394 dkEnemyModel: 395 395 begin 396 bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyModel,397 Back.Canvas .Handle, wCommon, 0, SRCCOPY);396 BitBltCanvas(offscreen.Canvas, 0, 0, wCommon, hEnemyModel, 397 Back.Canvas, wCommon, 0); 398 398 yView := 13; 399 399 yTotal := 92; … … 401 401 dkEnemyUnit, dkOwnUnit: 402 402 begin 403 bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyUnit,404 Back.Canvas .Handle, 2 * wCommon, 0, SRCCOPY);403 BitBltCanvas(offscreen.Canvas, 0, 0, wCommon, hEnemyUnit, 404 Back.Canvas, 2 * wCommon, 0); 405 405 yView := 13; 406 406 yTotal := 123; … … 408 408 dkEnemyCityDefense: 409 409 begin 410 bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyCityDefense,411 Back.Canvas .Handle, 3 * wCommon, 0, SRCCOPY);410 BitBltCanvas(offscreen.Canvas, 0, 0, wCommon, hEnemyCityDefense, 411 Back.Canvas, 3 * wCommon, 0); 412 412 yView := 171; 413 413 yTotal := 231; … … 415 415 dkEnemyCity: 416 416 begin 417 bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyCity,418 Back.Canvas .Handle, 4 * wCommon, 0, SRCCOPY);417 BitBltCanvas(offscreen.Canvas, 0, 0, wCommon, hEnemyCity, 418 Back.Canvas, 4 * wCommon, 0); 419 419 end; 420 420 end; … … 445 445 yImp + ySizeSmall, MainTexture.clBevelLight, 446 446 MainTexture.clBevelShade); 447 bitblt (offscreen.Canvas.Handle, x, yImp, xSizeSmall, ySizeSmall,448 SmallImp.Canvas .Handle, j mod 7 * xSizeSmall,449 (j + SystemIconLines * 7) div 7 * ySizeSmall , SRCCOPY);447 bitbltCanvas(offscreen.Canvas, x, yImp, xSizeSmall, ySizeSmall, 448 SmallImp.Canvas, j mod 7 * xSizeSmall, 449 (j + SystemIconLines * 7) div 7 * ySizeSmall); 450 450 inc(x, xSizeSmall + 4) 451 451 end; … … 564 564 * (yyt * 3 + 1)); 565 565 end; 566 bitblt (offscreen.Canvas.Handle, xView, yView + 16, 64, 32,567 Buffer.Canvas .Handle, 1, 0, SRCCOPY);566 bitbltCanvas(offscreen.Canvas, xView, yView + 16, 64, 32, 567 Buffer.Canvas, 1, 0); 568 568 569 569 // show unit, experience and health -
trunk/LocalPlayer/Wonders.pas
r170 r188 238 238 begin 239 239 case MyRO.Wonder[I].CityID of 240 - 240 -1: // not built yet 241 241 begin 242 242 Fill(Offscreen.Canvas, Center.X - xSizeBig div 2 + RingPosition[I].X - 3, … … 249 249 begin 250 250 HaveWonder := True; 251 BitBlt (Offscreen.Canvas.Handle,251 BitBltCanvas(Offscreen.Canvas, 252 252 Center.X - xSizeBig div 2 + RingPosition[I].X, 253 253 Center.Y - ySizeBig div 2 + RingPosition[I].Y, xSizeBig, 254 ySizeBig, BigImp.Canvas .Handle, 0, (SystemIconLines + 3) *255 ySizeBig , SRCCOPY);254 ySizeBig, BigImp.Canvas, 0, (SystemIconLines + 3) * 255 ySizeBig); 256 256 end; 257 257 else 258 258 begin 259 259 HaveWonder := True; 260 BitBlt (Offscreen.Canvas.Handle,260 BitBltCanvas(Offscreen.Canvas, 261 261 Center.X - xSizeBig div 2 + RingPosition[I].X, 262 262 Center.Y - ySizeBig div 2 + RingPosition[I].Y, xSizeBig, ySizeBig, 263 BigImp.Canvas .Handle, (I mod 7) * xSizeBig,264 (I div 7 + SystemIconLines) * ySizeBig , SRCCOPY);263 BigImp.Canvas, (I mod 7) * xSizeBig, 264 (I div 7 + SystemIconLines) * ySizeBig); 265 265 end; 266 266 end; -
trunk/NoTerm.pas
r144 r188 127 127 RisedTextOut(State.Canvas, 0, 0, Format(Phrases.Lookup('AIT_ROUND'), [Round]) 128 128 + ' ' + TurnToString(G.RO[me].Turn)); 129 BitBlt(Canvas.Handle, 64, 287 + 138, 192, 20, State.Canvas.Handle, 0, 130 0, SRCCOPY); 129 BitBltCanvas(Canvas, 64, 287 + 138, 192, 20, State.Canvas, 0, 0); 131 130 end; 132 131 … … 331 330 yBrain[i] - 16, 64, 64, 0, 0); 332 331 if 1 shl i and G.RO[me].Alive = 0 then 333 BitBlt (Canvas.Handle, xBrain[i], yBrain[i] - 16, 64, 64,334 Shade.Canvas .Handle, 0, 0, SRCAND);332 BitBltCanvas(Canvas, xBrain[i], yBrain[i] - 16, 64, 64, 333 Shade.Canvas, 0, 0, SRCAND); 335 334 Sprite(Canvas, HGrSystem, xBrain[i] + 30 - 14, yBrain[i] + 53, 14, 336 335 14, 1, 316); -
trunk/Packages/CevoComponents/BaseWin.pas
r171 r188 165 165 procedure TBufferedDrawDlg.VPaint; 166 166 begin 167 BitBlt(Canvas.Handle, 0, 0, ClientWidth, ClientHeight, 168 Offscreen.Canvas.Handle, 0, 0, SRCCOPY); 167 BitBltCanvas(Canvas, 0, 0, ClientWidth, ClientHeight, Offscreen.Canvas, 0, 0); 169 168 end; 170 169 … … 454 453 end; 455 454 456 BitBlt (Canvas.Handle, SideFrame, TitleHeight, ClientWidth - 2 * SideFrame,457 InnerBottom - TitleHeight, Offscreen.Canvas .Handle, 0, 0, SRCCOPY);455 BitBltCanvas(Canvas, SideFrame, TitleHeight, ClientWidth - 2 * SideFrame, 456 InnerBottom - TitleHeight, Offscreen.Canvas, 0, 0); 458 457 end; 459 458 -
trunk/Packages/CevoComponents/ButtonA.pas
r184 r188 4 4 5 5 uses 6 ButtonBase, Classes, Graphics, LCLIntf, LCLType ;6 ButtonBase, Classes, Graphics, LCLIntf, LCLType, ScreenTools; 7 7 8 8 type … … 45 45 if FGraphic <> nil then 46 46 begin 47 BitBlt (Canvas.Handle, 0, 0, 100, 25, Graphic.Canvas.Handle, 195,48 243 + 26 * Byte(Down) , SRCCOPY);47 BitBltCanvas(Canvas, 0, 0, 100, 25, Graphic.Canvas, 195, 48 243 + 26 * Byte(Down)); 49 49 Canvas.Brush.Style := bsClear; 50 50 Textout(50 - (TextWidth(FCaption) + 1) div 2, 12 - textheight(FCaption) -
trunk/Packages/CevoComponents/ButtonB.pas
r184 r188 28 28 implementation 29 29 30 uses 31 ScreenTools; 32 30 33 procedure Register; 31 34 begin … … 44 47 with Canvas do 45 48 if FGraphic <> nil then begin 46 BitBlt (Canvas.Handle, 0, 0, 25, 25, FGraphic.Canvas.Handle, 169,47 243 + 26 * Byte(FDown) , SRCCOPY);49 BitBltCanvas(Canvas, 0, 0, 25, 25, FGraphic.Canvas, 169, 50 243 + 26 * Byte(FDown)); 48 51 if FIndex >= 0 then begin 49 BitBlt (Canvas.Handle, 0, 0, 25, 25, FMask.Canvas.Handle,52 BitBltCanvas(Canvas, 0, 0, 25, 25, FMask.Canvas, 50 53 1 + FIndex mod 12 * 26, 337 + FIndex div 12 * 26, SRCAND); 51 BitBlt (Canvas.Handle, 0, 0, 25, 25, FGraphic.Canvas.Handle,54 BitBltCanvas(Canvas, 0, 0, 25, 25, FGraphic.Canvas, 52 55 1 + FIndex mod 12 * 26, 337 + FIndex div 12 * 26, SRCPAINT); 53 56 end -
trunk/Packages/CevoComponents/ButtonC.pas
r184 r188 4 4 5 5 uses 6 ButtonBase, Classes, Graphics, LCLIntf, LCLType ;6 ButtonBase, Classes, Graphics, LCLIntf, LCLType, ScreenTools; 7 7 8 8 type … … 21 21 22 22 procedure Register; 23 23 24 24 25 implementation … … 40 41 with Canvas do 41 42 if FGraphic <> nil then 42 BitBlt (Canvas.Handle, 0, 0, 12, 12, FGraphic.Canvas.Handle,43 169 + 13 * Byte(FDown), 159 + 13 * FIndex , SRCCOPY)43 BitBltCanvas(Canvas, 0, 0, 12, 12, FGraphic.Canvas, 44 169 + 13 * Byte(FDown), 159 + 13 * FIndex) 44 45 else 45 46 begin -
trunk/Packages/CevoComponents/ButtonN.pas
r184 r188 4 4 5 5 uses 6 Classes, Graphics, Controls, LCLIntf, LCLType ;6 Classes, Graphics, Controls, LCLIntf, LCLType, ScreenTools; 7 7 8 8 type … … 62 62 if FGraphic <> nil then 63 63 begin 64 BitBlt (Canvas.Handle, 1, 1, 40, 40, FBackGraphic.Canvas.Handle,65 1 + 80 * BackIndex + 40 * byte(FPossible and FLit), 176 , SRCCOPY);64 BitBltCanvas(Canvas, 1, 1, 40, 40, FBackGraphic.Canvas, 65 1 + 80 * BackIndex + 40 * byte(FPossible and FLit), 176); 66 66 if FPossible then 67 67 begin 68 BitBlt (Canvas.Handle, 3, 3, 36, 36, FMask.Canvas.Handle,68 BitBltCanvas(Canvas, 3, 3, 36, 36, FMask.Canvas, 69 69 195 + 37 * (FIndex mod 3), 21 + 37 * (FIndex div 3), SRCAND); 70 BitBlt (Canvas.Handle, 3, 3, 36, 36, FGraphic.Canvas.Handle,70 BitBltCanvas(Canvas, 3, 3, 36, 36, FGraphic.Canvas, 71 71 195 + 37 * (FIndex mod 3), 21 + 37 * (FIndex div 3), SRCPAINT); 72 72 end; -
trunk/Packages/CevoComponents/EOTButton.pas
r184 r188 38 38 procedure Register; 39 39 40 40 41 implementation 42 43 uses 44 ScreenTools; 41 45 42 46 procedure Register; … … 125 129 begin 126 130 // TODO: For some reason BitBlt is not working with gray background here 127 //BitBlt(Buffer.Canvas.Handle, 0, 0, 48, 48, Back.Canvas.Handle, 0, 128 // 0, SRCCOPY); 131 //BitBltCanvas(Buffer.Canvas, 0, 0, 48, 48, Back.Canvas, 0, 0); 129 132 Buffer.Canvas.Draw(0, 0, Back); 130 133 ImageOp_CBC(Buffer, Template, 0, 0, 133, 149 + 48 * Byte(FDown), 48, 48, … … 133 136 ImageOp_CBC(Buffer, Template, 8, 8, 1 + 32 * Byte(FIndex), 246, 32, 32, 134 137 $000000, $FFFFFF); 135 BitBlt (Canvas.Handle, 0, 0, 48, 48, Buffer.Canvas.Handle, 0, 0, SRCCOPY);138 BitBltCanvas(Canvas, 0, 0, 48, 48, Buffer.Canvas, 0, 0); 136 139 end 137 140 else … … 165 168 procedure TEOTButton.SetBack(ca: TCanvas; x, y: integer); 166 169 begin 167 BitBlt (Back.Canvas.Handle, 0, 0, 48, 48, ca.Handle, x, y, SRCCOPY);170 BitBltCanvas(Back.Canvas, 0, 0, 48, 48, ca, x, y); 168 171 end; 169 172 -
trunk/Packages/CevoComponents/ScreenTools.pas
r187 r188 40 40 xDst, yDst, xSrc, ySrc, w, h, Color1, Color2: integer); 41 41 procedure ImageOp_CCC(bmp: TBitmap; x, y, w, h, Color0, Color1, Color2: integer); 42 function BitBltCanvas(DestCanvas: TCanvas; X, Y, Width, Height: integer;43 SrcCanvas: TCanvas; XSrc, YSrc: integer; Rop: DWORD): boolean;42 function BitBltCanvas(DestCanvas: TCanvas; X, Y, Width, Height: Integer; 43 SrcCanvas: TCanvas; XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean; 44 44 procedure SLine(ca: TCanvas; x0, x1, y: integer; cl: TColor); 45 45 procedure DLine(ca: TCanvas; x0, x1, y: integer; cl0, cl1: TColor); … … 153 153 TGrExtDescr = record { don't use dynamic strings here! } 154 154 Name: string[31]; 155 Data, Mask: TBitmap; 156 pixUsed: array [byte] of byte; 155 Data: TBitmap; 156 Mask: TBitmap; 157 pixUsed: array [Byte] of Byte; 157 158 end; 158 159 … … 160 161 TGrExtDescr, but without pixUsed } 161 162 Name: string[31]; 162 Data, Mask: TBitmap; 163 Data: TBitmap; 164 Mask: TBitmap; 163 165 end; 164 166 … … 519 521 procedure Dump(dst: TBitmap; HGr, xDst, yDst, Width, Height, xGr, yGr: integer); 520 522 begin 521 BitBlt (dst.Canvas.Handle, xDst, yDst, Width, Height,522 GrExt[HGr].Data.Canvas .Handle, xGr, yGr, SRCCOPY);523 BitBltCanvas(dst.Canvas, xDst, yDst, Width, Height, 524 GrExt[HGr].Data.Canvas, xGr, yGr); 523 525 end; 524 526 … … 703 705 procedure Sprite(Canvas: TCanvas; HGr, xDst, yDst, Width, Height, xGr, yGr: integer); 704 706 begin 705 BitBlt (Canvas.Handle, xDst, yDst, Width, Height,706 GrExt[HGr].Mask.Canvas .Handle, xGr, yGr, SRCAND);707 BitBlt (Canvas.Handle, xDst, yDst, Width, Height,708 GrExt[HGr].Data.Canvas .Handle, xGr, yGr, SRCPAINT);707 BitBltCanvas(Canvas, xDst, yDst, Width, Height, 708 GrExt[HGr].Mask.Canvas, xGr, yGr, SRCAND); 709 BitBltCanvas(Canvas, xDst, yDst, Width, Height, 710 GrExt[HGr].Data.Canvas, xGr, yGr, SRCPAINT); 709 711 end; 710 712 711 713 procedure Sprite(dst: TBitmap; HGr, xDst, yDst, Width, Height, xGr, yGr: integer); 712 714 begin 713 BitBlt(dst.Canvas.Handle, xDst, yDst, Width, Height, 714 GrExt[HGr].Mask.Canvas.Handle, xGr, yGr, SRCAND); 715 BitBlt(dst.Canvas.Handle, xDst, yDst, Width, Height, 716 GrExt[HGr].Data.Canvas.Handle, xGr, yGr, SRCPAINT); 717 end; 718 719 function BitBltCanvas(DestCanvas: TCanvas; X, Y, Width, Height: integer; 720 SrcCanvas: TCanvas; XSrc, YSrc: integer; Rop: DWORD): boolean; 721 begin 722 Assert(Rop = SRCCOPY); 723 DestCanvas.CopyRect(Rect(X, Y, X + Width, Y + Height), SrcCanvas, 724 Rect(XSrc, YSrc, XSrc + Width, YSrc + Height)); 725 Result := True; 715 BitBltCanvas(dst.Canvas, xDst, yDst, Width, Height, 716 GrExt[HGr].Mask.Canvas, xGr, yGr, SRCAND); 717 BitBltCanvas(dst.Canvas, xDst, yDst, Width, Height, 718 GrExt[HGr].Data.Canvas, xGr, yGr, SRCPAINT); 719 end; 720 721 function BitBltCanvas(DestCanvas: TCanvas; X, Y, Width, Height: Integer; 722 SrcCanvas: TCanvas; XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean; 723 begin 724 {Assert(Rop = SRCCOPY);} 725 if Rop = SRCCOPY then begin 726 DestCanvas.CopyRect(Rect(X, Y, X + Width, Y + Height), SrcCanvas, 727 Rect(XSrc, YSrc, XSrc + Width, YSrc + Height)); 728 Result := True; 729 end else Result := BitBlt(DestCanvas.Handle, X, Y, Width, Height, SrcCanvas.Handle, XSrc, YSrc, Rop); 726 730 end; 727 731 … … 805 809 end else 806 810 Frame(ca, x - 1, y - 1, x + Width, y + Height, $000000, $000000); 807 BitBlt(ca.Handle, x, y, Width, Height, Src.Canvas.Handle, xSrc, ySrc, 808 SRCCOPY); 811 BitBltCanvas(ca, x, y, Width, Height, Src.Canvas, xSrc, ySrc); 809 812 end; 810 813 … … 886 889 $FF * intensity div $FF shl 16; 887 890 end; 888 BitBlt (GrExt[HGrSystem].Mask.Canvas.Handle, 77, 47, 10, 10,889 GrExt[HGrSystem].Mask.Canvas .Handle, 66, 47, SRCCOPY);891 BitBltCanvas(GrExt[HGrSystem].Mask.Canvas, 77, 47, 10, 10, 892 GrExt[HGrSystem].Mask.Canvas, 66, 47); 890 893 end; 891 894 … … 894 897 Assert((Left + xOffset >= 0) and (Left + xOffset + Width <= wMainTexture) and 895 898 (Top + yOffset >= 0) and (Top + yOffset + Height <= hMainTexture)); 896 BitBlt (ca.Handle, Left, Top, Width, Height, MainTexture.Image.Canvas.Handle,897 Left + xOffset, Top + yOffset , SRCCOPY);899 BitBltCanvas(ca, Left, Top, Width, Height, MainTexture.Image.Canvas, 900 Left + xOffset, Top + yOffset); 898 901 end; 899 902 … … 916 919 begin 917 920 for I := 0 to (x1 - xm) div wMainTexture - 1 do 918 BitBlt (ca.Handle, xm + I * wMainTexture, y0, wMainTexture, y1 - y0,919 MainTexture.Image.Canvas .Handle, 0, hMainTexture div 2 + Band(I) *920 (y1 - y0) , SRCCOPY);921 BitBlt (ca.Handle, xm + ((x1 - xm) div wMainTexture) * wMainTexture, y0,921 BitBltCanvas(ca, xm + I * wMainTexture, y0, wMainTexture, y1 - y0, 922 MainTexture.Image.Canvas, 0, hMainTexture div 2 + Band(I) * 923 (y1 - y0)); 924 BitBltCanvas(ca, xm + ((x1 - xm) div wMainTexture) * wMainTexture, y0, 922 925 x1 - (xm + ((x1 - xm) div wMainTexture) * wMainTexture), y1 - y0, 923 MainTexture.Image.Canvas .Handle, 0, hMainTexture div 2 + Band(924 (x1 - xm) div wMainTexture) * (y1 - y0) , SRCCOPY);926 MainTexture.Image.Canvas, 0, hMainTexture div 2 + Band( 927 (x1 - xm) div wMainTexture) * (y1 - y0)); 925 928 for I := 0 to (xm - x0) div wMainTexture - 1 do 926 BitBlt (ca.Handle, xm - (I + 1) * wMainTexture, y0, wMainTexture, y1 - y0,927 MainTexture.Image.Canvas .Handle, 0, hMainTexture div 2 +928 Band(-I - 1) * (y1 - y0) , SRCCOPY);929 BitBlt (ca.Handle, x0, y0, xm - ((xm - x0) div wMainTexture) *930 wMainTexture - x0, y1 - y0, MainTexture.Image.Canvas .Handle,929 BitBltCanvas(ca, xm - (I + 1) * wMainTexture, y0, wMainTexture, y1 - y0, 930 MainTexture.Image.Canvas, 0, hMainTexture div 2 + 931 Band(-I - 1) * (y1 - y0)); 932 BitBltCanvas(ca, x0, y0, xm - ((xm - x0) div wMainTexture) * 933 wMainTexture - x0, y1 - y0, MainTexture.Image.Canvas, 931 934 ((xm - x0) div wMainTexture + 1) * wMainTexture - (xm - x0), 932 hMainTexture div 2 + Band(-(xm - x0) div wMainTexture - 1) * (y1 - y0) , SRCCOPY);935 hMainTexture div 2 + Band(-(xm - x0) div wMainTexture - 1) * (y1 - y0)); 933 936 end; 934 937 … … 960 963 if x1cut < 0 then 961 964 x1cut := 0; 962 BitBlt (ca.Handle, x * Texture.Width + x0cut - xOffset,965 BitBltCanvas(ca, x * Texture.Width + x0cut - xOffset, 963 966 y * Texture.Height + y0cut - yOffset, Texture.Width - x0cut - x1cut, 964 Texture.Height - y0cut - y1cut, Texture.Canvas.Handle, x0cut, 965 y0cut, SRCCOPY); 967 Texture.Height - y0cut - y1cut, Texture.Canvas, x0cut, y0cut); 966 968 end; 967 969 end; … … 982 984 procedure Corner(ca: TCanvas; x, y, Kind: Integer; const T: TTexture); 983 985 begin 984 { BitBlt (ca.Handle,x,y,8,8,GrExt[T.HGr].Mask.Canvas.Handle,986 { BitBltCanvas(ca,x,y,8,8,GrExt[T.HGr].Mask.Canvas, 985 987 T.xGr+29+Kind*9,T.yGr+89,SRCAND); 986 BitBlt (ca.Handle,x,y,8,8,GrExt[T.HGr].Data.Canvas.Handle,988 BitBltCanvas(ca,x,y,8,8,GrExt[T.HGr].Data.Canvas, 987 989 T.xGr+29+Kind*9,T.yGr+89,SRCPAINT); } 988 990 end; … … 992 994 procedure PaintIcon(x, y, Kind: Integer); 993 995 begin 994 BitBlt (ca.Handle, x, y + 6, 10, 10, GrExt[HGrSystem].Mask.Canvas.Handle,996 BitBltCanvas(ca, x, y + 6, 10, 10, GrExt[HGrSystem].Mask.Canvas, 995 997 66 + Kind mod 11 * 11, 115 + Kind div 11 * 11, SRCAND); 996 BitBlt (ca.Handle, x, y + 6, 10, 10, GrExt[HGrSystem].Data.Canvas.Handle,998 BitBltCanvas(ca, x, y + 6, 10, 10, GrExt[HGrSystem].Data.Canvas, 997 999 66 + Kind mod 11 * 11, 115 + Kind div 11 * 11, SRCPAINT); 998 1000 end; … … 1216 1218 for i := 0 to val mod 10 - 1 do 1217 1219 begin 1218 BitBlt (Handle, xIcon + 4 + i * (14 * ld div sd), yIcon + 2 + 1, 14,1219 14, GrExt[HGrSystem].Mask.Canvas .Handle, 67 + Kind mod 8 * 15,1220 BitBltCanvas(dst.Canvas, xIcon + 4 + i * (14 * ld div sd), yIcon + 2 + 1, 14, 1221 14, GrExt[HGrSystem].Mask.Canvas, 67 + Kind mod 8 * 15, 1220 1222 70 + Kind div 8 * 15, SRCAND); 1221 1223 Sprite(dst, HGrSystem, xIcon + 3 + i * (14 * ld div sd), yIcon + 2, … … 1224 1226 for i := 0 to val div 10 - 1 do 1225 1227 begin 1226 BitBlt (dst.Canvas.Handle, xIcon + 4 + (val mod 10) *1228 BitBltCanvas(dst.Canvas, xIcon + 4 + (val mod 10) * 1227 1229 (14 * ld div sd) + i * (14 * ld div sd), yIcon + 3, 14, 14, 1228 GrExt[HGrSystem].Mask.Canvas .Handle, 67 + 7 mod 8 * 15,1230 GrExt[HGrSystem].Mask.Canvas, 67 + 7 mod 8 * 15, 1229 1231 70 + 7 div 8 * 15, SRCAND); 1230 1232 Sprite(dst, HGrSystem, xIcon + 3 + (val mod 10) * … … 1249 1251 for i := 0 to val div 10 - 1 do 1250 1252 begin 1251 BitBlt (Handle, xIcon + 4 + i * (14 * ld div sd), yIcon + 3, 14, 14,1252 GrExt[HGrSystem].Mask.Canvas .Handle, 67 + Kind mod 8 * 15,1253 BitBltCanvas(dst.Canvas, xIcon + 4 + i * (14 * ld div sd), yIcon + 3, 14, 14, 1254 GrExt[HGrSystem].Mask.Canvas, 67 + Kind mod 8 * 15, 1253 1255 70 + Kind div 8 * 15, SRCAND); 1254 1256 Sprite(dst, HGrSystem, xIcon + 3 + i * (14 * ld div sd), yIcon + 2, … … 1257 1259 for i := 0 to val mod 10 - 1 do 1258 1260 begin 1259 BitBlt (dst.Canvas.Handle, xIcon + 4 + (val div 10) *1261 BitBltCanvas(dst.Canvas, xIcon + 4 + (val div 10) * 1260 1262 (14 * ld div sd) + i * (10 * ld div sd), yIcon + 7, 10, 10, 1261 GrExt[HGrSystem].Mask.Canvas .Handle, 66 + Kind mod 11 * 11,1263 GrExt[HGrSystem].Mask.Canvas, 66 + Kind mod 11 * 11, 1262 1264 115 + Kind div 11 * 11, SRCAND); 1263 1265 Sprite(dst, HGrSystem, xIcon + 3 + (val div 10) * … … 1294 1296 begin 1295 1297 for i := 0 to pos div 8 - 1 do 1296 BitBlt (Handle, x + i * 8, y, 8, 7,1297 GrExt[HGrSystem].Data.Canvas .Handle, 104, 9 + 8 * Kind, SRCCOPY);1298 BitBlt (Handle, x + 8 * (pos div 8), y, pos - 8 * (pos div 8), 7,1299 GrExt[HGrSystem].Data.Canvas .Handle, 104, 9 + 8 * Kind, SRCCOPY);1298 BitBltCanvas(ca, x + i * 8, y, 8, 7, 1299 GrExt[HGrSystem].Data.Canvas, 104, 9 + 8 * Kind); 1300 BitBltCanvas(ca, x + 8 * (pos div 8), y, pos - 8 * (pos div 8), 7, 1301 GrExt[HGrSystem].Data.Canvas, 104, 9 + 8 * Kind); 1300 1302 if Growth > 0 then 1301 1303 begin 1302 1304 for i := 0 to Growth div 8 - 1 do 1303 BitBlt (Handle, x + pos + i * 8, y, 8, 7,1304 GrExt[HGrSystem].Data.Canvas .Handle, 112, 9 + 8 * Kind, SRCCOPY);1305 BitBlt (Handle, x + pos + 8 * (Growth div 8), y,1306 Growth - 8 * (Growth div 8), 7, GrExt[HGrSystem].Data.Canvas .Handle,1307 112, 9 + 8 * Kind , SRCCOPY);1305 BitBltCanvas(ca, x + pos + i * 8, y, 8, 7, 1306 GrExt[HGrSystem].Data.Canvas, 112, 9 + 8 * Kind); 1307 BitBltCanvas(ca, x + pos + 8 * (Growth div 8), y, 1308 Growth - 8 * (Growth div 8), 7, GrExt[HGrSystem].Data.Canvas, 1309 112, 9 + 8 * Kind); 1308 1310 end 1309 1311 else if Growth < 0 then 1310 1312 begin 1311 1313 for i := 0 to -Growth div 8 - 1 do 1312 BitBlt (Handle, x + pos + i * 8, y, 8, 7,1313 GrExt[HGrSystem].Data.Canvas .Handle, 104, 1, SRCCOPY);1314 BitBlt (Handle, x + pos + 8 * (-Growth div 8), y, -Growth -1314 BitBltCanvas(ca, x + pos + i * 8, y, 8, 7, 1315 GrExt[HGrSystem].Data.Canvas, 104, 1); 1316 BitBltCanvas(ca, x + pos + 8 * (-Growth div 8), y, -Growth - 1315 1317 8 * (-Growth div 8), 7, 1316 GrExt[HGrSystem].Data.Canvas .Handle, 104, 1, SRCCOPY);1318 GrExt[HGrSystem].Data.Canvas, 104, 1); 1317 1319 end; 1318 1320 Brush.Color := $000000; … … 1339 1341 procedure PaintLogo(ca: TCanvas; x, y, clLight, clShade: Integer); 1340 1342 begin 1341 BitBltCanvas(LogoBuffer.Canvas, 0, 0, wLogo, hLogo, ca, x, 1342 y, SRCCOPY); 1343 BitBltCanvas(LogoBuffer.Canvas, 0, 0, wLogo, hLogo, ca, x, y); 1343 1344 ImageOp_BCC(LogoBuffer, Templates, 0, 0, 1, 1, wLogo, hLogo, 1344 1345 clLight, clShade); 1345 BitBlt(ca.Handle, x, y, wLogo, hLogo, LogoBuffer.Canvas.Handle, 0, 1346 0, SRCCOPY); 1346 BitBltCanvas(ca, x, y, wLogo, hLogo, LogoBuffer.Canvas, 0, 0); 1347 1347 end; 1348 1348 -
trunk/Start.pas
r187 r188 534 534 Brains[0].Picture := TBitmap.Create; 535 535 Brains[0].Picture.SetSize(64, 64); 536 BitBlt (Brains[0].Picture.Canvas.Handle, 0, 0, 64, 64,537 GrExt[HGrSystem2].Data.Canvas .Handle, 1, 111, SRCCOPY);536 BitBltCanvas(Brains[0].Picture.Canvas, 0, 0, 64, 64, 537 GrExt[HGrSystem2].Data.Canvas, 1, 111); 538 538 Brains[1].Picture := TBitmap.Create; 539 539 Brains[1].Picture.SetSize(64, 64); 540 BitBlt (Brains[1].Picture.Canvas.Handle, 0, 0, 64, 64,541 GrExt[HGrSystem2].Data.Canvas .Handle, 66, 111, SRCCOPY);540 BitBltCanvas(Brains[1].Picture.Canvas, 0, 0, 64, 64, 541 GrExt[HGrSystem2].Data.Canvas, 66, 111); 542 542 Brains[2].Picture := TBitmap.Create; 543 543 Brains[2].Picture.SetSize(64, 64); 544 BitBlt (Brains[2].Picture.Canvas.Handle, 0, 0, 64, 64,545 GrExt[HGrSystem2].Data.Canvas .Handle, 131, 111, SRCCOPY);544 BitBltCanvas(Brains[2].Picture.Canvas, 0, 0, 64, 64, 545 GrExt[HGrSystem2].Data.Canvas, 131, 111); 546 546 Brains[3].Picture := TBitmap.Create; 547 547 Brains[3].Picture.SetSize(64, 64); 548 BitBlt (Brains[3].Picture.Canvas.Handle, 0, 0, 64, 64,549 GrExt[HGrSystem2].Data.Canvas .Handle, 131, 46, SRCCOPY);548 BitBltCanvas(Brains[3].Picture.Canvas, 0, 0, 64, 64, 549 GrExt[HGrSystem2].Data.Canvas, 131, 46); 550 550 551 551 AIBrains := TBrains.Create(False); … … 699 699 $000000, xAction, y + 21, Phrases2.Lookup(TextItem)); 700 700 BitBltCanvas(LogoBuffer.Canvas, 0, 0, 50, 50, Canvas, 701 xActionIcon - 2, y - 2 , SRCCOPY);701 xActionIcon - 2, y - 2); 702 702 GlowFrame(LogoBuffer, 8, 8, 34, 34, $202020); 703 BitBlt (Canvas.Handle, xActionIcon - 2, y - 2, 50, 50,704 LogoBuffer.Canvas .Handle, 0, 0, SRCCOPY);705 BitBlt (Canvas.Handle, xActionIcon, y, 40, 40, BigImp.Canvas.Handle,706 (IconIndex mod 7) * xSizeBig + 8, (IconIndex div 7) * ySizeBig , SRCCOPY);703 BitBltCanvas(Canvas, xActionIcon - 2, y - 2, 50, 50, 704 LogoBuffer.Canvas, 0, 0); 705 BitBltCanvas(Canvas, xActionIcon, y, 40, 40, BigImp.Canvas, 706 (IconIndex mod 7) * xSizeBig + 8, (IconIndex div 7) * ySizeBig); 707 707 RFrame(Canvas, xActionIcon - 1, y - 1, xActionIcon + 40, y + 40, 708 708 $000000, $000000); … … 795 795 MainTexture.clBevelShade); // Tab shadow 796 796 BitBltCanvas(LogoBuffer.Canvas, 0, 0, 36, 36, Canvas, 6, 797 3 + 2 * integer(Tab <> tbMain) , SRCCOPY);797 3 + 2 * integer(Tab <> tbMain)); 798 798 799 799 ImageOp_BCC(LogoBuffer, Templates, 0, 0, 145, 38, 36, 27, $BFBF20, $4040DF); … … 801 801 ImageOp_BCC(LogoBuffer, Templates, 10, 27, 155, 38 + 27, 26, 9, $BFBF20, 802 802 $4040DF); // logo part 2 803 BitBlt (Canvas.Handle, 6, 3 + 2 * integer(Tab <> tbMain), 36, 36,804 LogoBuffer.Canvas .Handle, 0, 0, SRCCOPY);803 BitBltCanvas(Canvas, 6, 3 + 2 * integer(Tab <> tbMain), 36, 36, 804 LogoBuffer.Canvas, 0, 0); 805 805 806 806 if Page = pgMain then … … 819 819 BitBltCanvas(LogoBuffer.Canvas, 0, 0, w, h, Canvas, 820 820 ActionSideBorder + i * wBuffer, yAction + Integer(SelectedAction) * ActionPitch 821 - 8 , SRCCOPY);821 - 8); 822 822 MakeBlue(LogoBuffer, 0, 0, w, h); 823 BitBlt (Canvas.Handle, ActionSideBorder + i * wBuffer,823 BitBltCanvas(Canvas, ActionSideBorder + i * wBuffer, 824 824 yAction + Integer(SelectedAction) * ActionPitch - 8, w, h, 825 LogoBuffer.Canvas .Handle, 0, 0, SRCCOPY);825 LogoBuffer.Canvas, 0, 0); 826 826 end; 827 827 y := yAction; … … 846 846 Canvas.Font.Assign(UniFont[ftNormal]); 847 847 BitBltCanvas(LogoBuffer.Canvas, 0, 0, 91, 25, Canvas, 848 xActionIcon, y + 2 , SRCCOPY);848 xActionIcon, y + 2); 849 849 ImageOp_BCC(LogoBuffer, Templates, 0, 0, 1, 400, 91, 25, 0, 850 850 Colors.Canvas.Pixels[clkAge0 - 1, cliDimmedText]); 851 BitBlt (Canvas.Handle, xActionIcon, y + 2, 91, 25,852 LogoBuffer.Canvas .Handle, 0, 0, SRCCOPY);851 BitBltCanvas(Canvas, xActionIcon, y + 2, 91, 25, 852 LogoBuffer.Canvas, 0, 0); 853 853 end; 854 854 end; … … 874 874 if (i < 13) or (i > 17) then 875 875 begin 876 BitBlt (Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,877 GrExt[HGrSystem2].Mask.Canvas .Handle, xOrna, yOrna, SRCAND);878 BitBlt (Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,879 GrExt[HGrSystem2].Data.Canvas .Handle, xOrna, yOrna, SRCPAINT);876 BitBltCanvas(Canvas, 9 + i * 27, yLogo - 2, wOrna, hOrna, 877 GrExt[HGrSystem2].Mask.Canvas, xOrna, yOrna, SRCAND); 878 BitBltCanvas(Canvas, 9 + i * 27, yLogo - 2, wOrna, hOrna, 879 GrExt[HGrSystem2].Data.Canvas, xOrna, yOrna, SRCPAINT); 880 880 end; 881 881 PaintLogo(Canvas, 69 + 11 * 27, yLogo, MainTexture.clBevelLight, … … 893 893 if Assigned(PlayersBrain[I]) and (PlayersBrain[i].Kind in [btTerm, btRandom, btAI]) then 894 894 begin 895 BitBlt (Canvas.Handle, xBrain[i] - 18, yBrain[i] + 19, 12, 14,896 GrExt[HGrSystem].Data.Canvas .Handle, 134 + (Difficulty[i] - 1) *897 13, 28 , SRCCOPY);895 BitBltCanvas(Canvas, xBrain[i] - 18, yBrain[i] + 19, 12, 14, 896 GrExt[HGrSystem].Data.Canvas, 134 + (Difficulty[i] - 1) * 897 13, 28); 898 898 Frame(Canvas, xBrain[i] - 19, yBrain[i] + 18, xBrain[i] - 18 + 12, 899 899 yBrain[i] + (19 + 14), $000000, $000000); … … 913 913 PlayerSlots[I].MultiBtn.left + 12, PlayerSlots[I].MultiBtn.top + 12, 914 914 MainTexture.clBevelShade, MainTexture.clBevelLight); 915 BitBlt (Canvas.Handle, xBrain[i] - 31, yBrain[i], 13, 12,916 GrExt[HGrSystem].Data.Canvas .Handle, 88, 47, SRCCOPY);915 BitBltCanvas(Canvas, xBrain[i] - 31, yBrain[i], 13, 12, 916 GrExt[HGrSystem].Data.Canvas, 88, 47); 917 917 end; 918 918 end; … … 958 958 if (i < 2) or (i > 6) then 959 959 begin 960 BitBlt (Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,961 GrExt[HGrSystem2].Mask.Canvas .Handle, xOrna, yOrna, SRCAND);962 BitBlt (Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,963 GrExt[HGrSystem2].Data.Canvas .Handle, xOrna, yOrna, SRCPAINT);960 BitBltCanvas(Canvas, 9 + i * 27, yLogo - 2, wOrna, hOrna, 961 GrExt[HGrSystem2].Mask.Canvas, xOrna, yOrna, SRCAND); 962 BitBltCanvas(Canvas, 9 + i * 27, yLogo - 2, wOrna, hOrna, 963 GrExt[HGrSystem2].Data.Canvas, xOrna, yOrna, SRCPAINT); 964 964 end; 965 965 PaintLogo(Canvas, 69, yLogo, MainTexture.clBevelLight, … … 1054 1054 if MiniMap.Mode = mmPicture then 1055 1055 begin 1056 BitBlt (Canvas.Handle, xMini + 2, yMini + 2, MiniMap.Size.X * 2, MiniMap.Size.Y,1057 MiniMap.Bitmap.Canvas .Handle, 0, 0, SRCCOPY);1056 BitBltCanvas(Canvas, xMini + 2, yMini + 2, MiniMap.Size.X * 2, MiniMap.Size.Y, 1057 MiniMap.Bitmap.Canvas, 0, 0); 1058 1058 if Page = pgStartRandom then 1059 1059 s := Phrases.Lookup('RANMAP')
Note:
See TracChangeset
for help on using the changeset viewer.