Changeset 188 for trunk/LocalPlayer
- Timestamp:
- May 6, 2020, 11:21:12 PM (5 years ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.