mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-03-07 11:51:50 +09:00
update to kotlin 1.4; fixed a bug where trying to colour a text using gdxbatch's colour would cause undesirable results
This commit is contained in:
7
.idea/kotlinc.xml
generated
7
.idea/kotlinc.xml
generated
@@ -1,10 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Kotlin2JvmCompilerArguments">
|
||||
<option name="jvmTarget" value="1.8" />
|
||||
</component>
|
||||
<component name="KotlinCommonCompilerArguments">
|
||||
<option name="apiVersion" value="1.2" />
|
||||
<option name="languageVersion" value="1.2" />
|
||||
<option name="apiVersion" value="1.4" />
|
||||
<option name="languageVersion" value="1.4" />
|
||||
</component>
|
||||
</project>
|
||||
17
.idea/libraries/GdxLib.xml
generated
17
.idea/libraries/GdxLib.xml
generated
@@ -1,17 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="GdxLib">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<NATIVE>
|
||||
<root url="file://$PROJECT_DIR$/lib" />
|
||||
</NATIVE>
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib" />
|
||||
<root url="jar://$PROJECT_DIR$/lib/gdx.jar!/" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib" recursive="false" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib" recursive="false" type="SOURCES" />
|
||||
</library>
|
||||
</component>
|
||||
4
.idea/libraries/KotlinJavaRuntime.xml
generated
Executable file → Normal file
4
.idea/libraries/KotlinJavaRuntime.xml
generated
Executable file → Normal file
@@ -1,16 +1,14 @@
|
||||
<component name="libraryTable">
|
||||
<library name="KotlinJavaRuntime">
|
||||
<CLASSES>
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-runtime.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-test.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk7.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk8.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-runtime-sources.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib-sources.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect-sources.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-test-sources.jar!/" />
|
||||
|
||||
10
.idea/libraries/TesterLib.xml
generated
10
.idea/libraries/TesterLib.xml
generated
@@ -1,10 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="TesterLib">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/FontTestGDX/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/FontTestGDX/lib" recursive="false" />
|
||||
</library>
|
||||
</component>
|
||||
10
.idea/libraries/com_badlogicgames_gdx_gdx_1_10_0.xml
generated
Normal file
10
.idea/libraries/com_badlogicgames_gdx_gdx_1_10_0.xml
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
<component name="libraryTable">
|
||||
<library name="com.badlogicgames.gdx:gdx:1.10.0" type="repository">
|
||||
<properties maven-id="com.badlogicgames.gdx:gdx:1.10.0" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/badlogicgames/gdx/gdx/1.10.0/gdx-1.10.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
@@ -7,7 +7,7 @@
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="com.badlogicgames.gdx:gdx:1.10.0" level="project" />
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
<orderEntry type="library" name="GdxLib" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -7,9 +7,7 @@
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
<orderEntry type="library" name="GdxLib" level="project" />
|
||||
<orderEntry type="library" name="TesterLib" level="project" />
|
||||
<orderEntry type="module" module-name="BuildJAR_TerrarumSansBitmap" />
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user