diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index 3c50bd3..57f05c9 100755 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,10 +1,7 @@ - - - \ No newline at end of file diff --git a/.idea/libraries/GdxLib.xml b/.idea/libraries/GdxLib.xml deleted file mode 100755 index d597db0..0000000 --- a/.idea/libraries/GdxLib.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/KotlinJavaRuntime.xml b/.idea/libraries/KotlinJavaRuntime.xml old mode 100755 new mode 100644 index 057f1ac..1a7265d --- a/.idea/libraries/KotlinJavaRuntime.xml +++ b/.idea/libraries/KotlinJavaRuntime.xml @@ -1,16 +1,14 @@ - - + - diff --git a/.idea/libraries/TesterLib.xml b/.idea/libraries/TesterLib.xml deleted file mode 100755 index d20e73d..0000000 --- a/.idea/libraries/TesterLib.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/com_badlogicgames_gdx_gdx_1_10_0.xml b/.idea/libraries/com_badlogicgames_gdx_gdx_1_10_0.xml new file mode 100644 index 0000000..07d1917 --- /dev/null +++ b/.idea/libraries/com_badlogicgames_gdx_gdx_1_10_0.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/BuildJAR_TerrarumSansBitmap.iml b/BuildJAR_TerrarumSansBitmap.iml index 1f959f2..a395c44 100755 --- a/BuildJAR_TerrarumSansBitmap.iml +++ b/BuildJAR_TerrarumSansBitmap.iml @@ -7,7 +7,7 @@ + - \ No newline at end of file diff --git a/FontTestGDX/FontTestGDX.iml b/FontTestGDX/FontTestGDX.iml index 524cf80..de9052b 100755 --- a/FontTestGDX/FontTestGDX.iml +++ b/FontTestGDX/FontTestGDX.iml @@ -7,9 +7,7 @@ - - - + \ No newline at end of file diff --git a/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt b/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt index bf10f21..1cb481e 100755 --- a/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt +++ b/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt @@ -391,8 +391,6 @@ class GameFontBase( private lateinit var tempLinotype: Texture - private lateinit var originalColour: Color - private var nullProp = GlyphProps(15, 0) private val pixmapOffsetY = 10 @@ -414,12 +412,10 @@ class GameFontBase( val x = Math.round(x) val y = Math.round(y) - originalColour = batch.color.cpy() - val mainColObj = originalColour - var mainCol: Int = originalColour.toRGBA8888().forceOpaque() - val charSeqHash = charSeq.toCodePoints().getHash() + var renderCol = -1 // subject to change with the colour code + if (charSeqNotBlank) { val cacheObj = getCache(charSeqHash) @@ -458,10 +454,10 @@ class GameFontBase( if (isColourCode(c)) { if (c == 0x100000) { - mainCol = originalColour.toRGBA8888().forceOpaque() + renderCol = -1 } else { - mainCol = getColour(c) + renderCol = getColour(c) } } else if (isCharsetOverride(c)) { @@ -492,15 +488,9 @@ class GameFontBase( val jungTex = hangulSheet.get(indexJung, jungRow) val jongTex = hangulSheet.get(indexJong, jongRow) - linotypePixmap.setColor(mainCol) - linotypePixmap.drawPixmap(choTex, posXbuffer[index], pixmapOffsetY, mainCol) - linotypePixmap.drawPixmap(jungTex, posXbuffer[index], pixmapOffsetY, mainCol) - linotypePixmap.drawPixmap(jongTex, posXbuffer[index], pixmapOffsetY, mainCol) - - //batch.color = mainCol - //batch.draw(choTex, x + posXbuffer[index].toFloat(), y) - //batch.draw(jungTex, x + posXbuffer[index].toFloat(), y) - //batch.draw(hangulSheet.get(indexJong, jongRow), x + posXbuffer[index].toFloat(), y) + linotypePixmap.drawPixmap(choTex, posXbuffer[index], pixmapOffsetY, renderCol) + linotypePixmap.drawPixmap(jungTex, posXbuffer[index], pixmapOffsetY, renderCol) + linotypePixmap.drawPixmap(jongTex, posXbuffer[index], pixmapOffsetY, renderCol) index += hangulLength - 1 @@ -518,14 +508,11 @@ class GameFontBase( val posX = posXbuffer[index] val texture = sheets[sheetID].get(sheetX, sheetY) - linotypePixmap.drawPixmap(texture, posX, posY + pixmapOffsetY, mainCol) + linotypePixmap.drawPixmap(texture, posX, posY + pixmapOffsetY, renderCol) - //batch.color = mainCol - //batch.draw(texture, posX, posY) } catch (noSuchGlyph: ArrayIndexOutOfBoundsException) { - //batch.color = mainCol } } @@ -550,9 +537,6 @@ class GameFontBase( } - - batch.color = mainColObj - if (!flipY) { batch.draw(tempLinotype, x.toFloat(), (y - pixmapOffsetY).toFloat()) } @@ -567,7 +551,6 @@ class GameFontBase( } - batch.color = originalColour return null }