Changeset 28 for trunk/LocalPlayer
- Timestamp:
- Jan 8, 2017, 7:14:56 PM (8 years ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/CityScreen.pas
r20 r28 216 216 Back.Height := ClientHeight; 217 217 Template := TBitmap.Create; 218 LoadGraphicFile(Template, HomeDir + 'Graphics ' + DirectorySeparator + 'City', gfNoGamma);218 LoadGraphicFile(Template, HomeDir + 'Graphics\City', gfNoGamma); 219 219 Template.PixelFormat := pf8bit; 220 220 CityMapTemplate := TBitmap.Create; 221 LoadGraphicFile(CityMapTemplate, HomeDir + 'Graphics ' + DirectorySeparator + 'BigCityMap', gfNoGamma);221 LoadGraphicFile(CityMapTemplate, HomeDir + 'Graphics\BigCityMap', gfNoGamma); 222 222 CityMapTemplate.PixelFormat := pf8bit; 223 223 SmallCityMapTemplate := TBitmap.Create; 224 LoadGraphicFile(SmallCityMapTemplate, HomeDir + 'Graphics ' + DirectorySeparator + 'SmallCityMap',224 LoadGraphicFile(SmallCityMapTemplate, HomeDir + 'Graphics\SmallCityMap', 225 225 gfNoGamma); 226 226 SmallCityMapTemplate.PixelFormat := pf24bit; … … 447 447 line[i, 1] := 0; 448 448 line[i, 2] := gray; // 255-(255-gray) div 2; 449 end 449 end; 450 450 end; 451 451 … … 453 453 i: integer; 454 454 begin 455 Offscreen.BeginUpdate; 455 456 for i := 0 to h - 1 do 456 RedLine(@(PLine(offscreen.ScanLine[y + i])[x]), w) 457 RedLine(@(PLine(offscreen.ScanLine[y + i])[x]), w); 458 Offscreen.EndUpdate; 457 459 end; 458 460 -
trunk/LocalPlayer/Help.pas
r21 r28 375 375 (SystemIconLines + woEiffel div 7) * ySizeBig + dy]; 376 376 377 BigImp.BeginUpdate; 378 Offscreen.BeginUpdate; 377 379 xSrc := iix mod 7 * xSizeBig; 378 380 ySrc := (iix div 7 + 1) * ySizeBig; … … 408 410 PaintLine[x0 + x, 1] := PaintLine[x0 + x, 1] * sum shr 22; 409 411 PaintLine[x0 + x, 2] := PaintLine[x0 + x, 2] * sum shr 22; 410 end 411 end 412 end; 413 end; 412 414 end; 415 Offscreen.EndUpdate; 416 BigImp.EndUpdate; 413 417 end; 414 418 -
trunk/LocalPlayer/IsoEngine.pas
r21 r28 343 343 Mask24.Assign(GrExt[HGrTerrain].Mask); 344 344 Mask24.PixelFormat := pf24bit; 345 Mask24.BeginUpdate; 345 346 for ySrc := 0 to TerrainIconLines - 1 do 346 347 begin … … 358 359 Border := false; 359 360 if Border then 360 inc(TSpriteSize[i].Left) until not Border or 361 (TSpriteSize[i].Left = xxt * 2 - 1); 362 TSpriteSize[i].Top := 0; 363 repeat 364 Border := true; 365 for x := 0 to xxt * 2 - 1 do 366 if MaskLine[TSpriteSize[i].Top]^[1 + xSrc * (xxt * 2 + 1) + x, 0] = 0 367 then 361 inc(TSpriteSize[i].Left); 362 until not Border or 363 (TSpriteSize[i].Left = xxt * 2 - 1); 364 TSpriteSize[i].Top := 0; 365 repeat 366 Border := true; 367 for x := 0 to xxt * 2 - 1 do 368 if MaskLine[TSpriteSize[i].Top]^[1 + xSrc * (xxt * 2 + 1) + x, 0] = 0 369 then 370 Border := false; 371 if Border then 372 inc(TSpriteSize[i].Top); 373 until not Border or 374 (TSpriteSize[i].Top = yyt * 3 - 1); 375 TSpriteSize[i].Right := xxt * 2; 376 repeat 377 Border := true; 378 for y := 0 to yyt * 3 - 1 do 379 if MaskLine[y]^[xSrc * (xxt * 2 + 1) + TSpriteSize[i].Right, 0] = 0 380 then 381 Border := false; 382 if Border then 383 dec(TSpriteSize[i].Right); 384 until not Border or 385 (TSpriteSize[i].Right = TSpriteSize[i].Left); 386 TSpriteSize[i].Bottom := yyt * 3; 387 repeat 388 Border := true; 389 for x := 0 to xxt * 2 - 1 do 390 if MaskLine[TSpriteSize[i].Bottom - 1]^ 391 [1 + xSrc * (xxt * 2 + 1) + x, 0] = 0 then 368 392 Border := false; 369 if Border then 370 inc(TSpriteSize[i].Top) until not Border or 371 (TSpriteSize[i].Top = yyt * 3 - 1); 372 TSpriteSize[i].Right := xxt * 2; 373 repeat 374 Border := true; 375 for y := 0 to yyt * 3 - 1 do 376 if MaskLine[y]^[xSrc * (xxt * 2 + 1) + TSpriteSize[i].Right, 0] = 0 377 then 378 Border := false; 379 if Border then 380 dec(TSpriteSize[i].Right) until not Border or 381 (TSpriteSize[i].Right = TSpriteSize[i].Left); 382 TSpriteSize[i].Bottom := yyt * 3; 383 repeat 384 Border := true; 385 for x := 0 to xxt * 2 - 1 do 386 if MaskLine[TSpriteSize[i].Bottom - 1]^ 387 [1 + xSrc * (xxt * 2 + 1) + x, 0] = 0 then 388 Border := false; 389 if Border then 390 dec(TSpriteSize[i].Bottom) until not Border or 391 (TSpriteSize[i].Bottom = TSpriteSize[i].Top); 392 end 393 end; 394 Mask24.Free; 395 396 if Borders <> nil then 397 Borders.Free; 398 Borders := TBitmap.Create; 399 Borders.PixelFormat := pf24bit; 400 Borders.Width := xxt * 2; 401 Borders.Height := (yyt * 2) * nPl; 402 BordersOK := 0; 403 end; 393 if Border then 394 dec(TSpriteSize[i].Bottom); 395 until not Border or 396 (TSpriteSize[i].Bottom = TSpriteSize[i].Top); 397 end 398 end; 399 Mask24.EndUpdate; 400 Mask24.Free; 401 402 if Borders <> nil then 403 Borders.Free; 404 Borders := TBitmap.Create; 405 Borders.PixelFormat := pf24bit; 406 Borders.Width := xxt * 2; 407 Borders.Height := (yyt * 2) * nPl; 408 BordersOK := 0; 409 end; 404 410 405 411 procedure Done; … … 1008 1014 1 + 8 * (xxt * 2 + 1), 1009 1015 1 + yyt + 16 * (yyt * 3 + 1), SRCCOPY); 1016 Borders.BeginUpdate; 1010 1017 for dy := 0 to yyt * 2 - 1 do 1011 1018 begin … … 1019 1026 end 1020 1027 end; 1028 Borders.EndUpdate; 1021 1029 BordersOK := BordersOK or 1 shl p1; 1022 1030 end; … … 1340 1348 Line: ^TLine; 1341 1349 begin 1350 FOutput.BeginUpdate; 1342 1351 for y := y0 to y1 - 1 do 1343 1352 begin … … 1353 1362 else 1354 1363 MakeDark(@Line[x0], x1 - x0); 1355 end 1364 end; 1365 FOutput.EndUpdate; 1356 1366 end; 1357 1367 -
trunk/LocalPlayer/MessgEx.pas
r21 r28 247 247 // prepare screwed icon 248 248 fillchar(Screwed, sizeof(Screwed), 0); 249 BigImp.BeginUpdate; 249 250 for iy := 0 to 39 do 250 251 begin … … 278 279 Screwed[xDst + dx, yDst + dy, 3] := Screwed[xDst + dx, yDst + dy, 279 280 3] + share; 280 end 281 end; 281 282 end; 282 283 end; 284 BigImp.EndUpdate; 283 285 xb := xBBook; 284 286 yb := yBBook; -
trunk/LocalPlayer/TechTree.pas
r20 r28 166 166 167 167 // texturize background 168 Image.BeginUpdate; 168 169 TexWidth := Paper.width; 169 170 TexHeight := Paper.height; … … 176 177 if Cardinal((@DstLine[X])^) and $FFFFFF = $7F007F then // transparent 177 178 DstLine[X] := SrcLine[X mod TexWidth]; 178 end 179 end 179 end; 180 end; 181 Image.EndUpdate; 180 182 end; 181 183 -
trunk/LocalPlayer/Term.pas
r21 r28 437 437 438 438 {$R *.lfm} 439 //TODO {$R Res1.res}439 {TODO {$R Res1.res} 440 440 441 441 const … … 522 522 GetMem(resampled, nx * ny * 12); 523 523 FillChar(resampled^, nx * ny * 12, 0); 524 BigImp.BeginUpdate; 524 525 for ix := 0 to BigImp.width div xSizeBig - 1 do 525 526 for iy := 0 to BigImp.height div ySizeBig - 1 do … … 553 554 inc(resampled[ir + nx + 1, ch], c * (xSizeSmall - xdivider) * 554 555 (ySizeSmall - ydivider)); 555 end 556 end 556 end; 557 end; 557 558 end; 559 BigImp.EndUpdate; 558 560 559 561 // sharpen resampled icons 560 562 SmallImp.width := nx; 561 563 SmallImp.height := ny; 564 SmallImp.BeginUpdate; 562 565 for y := 0 to ny - 1 do 563 566 begin … … 587 590 end; 588 591 end; 592 SmallImp.EndUpdate; 589 593 FreeMem(resampled); 590 594 // smallimp.savetofile(homedir+'smallimp.bmp'); //!!! … … 4088 4092 end; 4089 4093 MiniLine := nil; 4094 Mini.BeginUpdate; 4090 4095 for y := 0 to G.ly - 1 do 4091 4096 begin … … 4159 4164 MiniLine[xm, 2] := cm and $FF; 4160 4165 end; 4161 end 4162 end; 4166 end; 4167 end; 4168 Mini.EndUpdate; 4163 4169 end; 4164 4170 -
trunk/LocalPlayer/Wonders.pas
r21 r28 157 157 Offscreen.Canvas.Font.Assign(UniFont[ftNormal]); 158 158 159 Offscreen.BeginUpdate; 159 160 xm := ClientWidth div 2; 160 161 ym := ClientHeight div 2; … … 184 185 else 185 186 Line[i][xm - 1 - X][ch] := c; 186 end 187 end; 188 end; 187 end; 188 end; 189 end; 190 Offscreen.EndUpdate; 189 191 190 192 HaveWonder := false;
Note:
See TracChangeset
for help on using the changeset viewer.