- Optimized blockInfo.ScreenRect calculation for static tiles

- Fixed TScreenBuffer.Find to correctly handle the new buffer usage (search at the end, not the beginning)
This commit is contained in:
2009-07-30 17:04:49 +02:00
parent 1196ad6425
commit 01d5fb98d1
4 changed files with 2512 additions and 2512 deletions

View File

@@ -2133,10 +2133,10 @@ begin
hue := nil;
blockInfo^.LowRes := FTextureManager.GetArtMaterial($4000 + staticItem.TileID, hue, (staticTileData.Flags and tdfPartialHue) = tdfPartialHue);
blockInfo^.ScreenRect := Bounds(Trunc(drawX - blockInfo^.LowRes.RealWidth div 2),
blockInfo^.ScreenRect := Bounds(Trunc(drawX - blockInfo^.LowRes.RealWidth / 2),
Trunc(drawY + 44 - blockInfo^.LowRes.RealHeight - z * 4),
blockInfo^.LowRes.RealWidth,
Trunc(blockInfo^.LowRes.RealHeight));
blockInfo^.LowRes.RealHeight);
south := blockInfo^.LowRes.RealHeight;
east := blockInfo^.LowRes.RealWidth div 2;