Changeset 316
- Timestamp:
- Mar 18, 2021, 11:31:20 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/MessgEx.pas
r315 r316 233 233 hScrewed = 27; 234 234 var 235 ix, iy, xDst, yDst, dx, dy, xIcon, yIcon, xb, yb, wb, hb: integer; 235 ix, iy, xDst, yDst, dx, dy, xIcon, yIcon: integer; 236 BookRect: TRect; 236 237 x1, xR, yR, share: single; 237 238 Screwed: array [0 .. wScrewed - 1, 0 .. hScrewed - 1, 0 .. 3] of single; … … 282 283 end; 283 284 BigImp.EndUpdate; 284 xb := xBBook; 285 yb := yBBook; 286 wb := wBBook; 287 hb := hBBook; 285 BookRect := BigBook.BoundsRect; 288 286 end 289 287 else 290 288 begin 291 xb := xSBook; 292 yb := ySBook; 293 wb := wSBook; 294 hb := hSBook; 295 end; 296 x := x - wb div 2; 289 BookRect := SmallBook.BoundsRect; 290 end; 291 x := x - BookRect.Width div 2; 297 292 298 293 // paint 299 294 // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it 300 295 LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height); 301 BitBltCanvas(LogoBuffer.Canvas, 0, 0, wb, hb, ca, x, y);296 BitBltCanvas(LogoBuffer.Canvas, 0, 0, BookRect.Width, BookRect.Height, ca, x, y); 302 297 303 298 if IconIndex >= 0 then … … 310 305 Trunc(Screwed[ix, iy, 0] / Screwed[ix, iy, 3]) shl 16; 311 306 312 ImageOp_BCC(LogoBuffer, Templates.Data, 0, 0, xb, yb, wb, hb, clCover, clPage);313 314 BitBltCanvas(ca, x, y, wb, hb, LogoBuffer.Canvas, 0, 0);307 ImageOp_BCC(LogoBuffer, Templates.Data, Point(0, 0), BookRect, clCover, clPage); 308 309 BitBltCanvas(ca, x, y, BookRect.Width, BookRect.Height, LogoBuffer.Canvas, 0, 0); 315 310 end; 316 311 -
trunk/LocalPlayer/Term.pas
r315 r316 4843 4843 end; 4844 4844 if GameMode <> cMovie then 4845 ImageOp_BCC(TopBar, Templates.Data, 2, 1, 145, 38, 36, 36, $BFBF20, $4040DF);4845 ImageOp_BCC(TopBar, Templates.Data, Point(2, 1), MenuLogo.BoundsRect, $BFBF20, $4040DF); 4846 4846 if MyRO.nCity > 0 then 4847 4847 begin -
trunk/Packages/CevoComponents/ScreenTools.pas
r315 r316 49 49 procedure MakeRed(Dst: TBitmap; X, Y, Width, Height: Integer); 50 50 procedure ImageOp_B(dst, Src: TBitmap; xDst, yDst, xSrc, ySrc, Width, Height: Integer); 51 procedure ImageOp_BCC(dst, Src: TBitmap; 52 xDst, yDst, xSrc, ySrc, Width, Height, Color1, Color2: Integer); 51 procedure ImageOp_BCC(Dst, Src: TBitmap; 52 xDst, yDst, xSrc, ySrc, Width, Height, Color1, Color2: Integer); overload; 53 procedure ImageOp_BCC(Dst, Src: TBitmap; 54 DstPos: TPoint; SrcRect: TRect; Color1, Color2: Integer); overload; 53 55 procedure ImageOp_CBC(Dst, Src: TBitmap; xDst, yDst, xSrc, ySrc, Width, Height, 54 56 Color0, Color2: Integer); … … 115 117 116 118 // template positions in Templates.png 117 xLogo = 1;118 yLogo = 1;119 wLogo = 122;120 hLogo = 23; // logo121 xBBook = 1;122 yBBook = 74;123 wBBook = 143;124 hBBook = 73; // big book125 xSBook = 72;126 ySBook = 37;127 wSBook = 72;128 hSBook = 36; // small book129 119 xNation = 1; 130 120 yNation = 25; … … 177 167 Ornament: TGraphicSetItem; 178 168 Logo: TGraphicSetItem; 169 BigBook: TGraphicSetItem; 170 SmallBook: TGraphicSetItem; 171 MenuLogo: TGraphicSetItem; 179 172 ClickFrameColor: Integer; 180 173 MainTextureAge: Integer; … … 734 727 Src.EndUpdate; 735 728 dst.EndUpdate; 729 end; 730 731 procedure ImageOp_BCC(Dst, Src: TBitmap; DstPos: TPoint; SrcRect: TRect; 732 Color1, Color2: Integer); 733 begin 734 ImageOp_BCC(Dst, Src, DstPos.X, DstPos.Y, SrcRect.Left, SrcRect.Top, 735 SrcRect.Width, SrcRect.Height, Color1, Color2); 736 736 end; 737 737 … … 1498 1498 // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it 1499 1499 LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height); 1500 BitBltCanvas(LogoBuffer.Canvas, 0, 0, wLogo, hLogo, ca, x, y);1501 ImageOp_BCC(LogoBuffer, Templates.Data, 0, 0, 1, 1, wLogo, hLogo,1500 BitBltCanvas(LogoBuffer.Canvas, 0, 0, Logo.Width, Logo.Height, ca, x, y); 1501 ImageOp_BCC(LogoBuffer, Templates.Data, Point(0, 0), Logo.BoundsRect, 1502 1502 clLight, clShade); 1503 BitBltCanvas(ca, x, y, wLogo, hLogo, LogoBuffer.Canvas, 0, 0);1503 BitBltCanvas(ca, x, y, Logo.Width, Logo.Height, LogoBuffer.Canvas, 0, 0); 1504 1504 end; 1505 1505 … … 1682 1682 LoadFonts; 1683 1683 Templates := LoadGraphicSet2('Templates.png'); 1684 Logo := Templates.GetItem('Logo'); 1685 BigBook := Templates.GetItem('BigBook'); 1686 SmallBook := Templates.GetItem('SmallBook'); 1687 MenuLogo := Templates.GetItem('MenuLogo'); 1684 1688 LoadGraphicFile(Colors, GetGraphicsDir + DirectorySeparator + 'Colors.png'); 1685 1689 LoadGraphicFile(Paper, GetGraphicsDir + DirectorySeparator + 'Paper.jpg'); … … 1698 1702 ResolutionChanged := False; 1699 1703 {$ENDIF} 1700 1701 LogoBuffer := TBitmap.Create;1702 LogoBuffer.PixelFormat := pf24bit;1703 LogoBuffer.SetSize(wBBook, hBBook);1704 1704 1705 1705 for Section := Low(TFontType) to High(TFontType) do … … 1728 1728 1729 1729 LoadAssets; 1730 1731 LogoBuffer := TBitmap.Create; 1732 LogoBuffer.PixelFormat := pf24bit; 1733 LogoBuffer.SetSize(BigBook.Width, BigBook.Height); 1730 1734 end; 1731 1735 -
trunk/Start.pas
r315 r316 827 827 TabOffset + (Integer(Tab) + 1) * TabSize + 2, TabHeight, MainTexture.clBevelShade, 828 828 MainTexture.clBevelShade); // Tab shadow 829 830 // Paint menu logo 829 831 // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it 830 832 LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height); 831 BitBltCanvas(LogoBuffer.Canvas, 0, 0, 36, 36, Canvas, 6,833 BitBltCanvas(LogoBuffer.Canvas, 0, 0, MenuLogo.Width, MenuLogo.Height, Canvas, 6, 832 834 3 + 2 * integer(Tab <> tbMain)); 833 835 834 ImageOp_BCC(LogoBuffer, Templates.Data, 0, 0, 145, 38, 36, 27, $BFBF20, $4040DF);835 // logo part 1836 ImageOp_BCC(LogoBuffer, Templates.Data, 10, 27, 155, 38 + 27, 26, 9, $BFBF20,837 $4040DF); // logo part 2838 BitBltCanvas(Canvas, 6, 3 + 2 * integer(Tab <> tbMain), 36, 36,836 ImageOp_BCC(LogoBuffer, Templates.Data, 0, 0, MenuLogo.Left, MenuLogo.Top, 837 MenuLogo.Width, MenuLogo.Height - 9, $BFBF20, $4040DF); // logo part 1 838 ImageOp_BCC(LogoBuffer, Templates.Data, 10, 27, MenuLogo.Left + 10, 839 MenuLogo.Top + 27, MenuLogo.Width - 10, 9, $BFBF20, $4040DF); // logo part 2 840 BitBltCanvas(Canvas, 6, 3 + 2 * integer(Tab <> tbMain), MenuLogo.Width, MenuLogo.Height, 839 841 LogoBuffer.Canvas, 0, 0); 840 842
Note:
See TracChangeset
for help on using the changeset viewer.