diff --git a/assets/graphics/fonts/fullwidth_forms.tga b/assets/graphics/fonts/fullwidth_forms.tga index 2e8d91d8a..6938df1ed 100644 --- a/assets/graphics/fonts/fullwidth_forms.tga +++ b/assets/graphics/fonts/fullwidth_forms.tga @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84e663fc2db5eba3c92a5200805f2859840aa04f3b7bd9a888091c8997d03dbe -size 98322 +oid sha256:060c9d150790911c96dfca393dc15422166ef2250060cded32f345610a53e06c +size 98348 diff --git a/assets/modules/basegame/sprites/test_player.tga b/assets/modules/basegame/sprites/test_player.tga index 611bfb907..6d55ce99e 100644 --- a/assets/modules/basegame/sprites/test_player.tga +++ b/assets/modules/basegame/sprites/test_player.tga @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de293cfb64d44e58ce8b003d8b995c63d9398af83e7a08e6f49f0345791c40e1 -size 5730 +oid sha256:0bd0fc3fbb44b7c15bf8a8b18fcebe1c276004a25050eced07cf42cc21233549 +size 5756 diff --git a/src/net/torvald/terrarum/StateFontTester.kt b/src/net/torvald/terrarum/StateFontTester.kt index 55babc9c5..fa8c442c4 100644 --- a/src/net/torvald/terrarum/StateFontTester.kt +++ b/src/net/torvald/terrarum/StateFontTester.kt @@ -52,7 +52,7 @@ nopqrstuvwxyz //g.drawString("Syö salmiakkia perkele", 480f, 10f) - val text = arrayOf( + /*val text = arrayOf( "The bitmap font for game developers who seek good font that has real multilingual support,", "for free (as in freedom AND without cost).", "", @@ -88,6 +88,37 @@ nopqrstuvwxyz "ASCII Latin-1 Latin_Ext-A Latin_Ext-B Greek Cyrillic CJK-Ideo Kana Hangul_Syllables", "", "…not seeing your language/writing system? Let me know on the Issue Tracker!" + )*/ + val text = arrayOf( + "x64またはx86-64とは、x86アーキテクチャを64ビットに拡張した命令セットアーキテクチャ。", + "実際には、AMDが発表したAMD64命令セット、続けてインテルが採用したIntel 64命令セット (かつてIA-32eまたはEM64Tと呼ばれていた)", + "などを含む、各社のAMD64互換命令セットの総称である。x86命令セットと互換性を持っていることから、広義にはx86にx64を含む場合がある。", + "", + "x86-64는 x86 명령어 집합 아키텍처의 64비트 모임이다. x86-64 명령어 집합은 에뮬레이션 없이 인텔의 x86를 지원하며 AMD64로 이름 붙인", + "AMD에 의해 고안되었다. 이 아키텍처는 인텔 64라는 이름으로 인텔에 의해 복제되기도 했다. (옘힐, 클래카마스 기술, CT, IA-32e, EM64T 등으로", + "불렸음) 이로써 x86-64 또는 x64의 이름을 일상적으로 사용하기에 이르렀다.", + "", + "x86-64 (также AMD64/Intel64/EM64T) — 64-битное расширение, набор команд для архитектуры x86, разработанное", + "компанией AMD, позволяющее выполнять программы в 64-разрядном режиме. Это расширение архитектуры x86 с", + "почти полной обратной совместимостью.", + "", + "Επίσης η x86-64 έχει καταχωρητές γενικής χρήσης 64-bit και πολλές άλλες βελτιώσεις. Η αρχική προδιαγραφή", + "δημιουργήθηκε από την AMD και έχει υλοποιηθεί από την AMD, την Intel, τη VIA και άλλες εταιρείες. Διατηρεί πλήρη", + "συμβατότητα προς τα πίσω με κώδικα 32-bit.", + "", + "x86-64 (簡稱x64) 是64位版本的x86指令集,向后相容於16位及32位的x86架構。x64於1999年由AMD設計,AMD首次公開", + "64位元集以擴充給x86,稱為「AMD64」。其後也為英特爾所採用,現時英特爾稱之為「Intel 64」,在之前曾使用過「Clackamas", + "Technology」 (CT)、「IA-32e」及「EM64T」", + "", + "x86-64, ou x64, est une extension du jeu d'instructions x86 d'Intel, introduite par la société AMD avec la gamme", + "AMD64. Intel utilisera cette extension en l'appelant initialement EM64T renommé aujourd'hui en Intel 64.", + "", + "Amd64 (також x86-64/intel64/em64t/x64) — 64-бітова архітектура мікропроцесора і відповідний набір інструкцій,", + "розроблені компанією AMD. Це розширення архітектури x86 з повною зворотною сумісністю.", + "", + "x86-64 е наименованието на наборът от 64-битови разширения към x86 процесорната архитектура. Като синоним", + "на това наименование, се използват и съкращенията AMD64 (използвано от AMD), EM64T и IA-32e (използвани от", + "Intel) и x64 (използвано от Microsoft)." ) val SP = "${0x3000.toChar()}${0x3000.toChar()}" @@ -95,6 +126,8 @@ nopqrstuvwxyz "${0xe006.toChar()} ${Lang["GAME_INVENTORY_USE"p]}$SP${0xe011.toChar()}..${0xe019.toChar()} ${Lang["GAME_INVENTORY_REGISTER"]}$SP${0xe034.toChar()} ${Lang["GAME_INVENTORY_DROP"]}" )*/ + Terrarum.gameLocale = "bgBG" + text.forEachIndexed { i, s -> g.drawString(s, 10f, 70f + 20 * i) } diff --git a/src/net/torvald/terrarum/StateMidiInputTest.kt b/src/net/torvald/terrarum/StateMidiInputTest.kt index 5667c96a6..7bc45ecbc 100644 --- a/src/net/torvald/terrarum/StateMidiInputTest.kt +++ b/src/net/torvald/terrarum/StateMidiInputTest.kt @@ -242,7 +242,7 @@ class BeeperSlave { } fun playTone(leninmilli: Int, freq: Double) { - audioData = makeAudioData(leninmilli, freq) + /*audioData = makeAudioData(leninmilli, freq) if (!AL.isCreated()) AL.create() @@ -282,7 +282,7 @@ class BeeperSlave { } catch (e: ALException) { AL10.alDeleteSources(beepSource) - } + }*/ } // Custom implementation of Util.checkALError() that uses our custom exception. diff --git a/src/net/torvald/terrarum/console/Inventory.kt b/src/net/torvald/terrarum/console/Inventory.kt index 3ab315906..a4521ff3b 100644 --- a/src/net/torvald/terrarum/console/Inventory.kt +++ b/src/net/torvald/terrarum/console/Inventory.kt @@ -35,11 +35,11 @@ internal object Inventory : ConsoleCommand { Echo("(inventory empty)") } else { - target!!.inventory.forEach { - if (it.amount == 0) { - EchoError("Unexpected zero-amounted item: ID ${it.item.dynamicID}") + target!!.inventory.forEach { val (item, amount) = it + if (amount == 0) { + EchoError("Unexpected zero-amounted item: ID ${item.dynamicID}") } - Echo("ID ${it.item}${if (it.amount > 1) " (${it.amount})" else ""}") + Echo("ID $item${if (amount > 1) " ($amount)" else ""}") } } } diff --git a/src/net/torvald/terrarum/gameactors/AVKey.kt b/src/net/torvald/terrarum/gameactors/AVKey.kt index 0cba40f14..a2efd8951 100644 --- a/src/net/torvald/terrarum/gameactors/AVKey.kt +++ b/src/net/torvald/terrarum/gameactors/AVKey.kt @@ -41,6 +41,7 @@ object AVKey { */ const val LUMINOSITY = "luminosity" const val DRAGCOEFF = "dragcoeff" + const val FALLDAMPENMULT = "falldampenmult" /** String * e.g. Jarppi diff --git a/src/net/torvald/terrarum/gameactors/PlayerBuilderSigrid.kt b/src/net/torvald/terrarum/gameactors/PlayerBuilderSigrid.kt index 240627cf1..591cc8f54 100644 --- a/src/net/torvald/terrarum/gameactors/PlayerBuilderSigrid.kt +++ b/src/net/torvald/terrarum/gameactors/PlayerBuilderSigrid.kt @@ -50,7 +50,7 @@ object PlayerBuilderSigrid { p.actorValue[AVKey.INTELLIGENT] = true //p.actorValue[AVKey.LUMINOSITY] = Color(0x434aff).to10bit() - p.actorValue[AVKey.LUMINOSITY] = 214127943 // bright purple + //p.actorValue[AVKey.LUMINOSITY] = 214127943 // bright purple p.actorValue[AVKey.BASEDEFENCE] = 141 diff --git a/src/net/torvald/terrarum/ui/BasicDebugInfoWindow.kt b/src/net/torvald/terrarum/ui/BasicDebugInfoWindow.kt index 4aa60428d..22d224471 100644 --- a/src/net/torvald/terrarum/ui/BasicDebugInfoWindow.kt +++ b/src/net/torvald/terrarum/ui/BasicDebugInfoWindow.kt @@ -111,7 +111,8 @@ class BasicDebugInfoWindow : UICanvas { "${if (player.walledLeft) "$ccR" else "$ccG"}L" + "${if (player.walledBottom) "$ccR" else "$ccG"}${0x1F.toChar()}" + "${if (player.walledTop) "$ccR" else "$ccG"}${0x1E.toChar()}" + - "${if (player.walledRight) "$ccR" else "$ccG"}R" + "${if (player.walledRight) "$ccR" else "$ccG"}R" + + "${if (player.colliding) "$ccR" else "$ccG"}${0x08.toChar()}" ) } diff --git a/src/net/torvald/terrarum/virtualcomputer/computer/TerrarumComputer.kt b/src/net/torvald/terrarum/virtualcomputer/computer/TerrarumComputer.kt index 9defa2040..a3e3906d6 100644 --- a/src/net/torvald/terrarum/virtualcomputer/computer/TerrarumComputer.kt +++ b/src/net/torvald/terrarum/virtualcomputer/computer/TerrarumComputer.kt @@ -537,7 +537,7 @@ class TerrarumComputer(peripheralSlots: Int) { } private fun playTone(leninmilli: Int, freq: Double) { - audioData = makeAudioData(leninmilli, freq) + /*audioData = makeAudioData(leninmilli, freq) if (!AL.isCreated()) AL.create() @@ -577,7 +577,7 @@ class TerrarumComputer(peripheralSlots: Int) { } catch (e: ALException) { AL10.alDeleteSources(beepSource) - } + }*/ } // Custom implementation of Util.checkALError() that uses our custom exception. diff --git a/src/net/torvald/terrarum/virtualcomputer/peripheral/Peripheral.kt b/src/net/torvald/terrarum/virtualcomputer/peripheral/Peripheral.kt index 13820ed79..08fd6dbc3 100644 --- a/src/net/torvald/terrarum/virtualcomputer/peripheral/Peripheral.kt +++ b/src/net/torvald/terrarum/virtualcomputer/peripheral/Peripheral.kt @@ -12,4 +12,6 @@ abstract class Peripheral(val tableName: String) { abstract fun loadLib(globals: Globals) override fun toString(): String = "Peripheral:$tableName" + + abstract val memSize: Int } \ No newline at end of file diff --git a/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralCharLCD.kt b/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralCharLCD.kt new file mode 100644 index 000000000..1a7fcc813 --- /dev/null +++ b/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralCharLCD.kt @@ -0,0 +1,44 @@ +package net.torvald.terrarum.virtualcomputer.peripheral + +import net.torvald.terrarum.ModMgr +import org.luaj.vm2.Globals +import org.newdawn.slick.Graphics +import org.newdawn.slick.SpriteSheet +import org.newdawn.slick.SpriteSheetFont + +/** + * Created by minjaesong on 2017-05-31. + */ +class PeripheralCharLCD(val width: Int, val height: Int) : Peripheral("charLCD") { + companion object { + private val fontSheet = SpriteSheet(ModMgr.getPath("dwarventech", "mt-32.tga"), 16, 16) + private val font = SpriteSheetFont(fontSheet, 0.toChar()) + private val fontW = fontSheet.width / fontSheet.horizontalCount + private val fontH = fontSheet.height / fontSheet.verticalCount + } + + override fun loadLib(globals: Globals) { + TODO("not implemented") //To change body of created functions use File | Settings | File Templates. + } + + override fun toString(): String { + return super.toString() + } + + override val memSize = width * height + + var cursor: Int = 0 // character LCDs are mostly single long line wrapped + + val memory = ByteArray(memSize) // temporary; replace with proper VMPeripheralWrapper + + /** + * @param g Frame Buffer that holds the display of LCD screen + */ + fun render(g: Graphics) { + g.font = PeripheralCharLCD.font + + memory.forEachIndexed { index, byte -> + g.drawString("${byte.toChar()}", (index % width) * fontW.toFloat(), (index / width) * fontH.toFloat()) + } + } +} \ No newline at end of file diff --git a/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralInternet.kt b/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralInternet.kt index 45b19c96a..fe6264a31 100644 --- a/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralInternet.kt +++ b/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralInternet.kt @@ -17,6 +17,8 @@ import java.net.URL internal class PeripheralInternet(val host: TerrarumComputer) : Peripheral("internet"){ + override val memSize = 1024 + override fun loadLib(globals: Globals) { globals["internet"] = LuaTable() globals["internet"]["fetch"] = FetchWebPage() diff --git a/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralPSG.kt b/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralPSG.kt index 05360ea53..d773e5e7e 100644 --- a/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralPSG.kt +++ b/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralPSG.kt @@ -14,6 +14,8 @@ import org.luaj.vm2.LuaValue internal class PeripheralPSG(val host: TerrarumComputer) : Peripheral("psg") { + override val memSize = 1024 + override fun loadLib(globals: Globals) { globals["psg"] = LuaTable() } diff --git a/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralVideoCard.kt b/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralVideoCard.kt index 3c7807f08..764a00d39 100644 --- a/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralVideoCard.kt +++ b/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralVideoCard.kt @@ -83,6 +83,11 @@ class PeripheralVideoCard(val host: TerrarumComputer, val termW: Int = 80, val t val cursorSprite = ImageBuffer(blockW, blockH * 2) val cursorImage: Image + + override val memSize = 256 * 8 + (width * height * 2) + spritesCount * 16 * 7 + // fontRom + framebuffers + sprites + + init { Arrays.fill(cursorSprite.rgba, 0xFF.toByte()) cursorImage = cursorSprite.image diff --git a/src/net/torvald/terrarum/worlddrawer/BlocksDrawer.kt b/src/net/torvald/terrarum/worlddrawer/BlocksDrawer.kt index 52eaddf25..d29b01435 100644 --- a/src/net/torvald/terrarum/worlddrawer/BlocksDrawer.kt +++ b/src/net/torvald/terrarum/worlddrawer/BlocksDrawer.kt @@ -28,7 +28,7 @@ object BlocksDrawer_NEW { private val TILE_SIZEF = FeaturesDrawer.TILE_SIZE.toFloat() // TODO modular - val tilesTerrain = SpriteSheet(ModMgr.getPath("basegame", "blocks/test.tga.gz"), TILE_SIZE, TILE_SIZE) // 64 MB + val tilesTerrain = SpriteSheet(ModMgr.getPath("basegame", "blocks/terrain.tga.gz"), TILE_SIZE, TILE_SIZE) // 64 MB val terrainHorizontalTiles = tilesTerrain.horizontalCount val tilesWire = SpriteSheet(ModMgr.getPath("basegame", "blocks/wire.tga.gz"), TILE_SIZE, TILE_SIZE) // 4 MB val wireHorizontalTiles = tilesWire.horizontalCount diff --git a/src/org/dyn4j/geometry/Vector2.kt b/src/org/dyn4j/geometry/Vector2.kt index 465e823b3..3b9724322 100644 --- a/src/org/dyn4j/geometry/Vector2.kt +++ b/src/org/dyn4j/geometry/Vector2.kt @@ -66,10 +66,10 @@ import org.dyn4j.Epsilon class Vector2 { /** The magnitude of the x component of this [Vector2] */ - @Volatile var x: Double = 0.0 + var x: Double = 0.0 /** The magnitude of the y component of this [Vector2] */ - @Volatile var y: Double = 0.0 + var y: Double = 0.0 /** Default constructor. */ constructor() { diff --git a/work_files/UI/portable_computer_mockup.psd b/work_files/UI/portable_computer_mockup.psd new file mode 100644 index 000000000..7b2884b7b --- /dev/null +++ b/work_files/UI/portable_computer_mockup.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:419174e65ff14673014ab48e6923e73804b49bfac07d5733498323b4ee82bee3 +size 290844 diff --git a/work_files/UI/watchface_mockup.psd b/work_files/UI/watchface_mockup.psd index 3478ee8cc..16227af2e 100644 --- a/work_files/UI/watchface_mockup.psd +++ b/work_files/UI/watchface_mockup.psd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:05643f403bb5fc2631355a7bd800bab15ef632f70703269e354f5e00e91c1b3b -size 3413210 +oid sha256:e707caae1ce2557bc81a4f2592b9eac1164b3a4bdaf77375bd51b987381575d3 +size 3430728 diff --git a/work_files/graphics/fonts/fullwidth_forms.psd b/work_files/graphics/fonts/fullwidth_forms.psd index 57712c20f..c9b6ca7ec 100644 --- a/work_files/graphics/fonts/fullwidth_forms.psd +++ b/work_files/graphics/fonts/fullwidth_forms.psd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:21b337e65da30e08e57217a694d27caef4de09d0a93bab5dcea4d0e883e84b91 -size 37755 +oid sha256:6715db63241cfe3eb2c37c95eca97da94e2b7b9a96cb3d88ef1fe973e67e7451 +size 48759 diff --git a/work_files/walk_bug_desc.png b/work_files/walk_bug_desc.png new file mode 100644 index 000000000..08f9e1f87 Binary files /dev/null and b/work_files/walk_bug_desc.png differ