Changeset 316 for trunk/LocalPlayer


Ignore:
Timestamp:
Mar 18, 2021, 11:31:20 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Some Templates items used as TGraphicSetItem.
Location:
trunk/LocalPlayer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/MessgEx.pas

    r315 r316  
    233233  hScrewed = 27;
    234234var
    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;
    236237  x1, xR, yR, share: single;
    237238  Screwed: array [0 .. wScrewed - 1, 0 .. hScrewed - 1, 0 .. 3] of single;
     
    282283    end;
    283284    BigImp.EndUpdate;
    284     xb := xBBook;
    285     yb := yBBook;
    286     wb := wBBook;
    287     hb := hBBook;
     285    BookRect := BigBook.BoundsRect;
    288286  end
    289287  else
    290288  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;
    297292
    298293  // paint
    299294  // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it
    300295  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);
    302297
    303298  if IconIndex >= 0 then
     
    310305            Trunc(Screwed[ix, iy, 0] / Screwed[ix, iy, 3]) shl 16;
    311306
    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);
    315310end;
    316311
  • trunk/LocalPlayer/Term.pas

    r315 r316  
    48434843  end;
    48444844  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);
    48464846  if MyRO.nCity > 0 then
    48474847  begin
Note: See TracChangeset for help on using the changeset viewer.