mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-21 20:18:14 +07:00
Fixed issue with viewbuffer algorithm rendering more than we need to
This commit is contained in:
parent
1d6fac1b52
commit
cb977678ea
@ -247,7 +247,7 @@ public class MapRenderer {
|
||||
public void resize() {
|
||||
updateBounds();
|
||||
final int viewBufferLen = tilesX + tilesY - 1;
|
||||
final int viewBufferMax = tilesY * 2 - 1; // was tilesX, but seems better if bound to height
|
||||
final int viewBufferMax = tilesX * 2 - 1; // FIXME: double check when adding support for other aspect ratios, need a ternary operation
|
||||
viewBuffer = new int[viewBufferLen];
|
||||
int x, y;
|
||||
for (x = 0, y = 1; y < viewBufferMax; x++, y += 2)
|
||||
|
Loading…
Reference in New Issue
Block a user