Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
NeRdTheNed committed Oct 14, 2023
1 parent 3154372 commit f208a93
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
public final class MissingTextureGenerator extends AbstractTextureGenerator {

/** The size of the generated text based textures. */
private static final int TEXT_TEXTURE_SZIE = STANDARD_IMAGE_SIZE * 4;
private static final int TEXT_TEXTURE_SIZE = STANDARD_IMAGE_SIZE * 4;

/** The starting y-position for text-based textures. */
private static final int TEXT_STARTING_YPOS = 10 * STANDARD_IMAGE_SIZE_MULTIPLIER;
Expand Down Expand Up @@ -62,7 +62,7 @@ private static TextureGroup missingTextureText(String name, boolean repeats, Str
final BufferedImage[] missingTextureAsArray;

if (shouldGeneratePlatformDependentTextures) {
final BufferedImage missingTexture = new BufferedImage(TEXT_TEXTURE_SZIE, TEXT_TEXTURE_SZIE, BufferedImage.TYPE_INT_ARGB);
final BufferedImage missingTexture = new BufferedImage(TEXT_TEXTURE_SIZE, TEXT_TEXTURE_SIZE, BufferedImage.TYPE_INT_ARGB);
final Graphics2D graphics = missingTexture.createGraphics();
// Really dumb code to use text anti aliasing when running on Apple's legacy java runtime on a Mac with a retina display.
// TODO I think this should produce the right results but legacy MacOS support is hard.
Expand All @@ -74,7 +74,7 @@ private static TextureGroup missingTextureText(String name, boolean repeats, Str

// Fill background with white
graphics.setColor(Color.WHITE);
graphics.fillRect(0, 0, TEXT_TEXTURE_SZIE, TEXT_TEXTURE_SZIE);
graphics.fillRect(0, 0, TEXT_TEXTURE_SIZE, TEXT_TEXTURE_SIZE);

if ((lines != null) && (lines.length > 0)) {
// Set color to black for text rendering
Expand All @@ -96,7 +96,7 @@ private static TextureGroup missingTextureText(String name, boolean repeats, Str
int yPos = TEXT_STARTING_YPOS;
int stringsDrawn = 0;

while (yPos < TEXT_TEXTURE_SZIE) {
while (yPos < TEXT_TEXTURE_SIZE) {
final String currentLine = lines[stringsDrawn % lines.length];
stringsDrawn++;
graphics.drawString(currentLine, 1, yPos);
Expand Down

0 comments on commit f208a93

Please sign in to comment.