mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
special symbols to use shortcuts instead of literals
This commit is contained in:
12
src/net/torvald/UniTextShortcuts.kt
Normal file
12
src/net/torvald/UniTextShortcuts.kt
Normal file
@@ -0,0 +1,12 @@
|
||||
package net.torvald
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2019-08-05.
|
||||
*/
|
||||
|
||||
|
||||
const val CURRENCY = 0xA4.toChar()
|
||||
const val MIDDOT = 0xB7.toChar()
|
||||
|
||||
const val ENDASH = 0x2013.toChar()
|
||||
const val EMDASH = 0x2014.toChar()
|
||||
@@ -8,6 +8,7 @@ import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration
|
||||
import com.badlogic.gdx.graphics.Pixmap
|
||||
import com.badlogic.gdx.graphics.Texture
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.EMDASH
|
||||
import net.torvald.colourutil.CIEXYZUtil.toColorRaw
|
||||
import net.torvald.colourutil.CIEXYZUtil.toXYZ
|
||||
import net.torvald.colourutil.CIEYXY
|
||||
@@ -60,7 +61,7 @@ class Application : Game() {
|
||||
}
|
||||
|
||||
override fun render() {
|
||||
Gdx.graphics.setTitle("Daylight Model — F: ${Gdx.graphics.framesPerSecond}")
|
||||
Gdx.graphics.setTitle("Daylight Model $EMDASH F: ${Gdx.graphics.framesPerSecond}")
|
||||
|
||||
genTexLoop(turbidity)
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.badlogic.gdx.graphics.Texture
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.glutils.ShaderProgram
|
||||
import com.badlogic.gdx.graphics.glutils.ShapeRenderer
|
||||
import net.torvald.EMDASH
|
||||
import net.torvald.terrarumsansbitmap.gdx.GameFontBase
|
||||
|
||||
/**
|
||||
@@ -78,7 +79,7 @@ object ColorLimiterTest : ApplicationAdapter() {
|
||||
dither = ditherStart
|
||||
}
|
||||
|
||||
Gdx.graphics.setTitle("TestTestTest — F: ${Gdx.graphics.framesPerSecond}")
|
||||
Gdx.graphics.setTitle("TestTestTest $EMDASH F: ${Gdx.graphics.framesPerSecond}")
|
||||
|
||||
Gdx.gl.glClearColor(.094f, .094f, .094f, 0f)
|
||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
||||
|
||||
@@ -503,8 +503,8 @@ class Ingame(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
|
||||
Gdx.graphics.setTitle(AppLoader.GAME_NAME +
|
||||
" — F: ${Gdx.graphics.framesPerSecond} (${Terrarum.TARGET_INTERNAL_FPS})" +
|
||||
" — M: ${Terrarum.memInUse}M / ${Terrarum.memTotal}M / ${Terrarum.memXmx}M"
|
||||
" $EMDASH F: ${Gdx.graphics.framesPerSecond} (${Terrarum.TARGET_INTERNAL_FPS})" +
|
||||
" $EMDASH M: ${Terrarum.memInUse}M / ${Terrarum.memTotal}M / ${Terrarum.memXmx}M"
|
||||
)
|
||||
|
||||
// ASYNCHRONOUS UPDATE AND RENDER //
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.badlogic.gdx.graphics.*
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.glutils.ShaderProgram
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import net.torvald.EMDASH
|
||||
import net.torvald.terrarumsansbitmap.gdx.GameFontBase
|
||||
|
||||
/**
|
||||
@@ -108,7 +109,7 @@ object GlslTilingTest : ApplicationAdapter() {
|
||||
var cameraY = 0f
|
||||
|
||||
override fun render() {
|
||||
Gdx.graphics.setTitle("GlslTilingTest — F: ${Gdx.graphics.framesPerSecond}")
|
||||
Gdx.graphics.setTitle("GlslTilingTest $EMDASH F: ${Gdx.graphics.framesPerSecond}")
|
||||
|
||||
|
||||
// 0brrrrrrrr_gggggggg_bbbbbbbb_aaaaaaaa
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration
|
||||
import com.badlogic.gdx.graphics.*
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.glutils.ShaderProgram
|
||||
import net.torvald.EMDASH
|
||||
import net.torvald.terrarumsansbitmap.gdx.GameFontBase
|
||||
|
||||
/**
|
||||
@@ -83,7 +84,7 @@ object ShitOnGlsl : ApplicationAdapter() {
|
||||
|
||||
|
||||
override fun render() {
|
||||
Gdx.graphics.setTitle("ShitOnGlsl — F: ${Gdx.graphics.framesPerSecond}")
|
||||
Gdx.graphics.setTitle("ShitOnGlsl $EMDASH F: ${Gdx.graphics.framesPerSecond}")
|
||||
|
||||
Gdx.gl.glClearColor(.094f, .094f, .094f, 0f)
|
||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.glutils.FrameBuffer
|
||||
import com.badlogic.gdx.graphics.glutils.ShaderProgram
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import net.torvald.EMDASH
|
||||
import net.torvald.terrarumsansbitmap.gdx.GameFontBase
|
||||
|
||||
|
||||
@@ -67,7 +68,7 @@ class TestTestTest(val batch: SpriteBatch) : Screen {
|
||||
}
|
||||
|
||||
override fun render(delta: Float) {
|
||||
Gdx.graphics.setTitle("TestTestTest — F: ${Gdx.graphics.framesPerSecond}")
|
||||
Gdx.graphics.setTitle("TestTestTest $EMDASH F: ${Gdx.graphics.framesPerSecond}")
|
||||
|
||||
|
||||
val iterations = 16 // ideally, 4 * radius; must be even number -- odd number will flip the image
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package net.torvald.terrarum.controller
|
||||
|
||||
import net.torvald.CURRENCY
|
||||
import net.torvald.EMDASH
|
||||
import net.torvald.MIDDOT
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2019-04-10.
|
||||
*/
|
||||
@@ -13,7 +17,7 @@ object GamepadVirtualKeyboard : VirtualKeyboard(20) {
|
||||
// aeiouszc-caron must be produced as-is. Otherwise breve is produced instead.
|
||||
|
||||
val keyLayoutSym = arrayOf(
|
||||
"12345,", "67890.", "-/:;()", "&@?!'\"", "—#%^*+", "=_\\|<>", "·¤[]{}", "«»•"
|
||||
"12345,", "67890.", "-/:;()", "&@?!'\"", "$EMDASH#%^*+", "=_\\|<>", "$MIDDOT$CURRENCY[]{}", "«»•"
|
||||
)
|
||||
|
||||
override fun takeFromInputBuffer() {
|
||||
|
||||
@@ -46,9 +46,9 @@ open class GameWorld : Disposable {
|
||||
open val loadTime: Long = System.currentTimeMillis() / 1000L
|
||||
|
||||
//layers
|
||||
@TEMzPayload("WALL", TEMzPayload.TWELVE_BITS_LITTLE)
|
||||
@TEMzPayload("WALL", TEMzPayload.INT16_LITTLE)
|
||||
val layerWall: BlockLayer
|
||||
@TEMzPayload("TERR", TEMzPayload.EIGHT_MSB)
|
||||
@TEMzPayload("TERR", TEMzPayload.INT16_LITTLE)
|
||||
val layerTerrain: BlockLayer
|
||||
//val layerWire: MapLayer
|
||||
|
||||
@@ -514,11 +514,9 @@ annotation class TEMzPayload(val payloadName: String, val arg: Int) {
|
||||
const val EXTERNAL_JAVAPROPERTIES = -3
|
||||
const val EXTERNAL_CSV = -2
|
||||
const val EXTERNAL_JSON = -1
|
||||
const val EIGHT_MSB = 0
|
||||
const val FOUR_LSB = 1
|
||||
const val INT16_LITTLE = 1
|
||||
const val INT48_FLOAT_PAIR = 2
|
||||
const val INT48_SHORT_PAIR = 3
|
||||
const val INT48_INT_PAIR = 4
|
||||
const val TWELVE_BITS_LITTLE = 5
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.badlogic.gdx.Gdx
|
||||
import com.badlogic.gdx.Input
|
||||
import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.EMDASH
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.AppLoader.printdbg
|
||||
import net.torvald.terrarum.blockproperties.BlockPropUtil
|
||||
@@ -85,10 +86,10 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
}
|
||||
|
||||
fun getCanonicalTitle() = AppLoader.GAME_NAME +
|
||||
" — F: ${Gdx.graphics.framesPerSecond}" +
|
||||
" $EMDASH F: ${Gdx.graphics.framesPerSecond}" +
|
||||
if (AppLoader.IS_DEVELOPMENT_BUILD)
|
||||
" (ΔF${Terrarum.updateRateStr})" +
|
||||
" — M: J${Terrarum.memJavaHeap}M / N${Terrarum.memNativeHeap}M / X${Terrarum.memXmx}M"
|
||||
" $EMDASH M: J${Terrarum.memJavaHeap}M / N${Terrarum.memNativeHeap}M / X${Terrarum.memXmx}M"
|
||||
else
|
||||
""
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.torvald.terrarum.modulebasegame.console
|
||||
|
||||
import net.torvald.EMDASH
|
||||
import net.torvald.random.HQRNG
|
||||
import net.torvald.terrarum.console.ConsoleCommand
|
||||
import net.torvald.terrarum.console.Echo
|
||||
@@ -15,6 +16,6 @@ object MoneyDisp : ConsoleCommand {
|
||||
}
|
||||
|
||||
override fun printUsage() {
|
||||
Echo("Usage: money [amount] — Prints given or random amount of money")
|
||||
Echo("Usage: money [amount] $EMDASH Prints given or random amount of money")
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.torvald.terrarum.modulebasegame.debuggerapp
|
||||
|
||||
import net.torvald.EMDASH
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.ccM
|
||||
import net.torvald.terrarum.ccW
|
||||
@@ -152,7 +153,7 @@ class ActorValueTracker constructor() : JFrame() {
|
||||
fun setTrackingActor(actor: Actor?) {
|
||||
this.actorValue = actor?.actorValue
|
||||
|
||||
this.title = "AVTracker — $actor"
|
||||
this.title = "AVTracker $EMDASH $actor"
|
||||
|
||||
if (actor is ActorWBMovable) {
|
||||
this.actor = actor
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.*
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.glutils.FrameBuffer
|
||||
import com.badlogic.gdx.graphics.glutils.ShapeRenderer
|
||||
import net.torvald.ENDASH
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.AppLoader.*
|
||||
import net.torvald.terrarum.blockstats.MinimapComposer
|
||||
@@ -38,7 +39,7 @@ class UIInventoryFull(
|
||||
override var width: Int = AppLoader.screenW
|
||||
override var height: Int = AppLoader.screenH
|
||||
|
||||
private val itemListToEquipViewGap = 24
|
||||
private val itemListToEquipViewGap = UIItemInventoryDynamicList.listGap // used to be 24; figured out that the extra gap does nothig
|
||||
|
||||
val internalWidth: Int = UIItemInventoryDynamicList.WIDTH + UIItemInventoryEquippedView.WIDTH + itemListToEquipViewGap
|
||||
val internalHeight: Int = 166 + UIItemInventoryDynamicList.HEIGHT // grad_begin..grad_end..contents..grad_begin..grad_end
|
||||
@@ -60,7 +61,7 @@ class UIInventoryFull(
|
||||
get() = if (AppLoader.environment == RunningEnvironment.PC)
|
||||
"${0xe031.toChar()} ${Lang["GAME_ACTION_CLOSE"]}$SP" +
|
||||
"${0xe006.toChar()} ${Lang["GAME_INVENTORY_USE"]}$SP" +
|
||||
"${0xe011.toChar()}..${0xe010.toChar()} ${Lang["GAME_INVENTORY_REGISTER"]}$SP" +
|
||||
"${0xe011.toChar()}$ENDASH${0x2009.toChar()}${0xe010.toChar()} ${Lang["GAME_INVENTORY_REGISTER"]}$SP" +
|
||||
"${0xe034.toChar()} ${Lang["GAME_INVENTORY_DROP"]}"
|
||||
else
|
||||
"$gamepadLabelStart ${Lang["GAME_ACTION_CLOSE"]}$SP" +
|
||||
@@ -199,7 +200,7 @@ class UIInventoryFull(
|
||||
|
||||
}
|
||||
|
||||
private var offsetX = ((AppLoader.screenW - internalWidth) / 2).toFloat()
|
||||
private var offsetX = ((AppLoader.screenW - internalWidth) / 2).toFloat()
|
||||
private var offsetY = ((AppLoader.screenH - internalHeight) / 2).toFloat()
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.Texture
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.EMDASH
|
||||
import net.torvald.terrarum.modulecomputers.virtualcomputer.computer.LuaComputerVM
|
||||
import net.torvald.terrarum.modulecomputers.virtualcomputer.computer.MDA
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
@@ -75,7 +76,7 @@ class StandaloneApp : Game() {
|
||||
|
||||
|
||||
override fun render() {
|
||||
Gdx.graphics.setTitle("Terrarum Lua Computer Standalone — F: ${Gdx.graphics.framesPerSecond}")
|
||||
Gdx.graphics.setTitle("Terrarum Lua Computer Standalone $EMDASH F: ${Gdx.graphics.framesPerSecond}")
|
||||
|
||||
//display.print(ByteArray(1){ (Math.random() * 255).toByte() })
|
||||
//display.print("@")
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.badlogic.gdx.backends.lwjgl.LwjglApplication
|
||||
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.EMDASH
|
||||
import net.torvald.terrarum.gdxClearAndSetBlend
|
||||
import net.torvald.terrarum.inUse
|
||||
|
||||
@@ -98,7 +99,7 @@ class GetKeycode : Game() {
|
||||
}
|
||||
|
||||
override fun render() {
|
||||
Gdx.graphics.setTitle("Get Keycode — F: ${Gdx.graphics.framesPerSecond}")
|
||||
Gdx.graphics.setTitle("Get Keycode $EMDASH F: ${Gdx.graphics.framesPerSecond}")
|
||||
|
||||
gdxClearAndSetBlend(.1f,.1f,.1f,1f)
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.badlogic.gdx.graphics.OrthographicCamera
|
||||
import com.badlogic.gdx.graphics.Pixmap
|
||||
import com.badlogic.gdx.graphics.Texture
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.EMDASH
|
||||
import net.torvald.random.HQRNG
|
||||
import net.torvald.terrarum.Point2i
|
||||
import net.torvald.terrarum.inUse
|
||||
@@ -99,7 +100,7 @@ class NoopRectTest(val appConfig: LwjglApplicationConfiguration) : Game() {
|
||||
texture.dispose()
|
||||
texture = Texture(pixmap)
|
||||
|
||||
Gdx.graphics.setTitle("No-op Rectangle Test — F: ${Gdx.graphics.framesPerSecond}")
|
||||
Gdx.graphics.setTitle("No-op Rectangle Test $EMDASH F: ${Gdx.graphics.framesPerSecond}")
|
||||
|
||||
batch.inUse {
|
||||
batch.projectionMatrix = camera.combined
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.badlogic.gdx.Gdx
|
||||
import com.badlogic.gdx.graphics.Camera
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import net.torvald.EMDASH
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.Terrarum.mouseTileX
|
||||
import net.torvald.terrarum.Terrarum.mouseTileY
|
||||
@@ -147,7 +148,7 @@ class BasicDebugInfoWindow : UICanvas() {
|
||||
val rawB = valRaw?.b?.times(100f)?.round()?.div(100f)
|
||||
val rawA = valRaw?.a?.times(100f)?.round()?.div(100f)
|
||||
|
||||
lightVal = if (valRaw == null) "—"
|
||||
lightVal = if (valRaw == null) "$EMDASH"
|
||||
else "$rawR $rawG $rawB $rawA"
|
||||
printLine(batch, 8, "light@cursor $ccG$lightVal")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user