v0.7.5: fixed layout issues and crashes with diamond goo rooms
This commit is contained in:
parent
15d1edff8c
commit
8e4e8f495c
|
@ -33,7 +33,9 @@ public class DiamondGooRoom extends GooBossRoom {
|
||||||
public void paint(Level level) {
|
public void paint(Level level) {
|
||||||
Painter.fill( level, this, Terrain.WALL );
|
Painter.fill( level, this, Terrain.WALL );
|
||||||
|
|
||||||
int diamondWidth = 2 + width()%2;
|
//we want the end width to be width()-2, and the width will grow by a total of (height()-4 - height()%2)
|
||||||
|
int diamondWidth = width()-2 - (height()-4 - height()%2);
|
||||||
|
|
||||||
for (int i = 1; i < height(); i++){
|
for (int i = 1; i < height(); i++){
|
||||||
Painter.fill( level, left + (width() - diamondWidth)/2, top+i, diamondWidth, height()-2*i, Terrain.EMPTY);
|
Painter.fill( level, left + (width() - diamondWidth)/2, top+i, diamondWidth, height()-2*i, Terrain.EMPTY);
|
||||||
diamondWidth += 2;
|
diamondWidth += 2;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user