Changeset 349 for branches/highdpi/LocalPlayer/MessgEx.pas
- Timestamp:
- Apr 6, 2021, 8:11:02 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/LocalPlayer/MessgEx.pas
r311 r349 149 149 begin 150 150 Tribe[IconIndex].InitAge(GetAge(IconIndex)); 151 if Tribe[IconIndex].faceHGr >= 0then152 TopSpace := 64 151 if Assigned(Tribe[IconIndex].faceHGr) then 152 TopSpace := 64; 153 153 end; 154 154 mikFullControl: … … 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 // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it 300 LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height); 301 DpiBitCanvas(LogoBuffer.Canvas, 0, 0, wb, hb, ca, x, y); 294 UnshareBitmap(LogoBuffer); 295 DpiBitCanvas(LogoBuffer.Canvas, 0, 0, BookRect.Width, BookRect.Height, ca, x, y); 302 296 303 297 if IconIndex >= 0 then … … 310 304 Trunc(Screwed[ix, iy, 0] / Screwed[ix, iy, 3]) shl 16; 311 305 312 ImageOp_BCC(LogoBuffer, Templates , 0, 0, xb, yb, wb, hb, clCover, clPage);313 314 DpiBitCanvas(ca, x, y, wb, hb, LogoBuffer.Canvas, 0, 0);306 ImageOp_BCC(LogoBuffer, Templates.Data, Point(0, 0), BookRect, clCover, clPage); 307 308 DpiBitCanvas(ca, x, y, BookRect.Width, BookRect.Height, LogoBuffer.Canvas, 0, 0); 315 309 end; 316 310 … … 336 330 with MyRO.EnemyModel[emix], Tribe[Owner].ModelPicture[mix] do 337 331 begin 338 DpiBitCanvas(Canvas, x, y, 64, 48, GrExt[HGr].Mask.Canvas,332 DpiBitCanvas(Canvas, x, y, 64, 48, HGr.Mask.Canvas, 339 333 pix mod 10 * 65 + 1, pix div 10 * 49 + 1, SRCAND); 340 DpiBitCanvas(Canvas, x, y, 64, 48, GrExt[HGr].Data.Canvas,334 DpiBitCanvas(Canvas, x, y, 64, 48, HGr.Data.Canvas, 341 335 pix mod 10 * 65 + 1, pix div 10 * 49 + 1, SRCPAINT); 342 336 end; … … 379 373 begin 380 374 p1 := MyRO.Wonder[IconIndex].EffectiveOwner; 381 // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it 382 Buffer.Canvas.FillRect(0, 0, 1, 1); 375 UnshareBitmap(Buffer); 383 376 DpiBitCanvas(Buffer.Canvas, 0, 0, xSizeBig + 2 * GlowRange, 384 377 ySizeBig + 2 * GlowRange, Canvas, … … 411 404 ySizeBig, 0, 0); 412 405 DpiBitCanvas(Canvas, ClientWidth div 2 - 32, 20, 64, 44, 413 GrExt[HGr].Mask.Canvas, pix mod 10 * 65 + 1,406 HGr.Mask.Canvas, pix mod 10 * 65 + 1, 414 407 pix div 10 * 49 + 1, SRCAND); 415 408 DpiBitCanvas(Canvas, ClientWidth div 2 - 32, 20, 64, 44, 416 GrExt[HGr].Data.Canvas, pix mod 10 * 65 + 1,409 HGr.Data.Canvas, pix mod 10 * 65 + 1, 417 410 pix div 10 * 49 + 1, SRCPAINT); 418 411 end; … … 421 414 MainTexture.clCover); 422 415 mikTribe: 423 if Tribe[IconIndex].faceHGr >= 0then416 if Assigned(Tribe[IconIndex].faceHGr) then 424 417 begin 425 418 Frame(Canvas, ClientWidth div 2 - 32 - 1, 24 - 1, 426 419 ClientWidth div 2 + 32, 24 + 48, $000000, $000000); 427 420 DpiBitCanvas(Canvas, ClientWidth div 2 - 32, 24, 64, 48, 428 GrExt[Tribe[IconIndex].faceHGr].Data.Canvas,421 Tribe[IconIndex].faceHGr.Data.Canvas, 429 422 1 + Tribe[IconIndex].facepix mod 10 * 65, 430 423 1 + Tribe[IconIndex].facepix div 10 * 49) … … 441 434 DpiBitCanvas(Buffer.Canvas, 0, 0, 140, 120, Canvas, 442 435 (ClientWidth - 140) div 2, 24); 443 ImageOp_BCC(Buffer, Templates , 0, 0, 1, 279, 140, 120, 0, $FFFFFF);436 ImageOp_BCC(Buffer, Templates.Data, Point(0, 0), StarshipDeparted.BoundsRect, 0, $FFFFFF); 444 437 DpiBitCanvas(Canvas, (ClientWidth - 140) div 2, 24, 140, 120, 445 438 Buffer.Canvas, 0, 0);
Note:
See TracChangeset
for help on using the changeset viewer.