if (lines == null) lines = new LineInfo[lineCount]; for (int i = startLine; i < startLine + count; i++) { if (lines[i] == null) { lines[i] = new LineInfo();
if (bulletsIndices != null) { bulletsIndices = null; bullets = null; } if (bullets == null) { if (bullet == null) return; bullets = new Bullet[1]; bullets[0] = bullet; } int index = 0; while (index < bullets.length) { if (bullet == bullets[index]) break; index++; } if (bullet != null) { if (index == bullets.length) { Bullet[] newBulletsList = new Bullet[bullets.length + 1]; System.arraycopy(bullets, 0, newBulletsList, 0, bullets.length); newBulletsList[index] = bullet; bullets = newBulletsList;
void setLineBullet(int startLine, int count, Bullet bullet) {	if (lines == null) lines = new LineInfo[lineCount];	for (int i = startLine; i < startLine + count; i++) {		if (lines[i] == null) {			lines[i] = new LineInfo();		}		lines[i].flags |= BULLET;		lines[i].bullet = bullet;	}}